Methodology
Solar system size — methodology
The exact formulas, assumptions, default values and limitations behind the solar system size (how many panels) calculator.
Last updated
This documents the Solar System Size Calculator.
What this calculator does
It converts a home's annual electricity use into a solar system: the size in kilowatts, the number of panels, the roof area required, the expected annual production and a rough installed-cost benchmark. You choose what share of your usage to cover; everything else follows from peak sun hours, a loss factor and your panel wattage.
The formulas
System size and panel count
target_kwh = annual_consumption_kwh * (offset_pct / 100)
annual_kwh_per_kw = peak_sun_hours_per_day * 365 * derate
required_kw = target_kwh / annual_kwh_per_kw
panel_count = ceil(required_kw * 1000 / panel_watts)
actual_kw = panel_count * panel_watts / 1000
The panel count is rounded up to a whole panel, so the installed size can be
a little larger than the ideal required_kw.
Roof area, production, cost and offset
roof_area_sqft = panel_count * area_per_panel_sqft
annual_production_kwh = actual_kw * annual_kwh_per_kw
est_gross_cost = actual_kw * 1000 * cost_per_watt
offset_achieved = annual_production_kwh / annual_consumption_kwh
We guard every division: if peak sun hours, the derate or the panel wattage is zero, the dependent results return “no result” rather than infinity.
Default values
Every default below is editable in the calculator and shown with its source in the calculator’s assumptions table. Peak sun hours is location-dependent and the cost is a broad benchmark — replace both with figures for your situation. Annual electricity use, panel wattage and the per-panel area are user inputs with sensible starting values (10,800 kWh, 400 W and 21 sq ft).
Limitations — read these
- Orientation, tilt and shading are ignored. All losses are folded into a single derate factor. A south-facing, unshaded roof will outperform an east/west or shaded one, which would need more panels for the same output. - Round-up means slight oversizing. The panel count rounds up to a whole panel, so the actual system size and production can exceed your target — the achieved offset is shown so this is visible. - No inverter clipping. We do not model DC-to-AC clipping or inverter sizing, which can trim production on oversized arrays. - Cost is a rough benchmark. The $/W figure is a representative gross cost before incentives and varies widely by installer, region and system size.
How we keep it honest
The calculation logic lives in a small, pure function that is unit-tested against normal, edge and invalid inputs (for example, zero peak sun hours returns “no result” rather than infinity). If you spot an error, tell us and we’ll fix it.
Sources
Every default in this calculator traces to one of these.
- Solar resource maps and data (peak sun hours / daily GHI)National Renewable Energy Laboratory (NREL) · retrievedPeak sun hours depend strongly on location; default is a U.S.-wide representative value.
- PVWatts Calculator — system losses and methodologyNational Renewable Energy Laboratory (NREL) · retrievedPVWatts default system losses are ~14%, i.e. a derate factor near 0.86.
- U.S. Solar Photovoltaic System Cost BenchmarkNational Renewable Energy Laboratory (NREL) · retrievedResidential installed cost is commonly around $2.5–3.5 per watt before incentives; varies widely.
By EnergyTally Team · Editorial & analysis team
- Published
- Updated
- Review
- EnergyTally Team,