UPS runtime calculator
How many minutes will your servers last on battery, and when must their shutdown start so it finishes before the power cuts out? The calculation starts from the load and the batteries, then corrects the linear estimate for the Peukert effect and battery ageing.
The calculation runs in your browser: nothing you type is sent anywhere.
UPS runtime
Result
Estimated runtime
15 min
the more cautious of the two estimates below
Usable energy
156 Wh
out of 216 Wh rated
Linear estimate
31 min
With the Peukert effect
15 min
k = 1.20
Current per string
13.9 A
1.54 C: fast discharge
Under heavy load, a lead-acid battery delivers less than its rated capacity: real runtime is shorter than the linear calculation. The higher the current relative to capacity, the wider the gap. The manufacturer's runtime curves prevail.
The current exceeds the one-hour rated capacity (above 1 C): Peukert's law, derived for slow discharges, is only an order of magnitude here. Rely on the manufacturer's curves.
Graceful server shutdown: when to trigger it
Result
Trigger shutdown at the latest after
8 min 40 s
on battery
Or when the reported remaining runtime drops below
7 min
NUT (upsmon + upssched)
# upsmon.conf
NOTIFYCMD /usr/sbin/upssched
NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC
# upssched.conf
CMDSCRIPT /etc/nut/upssched-cmd
PIPEFN /run/nut/upssched.pipe
LOCKFN /run/nut/upssched.lock
AT ONBATT * START-TIMER onbatt-shutdown 519
AT ONLINE * CANCEL-TIMER onbatt-shutdown
# upssched-cmd : case $1 in onbatt-shutdown) upsmon -c fsd ;; esacapcupsd (/etc/apcupsd/apcupsd.conf)
TIMEOUT 519
MINUTES 7
BATTERYLEVEL 5Paths vary by distribution. Test the shutdown by cutting the UPS's input power, not just by simulating the event.
How the calculation works
The linear estimate starts from the energy stored in the batteries, reduced by depth of discharge, battery condition and UPS efficiency:
bank voltage = block voltage × blocks in series
usable energy = voltage × Ah × strings × discharge × condition × efficiency
runtime = usable energy / load (W)
current (string) = load / efficiency / voltage / strings
Peukert = H × (Ah × condition / (current × H))^k × dischargeH is the discharge time at which rated capacity is measured, 20 hours for a C20 rating. With an exponent k of 1, the Peukert formula gives back the linear estimate. The calculator shows both and keeps the more cautious one.
Ageing matters just as much. A sealed lead-acid battery is conventionally at end of life once it only holds 80% of its capacity, and it gets there faster in a warm room. With batteries at 80%, the UPS in the example lasts barely 12 minutes instead of 15 and a half.
Shutting servers down before the power cuts
A UPS is there to ride through a brief outage or shut machines down cleanly, not to wait indefinitely for power to return. Shutdown must therefore start early: at the latest after the estimated runtime, minus the measured time of a full shutdown (virtual machines, databases, then hosts) and a margin.
With NUT, upsmon passes the ONBATT event to upssched, which starts a timer; if it expires before mains power returns, the script calls upsmon -c fsd to shut down every client. Without that timer, NUT waits for the UPS's "low battery" state, often too late for a busy hypervisor. With apcupsd, TIMEOUT sets the time on battery, MINUTES and BATTERYLEVEL the remaining runtime and charge thresholds: whichever comes first triggers shutdown.
Sources: NUT documentation (upssched), apcupsd.conf manual page.
After the calculation
A UPS covers a few minutes; what surrounds it decides the rest. The rack power and PUE calculator works out the load to protect and what it costs, and 24/7 IT on-call support makes sure someone is alerted when the UPS switches to battery, at night or at the weekend. When air conditioning stops, the temperature rises within minutes, UPS or not: we documented it during the cooling incident at Equinix PA4.
Frequently asked questions
How do you calculate UPS runtime?
As a first approximation: battery bank voltage × capacity × depth of discharge × efficiency, divided by the load. Two 12 V 9 Ah batteries in series, discharged to 80% with 90% efficiency, give 155.5 Wh of usable energy, or 31 minutes at 300 W. This linear calculation overestimates runtime under heavy load: with a Peukert exponent of 1.2, just over 15 minutes remain.
What is the Peukert effect?
A lead-acid battery delivers less energy when it is discharged quickly. Its rated capacity is measured over a slow discharge, usually 20 hours; a UPS often drains it in a few minutes. Peukert's law corrects the calculation with an exponent, 1.1 to 1.3 for a sealed lead-acid battery: the higher it is, the further real runtime falls below the linear estimate.
Should you calculate in W or VA?
Runtime depends on real power, in watts. If you only know VA, multiply by the load's power factor: about 0.98 for servers with active power factor correction. Also check that the load stays within both the VA and the watt rating of the UPS.
How long do UPS batteries last?
A sealed lead-acid battery is considered at end of life once it only holds 80% of its capacity. Its lifespan depends mostly on temperature: it drops markedly above 25 °C, and that is often what shortens runtime without anyone noticing. A regular runtime test under real load is the only way to know.
When should automatic server shutdown be triggered?
At the latest after the estimated runtime, minus the time a graceful shutdown takes and a margin. With 15 and a half minutes of runtime, 5 minutes of shutdown and a 2-minute margin, shutdown must start after about 8 and a half minutes on battery. NUT does this with an upssched timer on the ONBATT event, apcupsd with the TIMEOUT directive.
Contact
Address
5 B RUE DES NOYERS, 95300 PONTOISE, FRANCE