Compare the multi-year cost of a home battery and a fuel generator using your outage hours, local prices, and equipment quotes.
Advanced options
Table of contents
How to use our Battery vs Generator Cost Calculator
- Enter Compare over, Power outage time per year, and Backup power needed for the loads you want to keep running.
- Enter Electricity price, Generator fuel price, and Generator fuel use from your bill, local fuel price, or generator manual.
- Open Advanced options if you have quotes or specs, then adjust Battery upfront cost, Generator upfront cost, maintenance, Battery size, Usable battery percent, Battery recharge loss, and Longest single outage to cover.
- Select Calculate and read Battery cost advantage over selected years first. A positive dollar amount means the battery is cheaper; a negative amount means the generator is cheaper.
- Sanity-check Battery backup time per full charge against your longest outage. If the margin is negative, the battery may be cheaper or cleaner to run but too small for that outage without recharging.

Definitions
kW: Kilowatt, a measure of power. In this calculator, Backup power needed is the average amount of power your backed-up items use at one time.
kWh: Kilowatt-hour, a measure of electrical energy used over time. One kWh is the energy from using 1 kW for 1 hour [4].
Electricity price: The cost for each kWh from your electric bill. An all-in rate with delivery and supply charges gives a closer recharge cost.
Generator fuel use: The gallons of fuel burned per hour while the generator is running at your expected load.
Usable battery percent: The share of the rated Battery size that can actually be used for backup power.
Battery cost advantage over selected years: Generator total cost minus Battery total cost. Positive means the battery is cheaper; negative means the generator is cheaper.
Common mistakes and quick fixes
Mistake: Entering peak appliance watts in Backup power needed instead of the average kW you expect during an outage.
Fix: Use a realistic average Backup power needed for the items that will run most of the time.
Mistake: Leaving Generator fuel use at a guess that does not match your generator load.
Fix: Use Generator fuel use from the manual or a measured rate near your expected Backup power needed.
Mistake: Using only the battery sticker price for Battery upfront cost and only the generator sticker price for Generator upfront cost.
Fix: Include installation, transfer equipment, permits, and required hardware in Battery upfront cost and Generator upfront cost when those costs apply.
Mistake: Setting Battery recharge loss to 100 or more because it sounds like a percent of energy used.
Fix: Enter Battery recharge loss as the percent lost while charging, usually a value below 100, so recharge cost can be calculated.
Mistake: Reading a negative Battery hours above or below longest outage as a bad cost result.
Fix: Treat Battery hours above or below longest outage as a size check. Negative means the battery falls short of Longest single outage to cover.
Limitations & Key Assumptions / Boundary Conditions
- The comparison is cost-only. It does not score noise, emissions, indoor safety, fuel storage rules, startup reliability, or comfort.
- Battery total cost does not automatically include tax credits, solar savings, battery replacement, demand charges, or time-of-use rate differences. Add those effects by changing the cost inputs if needed.
- Generator total cost does not automatically include fuel delivery fees, fuel storage containers, repairs, battery starters, exercise runs, or carbon monoxide safety equipment.
- Battery backup time assumes the battery starts full, the load is steady, and the usable percent is correct for your system.
- Generator fuel cost assumes Generator fuel use is constant during outage hours. Real fuel burn changes with load, generator size, temperature, and maintenance condition.
- Electricity price and fuel price are treated as flat prices over the full Compare over period. Future price increases are not modeled.
Methodology
How the cost comparison is calculated
The calculator first estimates yearly backup energy from Backup power needed and Power outage time per year.
annual_backup_kwh = critical_load_kw * outage_hours_per_year
It then estimates the yearly cost to refill the battery from the grid. Battery recharge loss increases the grid energy needed because charging is not perfect.
annual_battery_recharge_cost = (annual_backup_kwh / (1 - recharge_loss_percent / 100)) * electricity_rate_per_kwh
Generator yearly fuel cost uses the fuel burned each hour, the outage hours, and the local fuel price.
annual_generator_fuel_cost = generator_fuel_burn_gal_per_hour * outage_hours_per_year * generator_fuel_price_per_gal
Total cost adds upfront cost, yearly maintenance, and yearly operating cost over the selected number of years.
battery_total_cost = battery_upfront_cost + battery_annual_maintenance * analysis_years + annual_battery_recharge_cost * analysis_years
generator_total_cost = generator_upfront_cost + generator_annual_maintenance * analysis_years + annual_generator_fuel_cost * analysis_years
The main answer is the generator total minus the battery total. This sign convention keeps positive numbers favorable to the battery.
battery_cost_advantage = generator_total_cost - battery_total_cost
The battery size check uses rated Battery size, Usable battery percent, and Backup power needed.
battery_backup_hours_per_full_charge = (battery_capacity_kwh * battery_usable_percent / 100) / critical_load_kw
battery_backup_hour_margin = battery_backup_hours_per_full_charge - longest_outage_hours
The yearly operating-cost advantage compares generator fuel cost with battery recharge cost.
fuel_cost_advantage_per_year = annual_generator_fuel_cost - annual_battery_recharge_cost
Mini-example
For 10 years, 50 outage hours per year, 2 kW of backup load, $0.18 per kWh electricity, $3.50 per gallon fuel, and 0.75 gallons per hour fuel use, yearly backup energy is 100 kWh. With a 10 percent recharge loss, battery recharge cost is $20 per year. Generator fuel cost is $131.25 per year. If Battery upfront cost is $12,000, Generator upfront cost is $7,000, Battery maintenance each year is $0, and Generator maintenance each year is $250, Battery total cost is $12,200 and Generator total cost is $10,812.50. Battery cost advantage is -$1,387.50, so the generator is cheaper by that amount over 10 years. With a 13.5 kWh battery, 90 percent usable energy, and 2 kW load, Battery backup time per full charge is 6.075 hours. Against a 12 hour longest outage, the margin is -5.925 hours.
Rounding and close results
Money outputs are calculated with the full entered numbers and displayed as dollars and cents or rounded dollars where appropriate. If Battery total cost and Generator total cost round to the same dollar amount, the lower-cost option should be treated as about the same instead of a clear winner.
Sources
- Portable vs. Whole-House Generator: Which Is Right for You? - Consumer Reports - Consumerreports
- Generator Buying Guide - Consumer Reports - Consumerreports
- Historical State Data - U.S. Energy Information Administration (EIA) - EIA
- U.S. EIA glossary - kilowatthour (kWh) definition (kW for 1 hour) - EIA