{"id":1379,"date":"2026-07-30T11:41:02","date_gmt":"2026-07-30T11:41:02","guid":{"rendered":"http:\/\/185.113.249.20\/bwasco\/?page_id=1379"},"modified":"2026-09-07T04:27:41","modified_gmt":"2026-09-07T04:27:41","slug":"bill-calculator","status":"publish","type":"page","link":"https:\/\/bwasco.co.ke\/index.php\/bill-calculator\/","title":{"rendered":"Bill Calculator"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1379\" class=\"elementor elementor-1379\">\n\t\t\t\t<div class=\"elementor-element elementor-element-be33325 e-con e-atomic-element e-flexbox-base e-a65924c \" data-id=\"be33325\" data-element_type=\"e-flexbox\" data-e-type=\"e-flexbox\" data-interaction-id=\"be33325\">\n    \t\t<div class=\"elementor-element elementor-element-4acc28a elementor-widget elementor-widget-html\" data-id=\"4acc28a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<style>\n*{\n    box-sizing:border-box;\n}\n\n.bill-container{\n    max-width:900px;\n    margin:50px auto;\n    padding:0 20px;\n    font-family:Arial,Helvetica,sans-serif;\n}\n\n.bill-card{\n    background:#fff;\n    border-radius:25px;\n    box-shadow:0 15px 40px rgba(0,0,0,.08);\n    overflow:hidden;\n}\n\n.bill-header{\n    background:linear-gradient(135deg,#0077b6,#00AEEF);\n    color:#fff;\n    text-align:center;\n    padding:45px 25px;\n}\n\n.bill-header h2{\n    margin:0;\n    font-size:40px;\n    font-weight:700;\n}\n\n.bill-header p{\n    margin-top:12px;\n    font-size:18px;\n    opacity:.95;\n}\n\n.bill-body{\n    padding:40px;\n}\n\n.bill-group{\n    margin-bottom:25px;\n}\n\n.bill-group label{\n    display:block;\n    font-weight:600;\n    margin-bottom:10px;\n    color:#005B96;\n}\n\n.bill-group input,\n.bill-group select{\n    width:100%;\n    padding:15px;\n    border:1px solid #d8e3ea;\n    border-radius:12px;\n    font-size:16px;\n    background:#fff;\n}\n\n.bill-group input:focus,\n.bill-group select:focus{\n    outline:none;\n    border-color:#00AEEF;\n    box-shadow:0 0 0 3px rgba(0,174,239,.10);\n}\n\n.calculate-btn{\n    width:100%;\n    padding:16px;\n    border:none;\n    border-radius:40px;\n    background:#009245;\n    color:#fff;\n    font-size:18px;\n    font-weight:700;\n    cursor:pointer;\n    transition:.3s;\n}\n\n.calculate-btn:hover{\n    background:#007a39;\n}\n\n.result{\n    margin-top:35px;\n    background:#eef9f1;\n    border-left:5px solid #009245;\n    padding:25px;\n    border-radius:15px;\n    display:none;\n}\n\n.result h3{\n    color:#005B96;\n    margin-top:0;\n    margin-bottom:20px;\n}\n\n.amount{\n    font-size:40px;\n    font-weight:700;\n    color:#009245;\n    margin:20px 0;\n}\n\n.breakdown{\n    color:#555;\n    line-height:1.8;\n}\n\n.breakdown p{\n    margin:8px 0;\n}\n\n.breakdown hr{\n    border:0;\n    border-top:1px solid #d7e8dc;\n    margin:18px 0;\n}\n\n.breakdown .highlight{\n    font-size:18px;\n    color:#005B96;\n}\n\n.tariff-info{\n    margin-top:25px;\n    background:#f8fbfd;\n    border:1px solid #e1edf3;\n    padding:18px;\n    border-radius:12px;\n}\n\n.tariff-info h4{\n    margin:0 0 12px;\n    color:#005B96;\n}\n\n.tariff-info p{\n    margin:6px 0;\n    color:#555;\n}\n\n.note{\n    margin-top:30px;\n    background:#f8fbfd;\n    padding:18px;\n    border-radius:12px;\n    color:#666;\n    font-size:15px;\n    line-height:1.6;\n}\n\n.service-description{\n    margin-top:-15px;\n    margin-bottom:25px;\n    color:#777;\n    font-size:14px;\n}\n\n@media(max-width:768px){\n\n    .bill-container{\n        margin:25px auto;\n        padding:0 12px;\n    }\n\n    .bill-header{\n        padding:35px 20px;\n    }\n\n    .bill-header h2{\n        font-size:30px;\n    }\n\n    .bill-header p{\n        font-size:16px;\n    }\n\n    .bill-body{\n        padding:25px;\n    }\n\n    .amount{\n        font-size:30px;\n    }\n\n}\n<\/style>\n\n\n<div class=\"bill-container\">\n\n    <div class=\"bill-card\">\n\n        <!-- HEADER -->\n        <div class=\"bill-header\">\n\n            <h2 style=\"color:#fff;\">\n                Water Bill Calculator\n            <\/h2>\n\n            <p>\n                Estimate your BWASCO water and sewerage bill.\n            <\/p>\n\n        <\/div>\n\n\n        <div class=\"bill-body\">\n\n            <!-- CUSTOMER CATEGORY -->\n            <div class=\"bill-group\">\n\n                <label for=\"category\">\n                    Customer Category\n                <\/label>\n\n                <select id=\"category\" onchange=\"updateTariffInfo()\">\n\n                    <option value=\"domestic\">\n                        Domestic \/ Residential\n                    <\/option>\n\n                    <option value=\"commercial\">\n                        Commercial \/ Government \/ Industrial\n                    <\/option>\n\n                    <option value=\"institution\">\n                        Schools \/ Colleges \/ Universities\n                    <\/option>\n\n                <\/select>\n\n            <\/div>\n\n\n            <!-- SERVICE TYPE -->\n            <div class=\"bill-group\">\n\n                <label for=\"serviceType\">\n                    Service Type\n                <\/label>\n\n                <select id=\"serviceType\">\n\n                    <option value=\"water\">\n                        Water Only\n                    <\/option>\n\n                    <option value=\"water_sewer\">\n                        Water and Sewer\n                    <\/option>\n\n                    <option value=\"sewer\">\n                        Sewer Only\n                    <\/option>\n\n                <\/select>\n\n            <\/div>\n\n\n            <div class=\"service-description\">\n\n                <strong>Sewerage:<\/strong>\n                Sewer consumption is calculated at 75% of the water consumption\n                and billed using the applicable water tariff.\n\n            <\/div>\n\n\n            <!-- WATER CONSUMPTION -->\n            <div class=\"bill-group\">\n\n                <label for=\"units\">\n                    Water Consumption (m\u00b3)\n                <\/label>\n\n                <input\n                    type=\"number\"\n                    id=\"units\"\n                    min=\"0\"\n                    step=\"0.01\"\n                    placeholder=\"Enter units consumed\"\n                >\n\n            <\/div>\n\n\n            <!-- CALCULATE -->\n            <button\n                class=\"calculate-btn\"\n                onclick=\"calculateBill()\"\n            >\n                Calculate Bill\n            <\/button>\n\n\n            <!-- RESULT -->\n            <div class=\"result\" id=\"result\">\n\n                <h3>\n                    Estimated Water Bill\n                <\/h3>\n\n\n                <div class=\"amount\" id=\"totalAmount\">\n                    KES 0.00\n                <\/div>\n\n\n                <div class=\"breakdown\">\n\n                    <p>\n                        <strong>Customer Category:<\/strong>\n                        <span id=\"resultCategory\"><\/span>\n                    <\/p>\n\n                    <p>\n                        <strong>Service Type:<\/strong>\n                        <span id=\"resultService\"><\/span>\n                    <\/p>\n\n                    <hr>\n\n\n                    <!-- WATER -->\n                    <div id=\"waterSection\">\n\n                        <p>\n                            <strong>Water Consumption:<\/strong>\n                            <span id=\"usedUnits\">0.00<\/span> m\u00b3\n                        <\/p>\n\n                        <p>\n                            <strong>Water Tariff:<\/strong>\n                            KES <span id=\"waterRate\">0.00<\/span> per m\u00b3\n                        <\/p>\n\n                        <p>\n                            <strong>Water Charge:<\/strong>\n                            KES <span id=\"waterAmount\">0.00<\/span>\n                        <\/p>\n\n                    <\/div>\n\n\n                    <!-- SEWER -->\n                    <div id=\"sewerSection\">\n\n                        <hr>\n\n                        <p>\n                            <strong>Sewer Consumption:<\/strong>\n                            <span id=\"sewerUnits\">0.00<\/span> m\u00b3\n                        <\/p>\n\n                        <p>\n                            <strong>Sewer Tariff:<\/strong>\n                            KES <span id=\"sewerRate\">0.00<\/span> per m\u00b3\n                        <\/p>\n\n                        <p>\n                            <strong>Sewer Charge:<\/strong>\n                            KES <span id=\"sewerAmount\">0.00<\/span>\n                        <\/p>\n\n                    <\/div>\n\n\n                    <hr>\n\n\n                    <p class=\"highlight\">\n\n                        <strong>\n                            Total Bill:\n                        <\/strong>\n\n                        <strong>\n                            KES <span id=\"total\">0.00<\/span>\n                        <\/strong>\n\n                    <\/p>\n\n                <\/div>\n\n\n                <!-- TARIFF INFORMATION -->\n                <div class=\"tariff-info\">\n\n                    <h4>\n                        Applicable Tariff\n                    <\/h4>\n\n                    <p id=\"tariffDescription\">\n                        -\n                    <\/p>\n\n                <\/div>\n\n            <\/div>\n\n\n            <!-- DISCLAIMER -->\n            <div class=\"note\">\n\n                <strong>Disclaimer:<\/strong><br>\n\n                This calculator provides an estimate only.\n                Actual billing may vary depending on the official BWASCO\n                tariff, meter readings, billing adjustments and other\n                applicable charges.\n\n                <br><br>\n\n                <strong>Sewerage calculation:<\/strong>\n                Sewerage is calculated at 75% of the water consumption\n                and billed using the applicable water tariff.\n\n            <\/div>\n\n        <\/div>\n\n    <\/div>\n\n<\/div>\n\n\n<script>\n\n\/*\n=========================================================\n BWASCO WATER BILL CALCULATOR\n Tariff: 2024 - 2027\n=========================================================\n*\/\n\n\n\/*\n---------------------------------------------------------\n GET WATER TARIFF\n---------------------------------------------------------\n*\/\nfunction getWaterTariff(category, units){\n\n    let rate = 0;\n    let description = \"\";\n\n\n    \/*\n    =============================================\n    DOMESTIC \/ RESIDENTIAL\n    =============================================\n    *\/\n\n    if(category === \"domestic\"){\n\n        if(units <= 6){\n\n            rate = 100;\n\n            description =\n                \"Domestic: 1\u20136 m\u00b3 @ KES 100\/m\u00b3\";\n\n        }\n        else if(units <= 20){\n\n            rate = 133;\n\n            description =\n                \"Domestic: 7\u201320 m\u00b3 @ KES 133\/m\u00b3\";\n\n        }\n        else if(units <= 50){\n\n            rate = 148;\n\n            description =\n                \"Domestic: 21\u201350 m\u00b3 @ KES 148\/m\u00b3\";\n\n        }\n        else if(units <= 100){\n\n            rate = 163;\n\n            description =\n                \"Domestic: 51\u2013100 m\u00b3 @ KES 163\/m\u00b3\";\n\n        }\n        else if(units <= 300){\n\n            rate = 178;\n\n            description =\n                \"Domestic: 101\u2013300 m\u00b3 @ KES 178\/m\u00b3\";\n\n        }\n        else{\n\n            rate = 190;\n\n            description =\n                \"Domestic: Above 300 m\u00b3 @ KES 190\/m\u00b3\";\n\n        }\n\n    }\n\n\n    \/*\n    =============================================\n    COMMERCIAL \/ GOVERNMENT \/ INDUSTRIAL\n    =============================================\n    *\/\n\n    else if(category === \"commercial\"){\n\n        if(units <= 50){\n\n            rate = 148;\n\n            description =\n                \"Commercial\/Government\/Industrial: 1\u201350 m\u00b3 @ KES 148\/m\u00b3\";\n\n        }\n        else if(units <= 100){\n\n            rate = 163;\n\n            description =\n                \"Commercial\/Government\/Industrial: 51\u2013100 m\u00b3 @ KES 163\/m\u00b3\";\n\n        }\n        else if(units <= 300){\n\n            rate = 178;\n\n            description =\n                \"Commercial\/Government\/Industrial: 101\u2013300 m\u00b3 @ KES 178\/m\u00b3\";\n\n        }\n        else{\n\n            rate = 190;\n\n            description =\n                \"Commercial\/Government\/Industrial: Above 300 m\u00b3 @ KES 190\/m\u00b3\";\n\n        }\n\n    }\n\n\n    \/*\n    =============================================\n    SCHOOLS \/ COLLEGES \/ UNIVERSITIES\n    =============================================\n    *\/\n\n    else if(category === \"institution\"){\n\n        if(units <= 600){\n\n            rate = 148;\n\n            description =\n                \"Schools\/Colleges\/Universities: 1\u2013600 m\u00b3 @ KES 148\/m\u00b3\";\n\n        }\n        else if(units <= 1200){\n\n            rate = 178;\n\n            description =\n                \"Schools\/Colleges\/Universities: 601\u20131,200 m\u00b3 @ KES 178\/m\u00b3\";\n\n        }\n        else{\n\n            rate = 190;\n\n            description =\n                \"Schools\/Colleges\/Universities: Above 1,200 m\u00b3 @ KES 190\/m\u00b3\";\n\n        }\n\n    }\n\n\n    return {\n        rate: rate,\n        description: description\n    };\n\n}\n\n\n\n\/*\n---------------------------------------------------------\n CATEGORY DISPLAY NAME\n---------------------------------------------------------\n*\/\nfunction getCategoryName(category){\n\n    if(category === \"domestic\"){\n\n        return \"Domestic \/ Residential\";\n\n    }\n\n    if(category === \"commercial\"){\n\n        return \"Commercial \/ Government \/ Industrial\";\n\n    }\n\n    if(category === \"institution\"){\n\n        return \"Schools \/ Colleges \/ Universities\";\n\n    }\n\n    return \"\";\n\n}\n\n\n\n\/*\n---------------------------------------------------------\n SERVICE DISPLAY NAME\n---------------------------------------------------------\n*\/\nfunction getServiceName(service){\n\n    if(service === \"water\"){\n\n        return \"Water Only\";\n\n    }\n\n    if(service === \"water_sewer\"){\n\n        return \"Water and Sewer\";\n\n    }\n\n    if(service === \"sewer\"){\n\n        return \"Sewer Only\";\n\n    }\n\n    return \"\";\n\n}\n\n\n\n\/*\n---------------------------------------------------------\n CALCULATE BILL\n---------------------------------------------------------\n*\/\nfunction calculateBill(){\n\n    const units =\n        parseFloat(\n            document.getElementById(\"units\").value\n        );\n\n\n    \/*\n    VALIDATE UNITS\n    *\/\n\n    if(isNaN(units) || units < 0){\n\n        alert(\n            \"Please enter valid water consumption.\"\n        );\n\n        return;\n\n    }\n\n\n    if(units === 0){\n\n        alert(\n            \"Water consumption must be greater than zero.\"\n        );\n\n        return;\n\n    }\n\n\n    const category =\n        document.getElementById(\"category\").value;\n\n\n    const service =\n        document.getElementById(\"serviceType\").value;\n\n\n    \/*\n    GET WATER TARIFF\n    *\/\n\n    const tariff =\n        getWaterTariff(\n            category,\n            units\n        );\n\n\n    const rate =\n        tariff.rate;\n\n\n    \/*\n    =============================================\n    WATER CALCULATION\n    =============================================\n    *\/\n\n    let waterAmount = 0;\n\n    if(\n        service === \"water\" ||\n        service === \"water_sewer\"\n    ){\n\n        waterAmount =\n            units * rate;\n\n    }\n\n\n    \/*\n    =============================================\n    SEWER CALCULATION\n    =============================================\n\n    Sewer = 75% of water consumption\n\n    Example:\n\n    Water = 100 m\u00b3\n\n    Sewer =\n    100 \u00d7 75%\n    = 75 m\u00b3\n    *\/\n\n    let sewerUnits = 0;\n\n    let sewerAmount = 0;\n\n\n    if(\n        service === \"water_sewer\" ||\n        service === \"sewer\"\n    ){\n\n        sewerUnits =\n            units * 0.75;\n\n\n        \/*\n        Sewer uses same applicable tariff\n        *\/\n\n        sewerAmount =\n            sewerUnits * rate;\n\n    }\n\n\n    \/*\n    =============================================\n    TOTAL\n    =============================================\n    *\/\n\n    const total =\n        waterAmount + sewerAmount;\n\n\n    \/*\n    =============================================\n    DISPLAY RESULTS\n    =============================================\n    *\/\n\n    document.getElementById(\"resultCategory\")\n        .innerHTML =\n        getCategoryName(category);\n\n\n    document.getElementById(\"resultService\")\n        .innerHTML =\n        getServiceName(service);\n\n\n    document.getElementById(\"usedUnits\")\n        .innerHTML =\n        units.toFixed(2);\n\n\n    document.getElementById(\"waterRate\")\n        .innerHTML =\n        rate.toFixed(2);\n\n\n    document.getElementById(\"waterAmount\")\n        .innerHTML =\n        waterAmount.toFixed(2);\n\n\n    document.getElementById(\"sewerUnits\")\n        .innerHTML =\n        sewerUnits.toFixed(2);\n\n\n    document.getElementById(\"sewerRate\")\n        .innerHTML =\n        rate.toFixed(2);\n\n\n    document.getElementById(\"sewerAmount\")\n        .innerHTML =\n        sewerAmount.toFixed(2);\n\n\n    document.getElementById(\"total\")\n        .innerHTML =\n        total.toFixed(2);\n\n\n    document.getElementById(\"totalAmount\")\n        .innerHTML =\n        \"KES \" + total.toFixed(2);\n\n\n    document.getElementById(\"tariffDescription\")\n        .innerHTML =\n        tariff.description;\n\n\n    \/*\n    =============================================\n    SHOW\/HIDE WATER SECTION\n    =============================================\n    *\/\n\n    const waterSection =\n        document.getElementById(\"waterSection\");\n\n\n    if(service === \"sewer\"){\n\n        waterSection.style.display =\n            \"none\";\n\n    }\n    else{\n\n        waterSection.style.display =\n            \"block\";\n\n    }\n\n\n    \/*\n    =============================================\n    SHOW\/HIDE SEWER SECTION\n    =============================================\n    *\/\n\n    const sewerSection =\n        document.getElementById(\"sewerSection\");\n\n\n    if(\n        service === \"water_sewer\" ||\n        service === \"sewer\"\n    ){\n\n        sewerSection.style.display =\n            \"block\";\n\n    }\n    else{\n\n        sewerSection.style.display =\n            \"none\";\n\n    }\n\n\n    \/*\n    SHOW RESULT\n    *\/\n\n    document.getElementById(\"result\")\n        .style.display =\n        \"block\";\n\n\n    \/*\n    SCROLL TO RESULT\n    *\/\n\n    document.getElementById(\"result\")\n        .scrollIntoView({\n            behavior:\"smooth\",\n            block:\"nearest\"\n        });\n\n}\n\n\n\n\/*\n---------------------------------------------------------\n UPDATE TARIFF INFORMATION\n---------------------------------------------------------\n*\/\nfunction updateTariffInfo(){\n\n    const category =\n        document.getElementById(\"category\").value;\n\n\n    const units =\n        parseFloat(\n            document.getElementById(\"units\").value\n        );\n\n\n    \/*\n    Only update if units have\n    already been entered.\n    *\/\n\n    if(\n        !isNaN(units) &&\n        units > 0\n    ){\n\n        const tariff =\n            getWaterTariff(\n                category,\n                units\n            );\n\n\n        document.getElementById(\"tariffDescription\")\n            .innerHTML =\n            tariff.description;\n\n    }\n\n}\n\n<\/script>\t\t\t\t<\/div>\n\t\t\n<\/div>\n\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Water Bill Calculator Estimate your BWASCO water and sewerage bill. Customer Category Domestic \/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-1379","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/bwasco.co.ke\/index.php\/wp-json\/wp\/v2\/pages\/1379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bwasco.co.ke\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bwasco.co.ke\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bwasco.co.ke\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bwasco.co.ke\/index.php\/wp-json\/wp\/v2\/comments?post=1379"}],"version-history":[{"count":22,"href":"https:\/\/bwasco.co.ke\/index.php\/wp-json\/wp\/v2\/pages\/1379\/revisions"}],"predecessor-version":[{"id":1717,"href":"https:\/\/bwasco.co.ke\/index.php\/wp-json\/wp\/v2\/pages\/1379\/revisions\/1717"}],"wp:attachment":[{"href":"https:\/\/bwasco.co.ke\/index.php\/wp-json\/wp\/v2\/media?parent=1379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}