[{"id":"591cbf23","elType":"container","settings":[],"elements":[{"id":"1ea8d226","elType":"widget","settings":{"editor":"<!-- wp:paragraph -->\n<p><\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><\/p>\n<!-- \/wp:paragraph -->"},"elements":[],"widgetType":"text-editor"}],"isInner":false},{"id":"bbf524b","elType":"container","settings":[],"elements":[{"id":"c45ba23","elType":"widget","settings":{"html":"<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n  <meta charset=\"utf-8\" \/>\r\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" \/>\r\n  <title>Net Metering in Pakistan (2025 Guide) \u2014 Net\u2011Meterings.com<\/title>\r\n  <meta name=\"description\" content=\"Clear, fast guide to solar net metering in Pakistan: how it works, DISCO-wise steps, calculators for savings & payback, and city-wise installers.\" \/>\r\n  <style>\r\n    :root{\r\n      --brand:#16a34a; \/* green-600 *\/\r\n      --brand-500:#22c55e; \/* green-500 *\/\r\n      --ink:#0f172a; \/* slate-900 *\/\r\n      --muted:#334155; \/* slate-700 *\/\r\n      --bg:#f8fafc; \/* slate-50 *\/\r\n      --card:#ffffff;\r\n      --ring:#e2e8f0; \/* slate-200 *\/\r\n    }\r\n    *{box-sizing:border-box}\r\n    body{margin:0;background:var(--bg);color:var(--ink);font:16px\/1.6 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,\"Helvetica Neue\",Arial}\r\n    a{color:var(--brand);text-decoration:none}\r\n    a:hover{text-decoration:underline}\r\n    .container{max-width:1100px;margin:auto;padding:20px}\r\n    header{position:sticky;top:0;background:rgba(255,255,255,.9);backdrop-filter:saturate(1.2) blur(6px);border-bottom:1px solid var(--ring);z-index:10}\r\n    .nav{display:flex;align-items:center;gap:16px;justify-content:space-between}\r\n    .brand{display:flex;align-items:center;gap:10px;font-weight:700}\r\n    .brand .dot{width:10px;height:10px;border-radius:50%;background:var(--brand)}\r\n    nav ul{display:flex;gap:14px;list-style:none;padding:0;margin:0}\r\n    nav a{padding:8px 10px;border-radius:10px}\r\n    nav a:hover{background:#eef7f0}\r\n\r\n    .hero{display:grid;grid-template-columns:1.2fr .8fr;gap:24px;align-items:center;padding:28px 0}\r\n    .hero h1{font-size:clamp(28px,4.8vw,42px);line-height:1.1;margin:8px 0}\r\n    .hero p{color:var(--muted)}\r\n    .cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}\r\n    .btn{background:var(--brand);color:#fff;border:none;padding:12px 16px;border-radius:12px;font-weight:600;cursor:pointer}\r\n    .btn.secondary{background:#0ea5e9}\r\n    .btn.ghost{background:#fff;color:var(--brand);border:1px solid var(--ring)}\r\n    .cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}\r\n    .card{background:var(--card);border:1px solid var(--ring);border-radius:16px;padding:16px;box-shadow:0 1px 2px rgba(0,0,0,.03)}\r\n    .card h3{margin:8px 0 6px}\r\n\r\n    .section{padding:18px 0}\r\n    .kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}\r\n    .kpi{background:#fff;border:1px solid var(--ring);border-radius:14px;padding:14px}\r\n\r\n    \/* calculators *\/\r\n    .calc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px}\r\n    .calc form{display:grid;gap:8px}\r\n    .row{display:grid;grid-template-columns:1fr 1fr;gap:8px}\r\n    label{font-weight:600;font-size:14px}\r\n    input[type=\"number\"], input[type=\"text\"], select{width:100%;padding:10px 12px;border:1px solid var(--ring);border-radius:10px;background:#fff}\r\n    .note{font-size:13px;color:var(--muted)}\r\n    .result{background:#f0fdf4;border:1px solid #dcfce7;padding:12px;border-radius:12px}\r\n    .result h4{margin:0 0 6px}\r\n\r\n    \/* list styles *\/\r\n    .list{display:grid;gap:8px}\r\n    .list a{display:block;padding:10px 12px;background:#fff;border:1px solid var(--ring);border-radius:12px}\r\n\r\n    footer{margin-top:30px;border-top:1px solid var(--ring);background:#fff}\r\n    .footgrid{display:grid;grid-template-columns:1.2fr 1fr;gap:16px}\r\n\r\n    @media (max-width:800px){\r\n      .hero{grid-template-columns:1fr}\r\n      .footgrid{grid-template-columns:1fr}\r\n    }\r\n  <\/style>\r\n<\/head>\r\n<body>\r\n  <header>\r\n    <div class=\"container nav\">\r\n      <div class=\"brand\"><span class=\"dot\"><\/span> Net\u2011Meterings.com<\/div>\r\n      <nav>\r\n        <ul>\r\n          <li><a href=\"#calculators\">Calculators<\/a><\/li>\r\n          <li><a href=\"\/how-it-works\">How it works<\/a><\/li>\r\n          <li><a href=\"\/apply\">Apply<\/a><\/li>\r\n          <li><a href=\"#faq\">FAQ<\/a><\/li>\r\n        <\/ul>\r\n      <\/nav>\r\n    <\/div>\r\n  <\/header>\r\n\r\n  <main class=\"container\">\r\n    <!-- HERO -->\r\n    <section class=\"hero\">\r\n      <div>\r\n        <h1>Net Metering in Pakistan \u2014 clear steps, instant math.<\/h1>\r\n        <p>Understand net metering, check your savings & payback, then follow DISCO\u2011wise steps to apply. Built for homeowners, updated for 2025.<\/p>\r\n        <div class=\"cta\">\r\n          <a class=\"btn\" href=\"#calculators\">Try Solar Savings<\/a>\r\n          <a class=\"btn secondary\" href=\"#calculators\">Check Payback<\/a>\r\n          <a class=\"btn ghost\" href=\"mailto:support@net-meterings.com?subject=Solar%20Quote\">Get Installer Quotes<\/a>\r\n        <\/div>\r\n        <div class=\"kpis section\">\r\n          <div class=\"kpi\"><strong>NEPRA Policy<\/strong><div>See the 2025 update \u2192 <a href=\"\/policy\/nepra-net-metering-2025\">policy guide<\/a><\/div><\/div>\r\n          <div class=\"kpi\"><strong>DISCO Coverage<\/strong><div><a href=\"\/discos\/k-electric-net-metering\">K\u2011Electric<\/a>, <a href=\"\/discos\/lesco-net-metering\">LESCO<\/a>, <a href=\"\/discos\/mepco-net-metering\">MEPCO<\/a>, <a href=\"\/discos\/iesco-net-metering\">IESCO<\/a>, <a href=\"\/discos\/gepco-net-metering\">GEPCO<\/a>, <a href=\"\/discos\/pesco-net-metering\">PESCO<\/a>, <a href=\"\/discos\/hesco-net-metering\">HESCO<\/a>, <a href=\"\/discos\/sepco-net-metering\">SEPCO<\/a>, <a href=\"\/discos\/qesco-net-metering\">QESCO<\/a><\/div><\/div>\r\n        <\/div>\r\n      <\/div>\r\n      <div>\r\n        <div class=\"card\">\r\n          <h3>Quick Apply \u2014 overview<\/h3>\r\n          <ol>\r\n            <li>Site survey & quotation (installer)<\/li>\r\n            <li>Net\u2011meter application to your DISCO<\/li>\r\n            <li>System install & inspection<\/li>\r\n            <li>Bi\u2011directional \u201cgreen\u201d meter install<\/li>\r\n            <li>Net\u2011metering agreement & export credits begin<\/li>\r\n          <\/ol>\r\n          <p class=\"note\">Full walkthrough: <a href=\"\/how-it-works\">How Net Metering Works<\/a> \u2022 <a href=\"\/apply\">How to Apply<\/a><\/p>\r\n        <\/div>\r\n      <\/div>\r\n    <\/section>\r\n\r\n    <!-- CALCULATORS -->\r\n    <section id=\"calculators\" class=\"section\">\r\n      <h2>Calculators<\/h2>\r\n      <div class=\"calc-grid\">\r\n\r\n        <!-- Calculator A: Solar Savings (Monthly) -->\r\n        <div class=\"card calc\" id=\"savings-calc-card\">\r\n          <h3>Solar Savings (Monthly)<\/h3>\r\n          <form id=\"savingsForm\">\r\n            <div class=\"row\">\r\n              <div>\r\n                <label>Monthly Electricity Bill (PKR)<\/label>\r\n                <input type=\"number\" step=\"1\" id=\"sv_bill\" placeholder=\"30000\" value=\"30000\" \/>\r\n              <\/div>\r\n              <div>\r\n                <label>Grid Tariff (PKR\/kWh)<\/label>\r\n                <input type=\"number\" step=\"0.1\" id=\"sv_tariff\" placeholder=\"60\" value=\"60\" \/>\r\n              <\/div>\r\n            <\/div>\r\n            <div class=\"row\">\r\n              <div>\r\n                <label>System Size (kW)<\/label>\r\n                <input type=\"number\" step=\"0.1\" id=\"sv_kw\" placeholder=\"5\" value=\"5\" \/>\r\n              <\/div>\r\n              <div>\r\n                <label>Solar Output (kWh\/kW\/day)<\/label>\r\n                <input type=\"number\" step=\"0.1\" id=\"sv_pf\" placeholder=\"4.5\" value=\"4.5\" \/>\r\n              <\/div>\r\n            <\/div>\r\n            <div class=\"row\">\r\n              <div>\r\n                <label>Self\u2011Consumption (%)<\/label>\r\n                <input type=\"number\" step=\"1\" id=\"sv_self\" placeholder=\"70\" value=\"70\" \/>\r\n              <\/div>\r\n              <div>\r\n                <label>Export Credit (PKR\/kWh)<\/label>\r\n                <input type=\"number\" step=\"0.1\" id=\"sv_export\" placeholder=\"30\" value=\"30\" \/>\r\n              <\/div>\r\n            <\/div>\r\n            <button type=\"button\" class=\"btn\" id=\"sv_run\">Calculate<\/button>\r\n            <div class=\"result\" id=\"sv_result\" style=\"display:none\"><\/div>\r\n            <p class=\"note\">Assumptions are editable. Real bills vary by slab, taxes, and DISCO rules. This is an estimate only.<\/p>\r\n          <\/form>\r\n        <\/div>\r\n\r\n        <!-- Calculator B: Net Metering Payback -->\r\n        <div class=\"card calc\" id=\"payback-calc-card\">\r\n          <h3>Net Metering Payback<\/h3>\r\n          <form id=\"paybackForm\">\r\n            <div class=\"row\">\r\n              <div>\r\n                <label>System Size (kW)<\/label>\r\n                <input type=\"number\" step=\"0.1\" id=\"pb_kw\" value=\"5\" \/>\r\n              <\/div>\r\n              <div>\r\n                <label>Installed Cost (PKR\/kW)<\/label>\r\n                <input type=\"number\" step=\"1000\" id=\"pb_cost_per_kw\" value=\"175000\" \/>\r\n              <\/div>\r\n            <\/div>\r\n            <div class=\"row\">\r\n              <div>\r\n                <label>Solar Output (kWh\/kW\/day)<\/label>\r\n                <input type=\"number\" step=\"0.1\" id=\"pb_pf\" value=\"4.5\" \/>\r\n              <\/div>\r\n              <div>\r\n                <label>Self\u2011Consumption (%)<\/label>\r\n                <input type=\"number\" step=\"1\" id=\"pb_self\" value=\"70\" \/>\r\n              <\/div>\r\n            <\/div>\r\n            <div class=\"row\">\r\n              <div>\r\n                <label>Grid Tariff (PKR\/kWh)<\/label>\r\n                <input type=\"number\" step=\"0.1\" id=\"pb_tariff\" value=\"60\" \/>\r\n              <\/div>\r\n              <div>\r\n                <label>Export Credit (PKR\/kWh)<\/label>\r\n                <input type=\"number\" step=\"0.1\" id=\"pb_export\" value=\"30\" \/>\r\n              <\/div>\r\n            <\/div>\r\n            <div class=\"row\">\r\n              <div>\r\n                <label>Tariff Escalation (%\/yr)<\/label>\r\n                <input type=\"number\" step=\"0.1\" id=\"pb_escalation\" value=\"5\" \/>\r\n              <\/div>\r\n              <div>\r\n                <label>Panel Degradation (%\/yr)<\/label>\r\n                <input type=\"number\" step=\"0.1\" id=\"pb_deg\" value=\"0.5\" \/>\r\n              <\/div>\r\n            <\/div>\r\n            <div class=\"row\">\r\n              <div>\r\n                <label>O&M (% of upfront\/yr)<\/label>\r\n                <input type=\"number\" step=\"0.1\" id=\"pb_onm\" value=\"1\" \/>\r\n              <\/div>\r\n              <div>\r\n                <label>Discount Rate (%\/yr)<\/label>\r\n                <input type=\"number\" step=\"0.1\" id=\"pb_disc\" value=\"12\" \/>\r\n              <\/div>\r\n            <\/div>\r\n            <button type=\"button\" class=\"btn\" id=\"pb_run\">Run Payback<\/button>\r\n            <div class=\"result\" id=\"pb_result\" style=\"display:none\"><\/div>\r\n            <p class=\"note\">Simple payback, NPV and IRR over 25 years. Numbers are indicative; verify with your installer and DISCO.\r\n            <\/p>\r\n          <\/form>\r\n        <\/div>\r\n\r\n      <\/div>\r\n    <\/section>\r\n\r\n    <!-- CITY GUIDES -->\r\n    <section class=\"section\">\r\n      <h2>City Guides<\/h2>\r\n      <div class=\"cards\">\r\n        <a class=\"card\" href=\"\/cities\/lahore\"><h3>Lahore<\/h3><p>Top installers, permits, lead times, and local tariffs.<\/p><\/a>\r\n        <a class=\"card\" href=\"\/cities\/karachi\"><h3>Karachi<\/h3><p>K\u2011Electric process, timelines, inspection checklist.<\/p><\/a>\r\n        <a class=\"card\" href=\"\/cities\/islamabad\"><h3>Islamabad<\/h3><p>IESCO process, documents, typical payback examples.<\/p><\/a>\r\n      <\/div>\r\n    <\/section>\r\n\r\n    <!-- FAQ -->\r\n    <section id=\"faq\" class=\"section\">\r\n      <h2>FAQs<\/h2>\r\n      <div class=\"list\">\r\n        <details class=\"card\"><summary><strong>What is a net meter?<\/strong><\/summary><p>A bi\u2011directional \u201cgreen\u201d meter that records both import (from grid) and export (to grid) so your bill reflects the net energy or export credits per DISCO rules.<\/p><\/details>\r\n        <details class=\"card\"><summary><strong>Do I still pay a bill?<\/strong><\/summary><p>Yes. Even with high export, you may see minimum charges, taxes or fees from your DISCO.<\/p><\/details>\r\n        <details class=\"card\"><summary><strong>Will export credits carry forward?<\/strong><\/summary><p>Depends on current policy and DISCO. Check our <a href=\"\/policy\/nepra-net-metering-2025\">policy explainer<\/a>.<\/p><\/details>\r\n        <details class=\"card\"><summary><strong>What size system should I choose?<\/strong><\/summary><p>Generally right\u2011size for your daytime load and roof space. Use the calculators above, then confirm with a professional survey.<\/p><\/details>\r\n      <\/div>\r\n    <\/section>\r\n\r\n    <!-- TOPICAL MAP (20 posts) -->\r\n    <section id=\"topical-map\" class=\"section\">\r\n      <h2>Topical Map \u2014 20 Priority Posts<\/h2>\r\n      <ol class=\"list\">\r\n        <li><a href=\"\/net-metering-in-pakistan\">Net Metering in Pakistan (2025 Homeowner Guide)<\/a><\/li>\r\n        <li><a href=\"\/how-it-works\">How Net Metering Works: Import\/Export & Billing<\/a><\/li>\r\n        <li><a href=\"\/policy\/nepra-net-metering-2025\">NEPRA Net Metering Policy (2025) Explained<\/a><\/li>\r\n        <li><a href=\"\/apply\">How to Apply for Net Metering (Step\u2011by\u2011Step)<\/a><\/li>\r\n        <li><a href=\"\/green-meter-bi-directional\">What is a Green (Bi\u2011Directional) Meter?<\/a><\/li>\r\n        <li><a href=\"\/documents-checklist\">Documents Checklist (CNIC, NOC, Single Line Diagram, etc.)<\/a><\/li>\r\n        <li><a href=\"\/discos\/k-electric-net-metering\">K\u2011Electric Net Metering: Process & Forms<\/a><\/li>\r\n        <li><a href=\"\/discos\/lesco-net-metering\">LESCO Net Metering: Process & Forms<\/a><\/li>\r\n        <li><a href=\"\/discos\/iesco-net-metering\">IESCO Net Metering: Process & Forms<\/a><\/li>\r\n        <li><a href=\"\/discos\/mepco-net-metering\">MEPCO Net Metering: Process & Forms<\/a><\/li>\r\n        <li><a href=\"\/discos\/gepco-net-metering\">GEPCO Net Metering: Process & Forms<\/a><\/li>\r\n        <li><a href=\"\/discos\/pesco-net-metering\">PESCO Net Metering: Process & Forms<\/a><\/li>\r\n        <li><a href=\"\/discos\/hesco-net-metering\">HESCO Net Metering: Process & Forms<\/a><\/li>\r\n        <li><a href=\"\/discos\/sepco-net-metering\">SEPCO Net Metering: Process & Forms<\/a><\/li>\r\n        <li><a href=\"\/discos\/qesco-net-metering\">QESCO Net Metering: Process & Forms<\/a><\/li>\r\n        <li><a href=\"\/costs-and-payback\">Costs & Payback: 3kW\/5kW\/10kW Examples<\/a><\/li>\r\n        <li><a href=\"\/hybrid-inverter-for-net-metering\">Hybrid Inverters for Net Metering (Sizing & Brands)<\/a><\/li>\r\n        <li><a href=\"\/solar-panel-sizing-5kw-10kw\">Solar Panel Sizing: 5kW vs 10kW<\/a><\/li>\r\n        <li><a href=\"\/common-rejection-reasons\">Common Rejection Reasons & How to Avoid Them<\/a><\/li>\r\n        <li><a href=\"\/case-studies-real-bills\">Case Studies: Before\/After Bills (Anonymized)<\/a><\/li>\r\n      <\/ol>\r\n    <\/section>\r\n  <\/main>\r\n\r\n  <footer>\r\n    <div class=\"container footgrid\">\r\n      <div>\r\n        <h3>Need help?<\/h3>\r\n        <p>Email us at <a href=\"mailto:support@net-meterings.com\">support@net-meterings.com<\/a> for installer quotes or questions.<\/p>\r\n        <p class=\"note\">Disclaimer: This site offers general information and calculators for estimates only. For exact terms, consult your DISCO and installer.<\/p>\r\n      <\/div>\r\n      <div>\r\n        <h3>Quick Links<\/h3>\r\n        <div class=\"list\">\r\n          <a href=\"\/faq\">FAQ<\/a>\r\n          <a href=\"\/blog\/\">Blog<\/a>\r\n          <a href=\"\/calculators\/solar-savings\">Solar Savings Calculator<\/a>\r\n          <a href=\"\/calculators\/net-metering-payback\">Net Metering Payback Calculator<\/a>\r\n        <\/div>\r\n      <\/div>\r\n    <\/div>\r\n  <\/footer>\r\n\r\n  <!-- Calculator Scripts -->\r\n  <script>\r\n    function fmtPKR(n){\r\n      try{ return new Intl.NumberFormat('en-PK',{style:'currency',currency:'PKR',maximumFractionDigits:0}).format(n);}catch(e){return 'PKR ' + Math.round(n).toLocaleString();}\r\n    }\r\n\r\n    \/\/ Calculator A \u2014 Solar Savings (Monthly)\r\n    function calcSavings(){\r\n      const bill = +document.getElementById('sv_bill').value || 0;\r\n      const tariff = +document.getElementById('sv_tariff').value || 0; \/\/ PKR\/kWh\r\n      const kw = +document.getElementById('sv_kw').value || 0;\r\n      const pf = +document.getElementById('sv_pf').value || 0; \/\/ kWh per kW per day\r\n      const selfPct = (+document.getElementById('sv_self').value || 0)\/100; \/\/ 0..1\r\n      const exportRate = +document.getElementById('sv_export').value || 0; \/\/ PKR\/kWh\r\n\r\n      if(tariff<=0 || pf<=0 || kw<=0){\r\n        return {error:'Please enter valid positive values.'};\r\n      }\r\n      const days = 30;\r\n      const monthlyGen = kw * pf * days; \/\/ kWh\r\n      const consumptionKWh = bill \/ tariff; \/\/ estimated\r\n\r\n      const potentialSelf = monthlyGen * selfPct;\r\n      const selfKWh = Math.min(consumptionKWh, potentialSelf);\r\n      const exportKWh = Math.max(0, monthlyGen - selfKWh);\r\n\r\n      const creditSelf = selfKWh * tariff;\r\n      const creditExport = exportKWh * exportRate;\r\n      const newBillRaw = (consumptionKWh - selfKWh) * tariff - creditExport;\r\n      const newBill = Math.max(0, newBillRaw);\r\n      const savings = bill - newBill;\r\n\r\n      return {\r\n        monthlyGen, consumptionKWh, selfKWh, exportKWh, creditSelf, creditExport, newBill, savings\r\n      };\r\n    }\r\n\r\n    function renderSavings(){\r\n      const out = document.getElementById('sv_result');\r\n      const r = calcSavings();\r\n      if(r.error){ out.style.display='block'; out.innerHTML = '<p>'+r.error+'<\/p>'; return; }\r\n      const html = `\r\n        <h4>Estimate<\/h4>\r\n        <div><strong>Monthly Solar Generation:<\/strong> ${r.monthlyGen.toFixed(0)} kWh<\/div>\r\n        <div><strong>Self\u2011Consumed:<\/strong> ${r.selfKWh.toFixed(0)} kWh \u2022 <strong>Exported:<\/strong> ${r.exportKWh.toFixed(0)} kWh<\/div>\r\n        <div><strong>Bill After Solar:<\/strong> ${fmtPKR(r.newBill)}<\/div>\r\n        <div><strong>Estimated Monthly Savings:<\/strong> ${fmtPKR(r.savings)}<\/div>\r\n        <div class=\"note\">Self\u2011consumption and export credit are editable above. This is a simplified estimate.<\/div>\r\n      `;\r\n      out.style.display='block';\r\n      out.innerHTML = html;\r\n    }\r\n\r\n    document.getElementById('sv_run').addEventListener('click', renderSavings);\r\n\r\n    \/\/ Calculator B \u2014 Payback (25-year horizon)\r\n    function npv(rate, cashflows){\r\n      return cashflows.reduce((acc,cf,i)=> acc + cf\/Math.pow(1+rate, i), 0);\r\n    }\r\n    function irr(cashflows){\r\n      \/\/ simple bisection between -0.99 and 1.0\r\n      let low=-0.99, high=1.0, mid;\r\n      for(let i=0;i<80;i++){\r\n        mid = (low+high)\/2;\r\n        const v = npv(mid, cashflows);\r\n        if(Math.abs(v)<1e-3) break;\r\n        if(v>0) low = mid; else high = mid;\r\n      }\r\n      return mid;\r\n    }\r\n\r\n    function runPayback(){\r\n      const kw = +document.getElementById('pb_kw').value || 0;\r\n      const costPerKw = +document.getElementById('pb_cost_per_kw').value || 0;\r\n      const pf = +document.getElementById('pb_pf').value || 0;\r\n      const selfPct = (+document.getElementById('pb_self').value || 0)\/100;\r\n      const tariff0 = +document.getElementById('pb_tariff').value || 0;\r\n      const export0 = +document.getElementById('pb_export').value || 0;\r\n      const escal = (+document.getElementById('pb_escalation').value || 0)\/100;\r\n      const deg = (+document.getElementById('pb_deg').value || 0)\/100;\r\n      const onmPct = (+document.getElementById('pb_onm').value || 0)\/100;\r\n      const disc = (+document.getElementById('pb_disc').value || 0)\/100;\r\n\r\n      if(kw<=0 || pf<=0 || costPerKw<=0) return {error:'Please enter valid values.'};\r\n\r\n      const upfront = kw * costPerKw; \/\/ year 0\r\n      const days = 365;\r\n      const baseGen = kw * pf * days; \/\/ year-1 generation before degradation\r\n\r\n      let cum = -upfront;\r\n      let simplePaybackYear = null;\r\n      const horizon = 25;\r\n      const cashflows = [-upfront];\r\n\r\n      for(let y=1;y<=horizon;y++){\r\n        const genY = baseGen * Math.pow(1 - deg, y-1);\r\n        const selfKWh = genY * selfPct;\r\n        const exportKWh = genY * (1 - selfPct);\r\n        const priceY = tariff0 * Math.pow(1 + escal, y-1);\r\n        const exportY = export0 * Math.pow(1 + escal, y-1);\r\n        const savings = selfKWh * priceY + exportKWh * exportY;\r\n        const onm = upfront * onmPct;\r\n        const net = savings - onm;\r\n        cashflows.push(net);\r\n        cum += net;\r\n        if(simplePaybackYear===null && cum>=0){ simplePaybackYear = y; }\r\n      }\r\n\r\n      const npvVal = npv(disc, cashflows);\r\n      const irrVal = irr(cashflows);\r\n\r\n      return { upfront, simplePaybackYear, npvVal, irrVal, cashflows };\r\n    }\r\n\r\n    function renderPayback(){\r\n      const out = document.getElementById('pb_result');\r\n      const r = runPayback();\r\n      if(r.error){ out.style.display='block'; out.innerHTML = '<p>'+r.error+'<\/p>'; return; }\r\n      const yrs = r.simplePaybackYear ? r.simplePaybackYear + ' years' : 'Not within 25 years';\r\n      const irrTxt = isFinite(r.irrVal) ? (r.irrVal*100).toFixed(1)+'%':'\u2014';\r\n      const html = `\r\n        <h4>Results<\/h4>\r\n        <div><strong>Upfront Cost:<\/strong> ${fmtPKR(r.upfront)}<\/div>\r\n        <div><strong>Simple Payback:<\/strong> ${yrs}<\/div>\r\n        <div><strong>NPV @ discount:<\/strong> ${fmtPKR(r.npvVal)}<\/div>\r\n        <div><strong>IRR (approx):<\/strong> ${irrTxt}<\/div>\r\n        <details style=\"margin-top:6px\"><summary>Show yearly cashflows<\/summary>\r\n          <div class=\"note\">Year 0 = -Upfront; Years 1\u201325 = net savings after O&M.<\/div>\r\n          <pre style=\"white-space:pre-wrap;background:#fff;border:1px solid var(--ring);padding:8px;border-radius:8px;max-height:260px;overflow:auto;\">${r.cashflows.map((v,i)=>`Year ${i}: ${fmtPKR(v)}`).join('\\n')}<\/pre>\r\n        <\/details>\r\n      `;\r\n      out.style.display='block';\r\n      out.innerHTML = html;\r\n    }\r\n\r\n    document.getElementById('pb_run').addEventListener('click', renderPayback);\r\n  <\/script>\r\n\r\n  <!-- FAQ Schema for SEO -->\r\n  <script type=\"application\/ld+json\">\r\n  {\r\n    \"@context\": \"https:\/\/schema.org\",\r\n    \"@type\": \"FAQPage\",\r\n    \"mainEntity\": [\r\n      {\r\n        \"@type\": \"Question\",\r\n        \"name\": \"What is a net meter?\",\r\n        \"acceptedAnswer\": {\"@type\":\"Answer\",\"text\":\"A bi\u2011directional meter that records both import and export so your bill reflects net energy and eligible credits.\"}\r\n      },\r\n      {\r\n        \"@type\": \"Question\",\r\n        \"name\": \"Do I still pay a bill?\",\r\n        \"acceptedAnswer\": {\"@type\":\"Answer\",\"text\":\"Yes. Minimum charges, taxes or fees may still apply depending on your DISCO.\"}\r\n      },\r\n      {\r\n        \"@type\": \"Question\",\r\n        \"name\": \"Will export credits carry forward?\",\r\n        \"acceptedAnswer\": {\"@type\":\"Answer\",\"text\":\"Policies can vary and change. Review the latest NEPRA\/DISCO rules or our 2025 policy explainer.\"}\r\n      },\r\n      {\r\n        \"@type\": \"Question\",\r\n        \"name\": \"What size system should I choose?\",\r\n        \"acceptedAnswer\": {\"@type\":\"Answer\",\"text\":\"Right\u2011size for your daytime load and roof space. Use our calculators then confirm with a professional site survey.\"}\r\n      }\r\n    ]\r\n  }\r\n  <\/script>\r\n\r\n  <noscript>\r\n    This page includes interactive calculators that require JavaScript enabled.\r\n  <\/noscript>\r\n<\/body>\r\n<\/html>\r\n"},"elements":[],"widgetType":"html"}],"isInner":false}]