How the tools work
Calculator methodology
This page is the shared source for formulas, preset meaning, units, rounding, and review dates. Tool interfaces call the same tested TypeScript modules described here.
Core rules
- Energy is normalized to watt-hours, power to watts, voltage to volts, and capacity to amp-hours.
- Percentages enter the calculation core as decimals from 0 to 1.
- Hardware counts always round upward, then installed capacity or output is recalculated.
- Invalid, zero, negative, infinite, or incompatible inputs stop the calculation instead of producing a fallback result.
- Every dynamic result is a planning estimate and lists its active assumptions.
Solar battery sizing
usable Wh needed = daily Wh × autonomy days
nominal Wh needed = usable Wh needed ÷ (DoD × inverter efficiency × battery efficiency)
design Wh = nominal Wh needed × (1 + reserve)
required Ah = design Wh ÷ nominal system voltage
If a battery module is included, system voltage divided by module voltage must be a positive whole number. Parallel count is the required Ah divided by module Ah, rounded upward. Installed Wh is recalculated from the integer layout.
Battery runtime
nominal Wh = total bank V × total bank Ah
usable Wh = nominal Wh × DoD × battery efficiency
For AC loads: effective load W = load W ÷ inverter efficiency + inverter idle W. For DC loads, the entered DC watts are used without inverter loss.
runtime hours = usable Wh ÷ effective load W
Battery backup loads
row Wh = running watts × quantity × hours. Row watt-hours are summed and passed to the battery sizing function above with one represented outage period. Running watts and entered surge watts stay separate from the energy calculation.
Series and parallel wiring
total V = unit V × series count
total Ah = unit Ah × parallel count
total Wh = total V × total Ah
usable Wh = total Wh × DoD × battery efficiency
Target mode requires target voltage to be a whole-number multiple of unit voltage. Parallel strings round upward to reach the requested Ah or kWh.
Solar array sizing
required array W = daily Wh × coverage ÷ (peak sun hours × system efficiency)
panel count = ceil(required array W ÷ panel W)
installed output Wh/day = installed array W × peak sun hours × system efficiency
Monthly energy uses 30.4375 days and yearly energy uses 365 days.
Solar panel output
array W = panel count × panel W
daily kWh = array W × peak sun hours × system efficiency × seasonal multiplier ÷ 1,000
The seasonal multiplier defaults to 1.00. It is a manual scenario input, not a weather lookup.
RV solar planning
The RV calculator aggregates appliance rows, then calls the shared battery sizing and panel sizing functions. It does not copy those formulas. Its controller current baseline is installed array W ÷ battery V × planning factor. The baseline does not check Voc, Isc, temperature, controller voltage window, charge profile, or protection.
Editable presets
| Preset | Depth of discharge | Battery efficiency | Status |
|---|---|---|---|
| LiFePO4 planning preset | 90% | 95% | Editable starting point |
| AGM / gel planning preset | 50% | 85% | Editable starting point |
| Flooded lead-acid planning preset | 50% | 80% | Editable starting point |
| Custom | User input | User input | Use documented equipment values |
Presets are not manufacturer specifications or engineering recommendations. Battery limits vary with model, temperature, rate, age, state of charge, BMS settings, and warranty terms.
Rounding and display
The calculation retains raw floating-point results. The interface formats numbers for reading but does not replace the underlying value. Counts use Math.ceil. Runtime displays days, hours, and minutes; energy switches between Wh and kWh for readability.
Validation and limits
Efficiencies and depth of discharge must be greater than 0% and no more than 100%. Reserve is 0% to 100%. Counts must be positive whole numbers. A module layout is rejected if its voltage cannot form the selected system voltage exactly.
The tools do not provide cable sizes, fuses, breakers, protection coordination, grounding, structural design, equipment compatibility, permits, prices, incentives, tax advice, or final installation approval.
Public references
- NREL PVWatts Calculator for a more detailed US solar-production model.
- NREL PVWatts API documentation for model inputs and outputs. SolarMathKit does not call this API in the first release.