BuildMetricLab

Solar Sizing

Generator Sizing & Runtime Calculator

Size a backup generator and work out fuel runtime and cost

Updated July 12, 2026 · Live

What this tool does

Sizes a backup generator from your load and a margin, and works out how long a tank lasts and what the fuel costs per hour.

Enter the load, tank size, fuel burn and fuel price; the calculator returns a generator size, the runtime per tank and the fuel cost per hour.

Inputs
kW
gal
gal/hr
$/gal
%
Result

Runtime per Tank

12.5 h

Recommended Generator
3.6 kW (load 3.0 kW + 20% = 3.60 kW, next size up)
Fuel Cost per Hour
$1.40
Fuel Cost per Full Tank
$17.50
Note
Size for the surge of the largest motor, not just steady-state load
Plain Estimate
From BrightScale Labs
Invoice maker
Quote at the door. Signed on the spot.
Estimates and invoices for trades, built while you are still in the room.
Scan to get
Get it onGoogle Play

People also use

Formula Used
R=Tc,cost/hr=c⋅p,Pgen=L⋅(1+m)R = \dfrac{T}{c}, \quad \text{cost/hr} = c\cdot p, \quad P_{gen} = L\cdot(1+m)
TT
Tank capacity (gallons)
cc
Fuel consumption per hour (gallons per hour)
pp
Fuel price per gallon
LL
Load (kW)
mm
Sizing margin fraction (percentage ÷ 100)

How the generator sizing & runtime works

A generator sizing calculation answers two questions: how big a machine you need, and how long it will run before you refuel. Runtime is the tank capacity divided by the fuel burned per hour, R = T ÷ c. The two quantities use the same volume unit, so the answer is in hours in gallons or litres. Fuel cost per hour is the burn multiplied by the fuel price, and the full-tank cost is that figure times the runtime. The recommended size is the load multiplied by one plus the margin, P = L × (1 + m), rounded up to the next standard rating.

Example with the defaults on this page: a 5 kW load with a 25% margin needs 5 × 1.25 = 6.25 kW, so the next standard size up is 8 kW. A 5 gal tank burning 0.4 gal/h runs 5 ÷ 0.4 = 12.5 hours. At $3.50 per gallon the fuel costs 0.4 × 3.50 = $1.40 per hour and 12.5 × 1.40 = $17.50 per tank. In metric, 5 gal is 18.9 L and 0.4 gal/h is 1.51 L/h.

A second example, in litres: a 3 kW load with the default 20% margin needs 3.6 kW. A 20 L tank at 1.5 L/h lasts 13.3 hours, and at 1.50 per litre that is 2.25 per hour and 30.00 per tank. Divide the hourly cost by the output in kW to get a cost per kWh: 2.25 ÷ 3 = 0.75 per kWh, which is why generator power costs several times grid power.

What you enter

Five numbers drive the result. The load is what you will power at the same time, in kW. Add up the running watts on the nameplates of the lights, fridge, pumps and other equipment you plan to run together and divide by 1,000. The tank capacity and the fuel consumption are in the same unit, gallons or litres. The consumption should be the burn at your working load, which you read from the manufacturer's table at about half and full load, or measure over a real run. The fuel price is your local price per unit, and a blank price hides the cost lines. The sizing margin is the headroom above the load.

All five fields are editable and checked. Zero or blank values for the load, tank or consumption are refused, the margin must be between 0 and 100%, and the price cannot be negative, so the tool asks for a value instead of guessing.

Reading the result

Runtime tells you how often you refuel. Cost per hour tells you what backup power costs while it runs, and dividing it by the kW you are drawing gives a cost per kWh to compare with your grid tariff. The recommended generator is the smallest standard size in the list (0.6, 1, 1.5, 2, 2.4, 3, 3.6, 4.6, 5, 6, 8, 10, 12 and 15 kW, then whole kW above that) that is at least the load plus the margin. Real generators are sold in different ratings, so use it as a target and pick the nearest model at or above it.

A margin of 25% corresponds to running at 80% of the rating, since 1 ÷ 0.8 = 1.25. That keeps the engine out of continuous full-load running, but it does not cover starting surges. An electric motor, such as a well pump, compressor or air conditioner, can draw several times its running power for a moment as it starts. Check the starting watts of the largest motor against the generator's surge rating. Power is quoted in kW or kVA, and kW is kVA × power factor, often 0.8 for a generator, so confirm which one a rating uses.

Safe by design

This calculator does the arithmetic of sizing, quantities and cost. It deliberately stops at the line a qualified installer must sign off. It will never tell you a cable or fuse size, an earthing arrangement, a battery charge voltage or a structural load, because those are regulated calculations where a wrong number causes fire, electrocution or collapse. All electrical work must be done by a qualified, certified installer, and this page is not an installation guide.

Carbon monoxide is the main danger of a running generator. It is colourless and odourless, and it builds up fast in a garage or a shed even with the door open. In the United States, the Consumer Product Safety Commission and Ready.gov give the same rule: run a generator only outdoors, away from windows and vents. Never connect a generator to a building's wiring through a plug or a spare socket. That back-feeds the grid and can kill a line worker. The safe route is a transfer or changeover switch fitted by a licensed electrician. Store fuel only in approved containers, and let the engine cool before refuelling.

Assumptions and limits

Fuel prices move, so you enter your own. Fuel burn does not fall in proportion to the load: a lightly loaded generator burns less fuel per hour but more per kWh. The tool uses the burn you enter as a constant, so it overstates the runtime if the load rises and understates it if the load falls. Fuel energy gives a check on the figure. A US gallon of gasoline holds about 33 kWh of energy (about 8.7 kWh per litre), so at 3 kW output and 1.5 L/h the generator is converting about 3 ÷ (1.5 × 8.7) = 23% of the fuel energy to electricity, which is plausible for a small engine. A burn that implies much more than about 30% is likely a typing error. Diesel holds about 10% more energy per unit volume, so the same machine uses less of it.

The tool does not derate the output for altitude or heat, which cut the power an engine can make, and it does not include oil, servicing or the cost of the generator. It is a planning estimate and the manufacturer's data sheet always overrides it. Generators also need ventilation and exhaust routing that are safety matters outside this arithmetic.

Using it with the rest of BuildMetricLab

This calculator is one step in planning a system. Pair it with the battery bank, solar array and off-grid comparison calculators to compare a generator with storage and panels for the same load. Every BuildMetricLab tool runs entirely in your browser, with no sign-up. Nothing you type is sent to a server, and the formula is shown on the page so the maths can be audited.

Sources & methodology

Runtime is tank capacity ÷ fuel consumption per hour; both are in the same volume unit, so the result is in hours whether you use gallons or litres. Fuel cost per hour is consumption × fuel price, and cost per full tank is cost per hour × runtime. The recommended generator size is load × (1 + margin ÷ 100), rounded up to the next standard rating in the list 0.6, 1, 1.5, 2, 2.4, 3, 3.6, 4.6, 5, 6, 8, 10, 12 and 15 kW, and above 15 kW to the next whole kW. A margin of 25% corresponds to running at 80% of the rating. Load, tank and consumption must be above zero, the margin must be between 0 and 100%, and the fuel price must be zero or more. The calculator does not model part-load efficiency, motor starting surges, altitude or temperature derating, or power factor.

Frequently asked questions

How is runtime calculated?

Runtime is the tank capacity divided by the hourly fuel burn. Because both use the same unit, gallons or litres, the answer is in hours either way. A 5 gal tank at 0.4 gal/h runs 12.5 hours. Enter the burn at the load you will actually run, because a generator uses less fuel at part load.

What margin should I size to?

A margin of 20 to 25% is a common planning figure. It keeps the running load at about 80% of the rating, which leaves room for extra appliances and avoids running the engine flat out. It does not cover motor starting surges, which can be several times the running load. Check the starting watts of your largest motor against the generator's surge rating.

Why enter my own fuel price?

Fuel prices change often and vary by region, so a built-in figure would go stale. Enter the price you pay per gallon or litre. A blank price hides the cost lines, and a price of zero is accepted if the fuel is already paid for.

Does load affect fuel efficiency?

Yes. Fuel burn falls as load falls, but not in proportion, so a lightly loaded generator uses more fuel per kWh produced. That is why the burn you enter should match the load you will run, not the generator's rated maximum. Many generators are most efficient at roughly half to three-quarters of their rating.

Spotted something off?

Calculations or display — let us know.