---
title: "Calculates solar system return on investment, payback period, and levelized cost of energy (LCOE). Models year-by-year savings accounting for panel degradation, utility rate inflation, federal Investment Tax Credit (ITC), state rebates, and annual maintenance. Outputs net cost after incentives, payback year, total lifetime savings, ROI percentage, and LCOE in cents/kWh. Essential for residential and commercial solar financial analysis, installer proposals, and comparing solar vs. grid economics over a 25-year system lifetime."
method: POST
path: "/api/solar_roi"
tags: ["power"]
---

# Calculates solar system return on investment, payback period, and levelized cost of energy (LCOE). Models year-by-year savings accounting for panel degradation, utility rate inflation, federal Investment Tax Credit (ITC), state rebates, and annual maintenance. Outputs net cost after incentives, payback year, total lifetime savings, ROI percentage, and LCOE in cents/kWh. Essential for residential and commercial solar financial analysis, installer proposals, and comparing solar vs. grid economics over a 25-year system lifetime.

`POST /api/solar_roi`

## Request

- Base URL: `https://calc.engineer`
- URL: `https://calc.engineer/api/solar_roi`
- Auth: none declared

## Request body

- object
  - `system_cost_usd` number, required: Total installed system cost in USD
  - `system_size_kw` number, required: System size in kilowatts (kW)
  - `annual_production_kwh` number, required: Estimated annual energy production in kWh (from PVWatts or system_size_kw * peak_sun_hours * 365 * 0.80)
  - `electricity_rate_cents` number: Current electricity rate in cents per kWh, default 15
  - `annual_rate_increase_pct` number: Annual utility rate increase percentage, default 3%
  - `federal_itc_pct` number: Federal Investment Tax Credit percentage, default 30% (US ITC)
  - `state_rebate_usd` number: State or local rebate amount in USD, default 0
  - `annual_degradation_pct` number: Annual panel degradation rate, default 0.5% per year
  - `annual_maintenance_usd` number: Annual maintenance cost in USD, default $100
  - `system_lifetime_years` number: System lifetime in years, default 25

## Response `200`

Computed result for solar_roi

- object
  - `result` object, required
    - `net_cost_usd` number, required: Net system cost after federal ITC and state rebates (USD)
    - `payback_years` number, required: Number of years to recoup net cost from savings
    - `total_savings_usd` number, required: Total cumulative savings over system lifetime (USD)
    - `roi_pct` number, required: Return on investment percentage over system lifetime
    - `lcoe_cents_per_kwh` number, required: Levelized cost of energy in cents per kWh
    - `year_1_savings_usd` number, required: First year net savings (USD)
    - `year_25_savings_usd` number, required: Final year net savings (USD), or last year if lifetime < 25
    - `lifetime_production_kwh` number, required: Total energy produced over system lifetime (kWh)
  - `tool` string, required
  - `version` string, required
  - `computed_at` string, date-time, required
  - `chain` object, required
    - `feeds` unknown[]
      - unknown
    - `accepts_from` unknown[]
      - unknown

## Other responses

- `400`: Validation error or invalid JSON
- `404`: Tool not found

---

[API](https://skmtc.dev/calc/apis/calc-engineer-api.md) · [All operations](https://skmtc.dev/calc/apis/calc-engineer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calc/apis/calc-engineer-api/revisions/8830480ec488?raw)
