# Ledgerly Solar Payback Calculator > When do solar panels pay off? Payback, NPV, IRR and cost per kWh with feed-in and a loan. Year-by-year cash flow of a PV system: bill savings from the power you use yourself, feed-in income for the guaranteed years, ageing of the panels, running costs, an inverter replacement and an optional loan. Returns simple and discounted payback, NPV, IRR, the cost per kWh produced and a payback table for other price rises and self-consumption shares. Part of Ledgerly’s Solar & Heat. Part of usefulweb.app (https://usefulweb.app/). Part of [Ledgerly](https://ledgerly.usefulweb.app/) (ownerApp: ledgerly). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://ledgerlysolarpayback.usefulweb.app/ (interactive tool at https://ledgerlysolarpayback.usefulweb.app/tool) - JSON API: POST https://ledgerlysolarpayback.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://ledgerlysolarpayback.usefulweb.app/api/v1/tool) - OpenAPI: https://ledgerlysolarpayback.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://ledgerlysolarpayback.usefulweb.app/mcp - tool `ledgerly_solar_payback` ## Inputs - currency (text): Currency - systemCost (number): System price incl. installation - subsidy (number): Subsidies and tax refunds - annualYieldKwh (number): Yield in the first year (kWh) - selfConsumptionPercent (number): Used in the house (% of the yield) - Without a battery often 25–35 %; the battery simulation gives your value. - electricityPrice (number): Electricity price per kWh - electricityPriceIncreasePercent (number): Electricity price increase (% per year) - feedInTariff (number): Feed-in payment per kWh - feedInYears (integer): Years the feed-in payment is guaranteed - After that, exported energy earns nothing in this model. - degradationPercent (number): Yield loss through ageing (% per year) - maintenancePerYear (number): Insurance, metering and upkeep per year - costIncreasePercent (number): Increase of the running costs (% per year) - inverterReplacementCost (number): Inverter replacement - inverterReplacementYear (integer): Inverter replaced in year (0 = never) - loanAmount (number): Financed by a loan - loanRatePercent (number): Loan interest rate (% per year) - loanYears (integer): Loan term (years) - discountRatePercent (number): Discount rate for NPV (% per year) - What your money would earn elsewhere. - horizonYears (integer): Years to compare ## Method - Each year: yield × (1 − ageing)^(year − 1); the self-used share replaces grid power at the rising electricity price, the rest earns the feed-in payment while it is guaranteed. - Net cash flow = bill savings + feed-in income − running costs − inverter replacement (in its year) − loan payments; year 0 is your own money (price − subsidies − loan). Payback and the return on the investment use the flows without the loan; NPV and the return on your own money include it. - Loan payments come from the same monthly annuity schedule as the Loan Amortization Calculator. NPV, IRR (bisection) and fractional payback use the same functions as the Break-even Explorer. - LCOE = (net price + present value of running costs) ÷ present value of all kWh, before financing. The 3 × 3 table repeats the payback for the price rise ± 1 point and self-consumption ± 10 points. ## Limits - A model with your assumptions, not financial or tax advice: tariffs, feed-in rules and subsidies differ by country and change over time — enter the ones that apply to you.