If you need to size a battery bank for an off-grid cabin or calculate the flight time of a 6S LiPo drone, you need the Watt-hour (Wh) formula. While you can easily punch numbers into an interactive Web2 calculator—a browser-based JavaScript tool that instantly spits out the answer—relying blindly on automated tools without understanding the underlying physics is how you end up with undersized wire, tripped inverters, or stranded RVs.
Here is the exact derivation, the unit traps that break the math, and the worked examples you need to verify what that Web2 calculator is actually telling you.
The Core Energy Formula and Symbol Definitions
The fundamental relationship between energy, charge capacity, and voltage in DC systems is defined by the product of capacity and nominal voltage. In strict SI units, energy is measured in Joules and charge in Coulombs, but in practical electrical engineering, we use Watt-hours and Amp-hours.
Base Formula: E = Q × V
| Symbol | Parameter | Strict SI Unit | Practical Engineering Unit |
|---|---|---|---|
| E | Total Energy Capacity | Joules (J) | Watt-hours (Wh) |
| Q | Charge Capacity | Coulombs (C) | Amp-hours (Ah) |
| V | Nominal System Voltage | Volts (V) | Volts (V) |
| t | Time (Discharge Duration) | Seconds (s) | Hours (h) |
| I | Average Discharge Current | Amperes (A) | Amperes (A) |
Because Q = I × t, the formula expands to E = I × t × V, which is simply Power (Watts) multiplied by Time (Hours).
Assumptions, Limits, and Unit Traps
When the Formula Applies (and Its Assumptions)
This formula assumes a DC system operating at a constant nominal voltage. It applies perfectly to sizing battery banks, calculating UPS runtime, and estimating solar storage. However, it assumes linear discharge. It does not account for Peukert's Law, which dictates that lead-acid batteries lose effective capacity when discharged at high currents. If you pull 100A from a 100Ah AGM battery, you will not get 1 hour of runtime; you will get roughly 45 minutes. Lithium chemistries (LiFePO4, NMC) suffer far less from this effect, making the E = Q × V formula highly accurate for modern lithium builds.
Which Unit Mistakes Break the Math
The most catastrophic mistake in battery math is the milliamp-hour (mAh) trap. Small electronics and drone batteries are rated in mAh. If you multiply 5000 mAh by a 3.7V LiPo cell without converting to Amp-hours, your math yields 18,500 Wh. That is enough energy to power a modern refrigerator for a week. The reality? It is 18.5 Wh. Always divide mAh by 1,000 before multiplying by voltage.
The second trap is using fully charged voltage instead of nominal voltage. A 12V lead-acid battery rests at 12.6V when full, but its nominal operating voltage under load is 12.0V. A 3S LiPo is 12.6V full, but 11.1V nominal. If a Web2 calculator asks for voltage and you input 12.6V instead of 11.1V, you will overestimate your energy capacity by 13.5%.
What a Realistic Answer Magnitude Looks Like
Sanity-check your results against these benchmarks:
- Smartphone Battery: 12 to 18 Wh
- Laptop Battery: 45 to 99 Wh
- Portable Power Station (e.g., Jackery 1000): ~1,000 Wh (1 kWh)
- Standard Car Battery (12V, 50Ah): 600 Wh
- Home Backup (e.g., Tesla Powerwall): 13,500 Wh (13.5 kWh)
Rearranged Forms for Every Variable
When you are on the bench, you rarely have all three variables. Here is the algebraic rearrangement list to solve for any missing parameter:
- Solving for Energy (Wh):
E = Q × V - Solving for Capacity (Ah):
Q = E / V - Solving for Nominal Voltage (V):
V = E / Q - Solving for Current (A):
I = E / (V × t) - Solving for Runtime (h):
t = E / (V × I)or simplyt = Q / I
Worked Problems with Strict Unit Tracking
Let us run two real-world scenarios. We will track units through every step to ensure dimensional consistency, a practice that prevents the mAh trap mentioned earlier.
Problem 1: Sizing a LiFePO4 Bank for a Starlink Router
Scenario: You need to run a 12V Starlink router (drawing 45W continuous) for 14 hours during a grid outage using a 12V LiFePO4 battery. LiFePO4 nominal voltage is 12.8V. What Ah rating do you need?
- Calculate Total Energy Required (E):
E [Wh] = Power [W] × Time [h]
E = 45 W × 14 h = 630 Wh - Calculate Theoretical Capacity (Q):
Q [Ah] = E [Wh] / V_nom [V]
Q = 630 Wh / 12.8 V = 49.21 Ah - Apply Depth of Discharge (DoD) Safety Margin:
LiFePO4 batteries should not be regularly drained to 0%. Assuming an 80% DoD limit for longevity:
Required Ah = 49.21 Ah / 0.80 = 61.5 Ah - Final Decision: Purchase a standard 12V 80Ah or 100Ah LiFePO4 battery. A basic Web2 calculator might just tell you 49.21 Ah, ignoring the DoD limit and BMS low-voltage cutoffs.
Problem 2: Checking Airline Limits for a Drone Battery
Scenario: You are flying to a shoot with a 6S LiPo drone battery. The label says 5200 mAh and 22.2V. The FAA restricts spare lithium batteries in carry-on luggage to 100 Wh without airline approval. Is this battery legal to carry on?
- Convert mAh to Ah:
Q [Ah] = 5200 mAh / 1000 = 5.2 Ah - Calculate Energy (E):
E [Wh] = Q [Ah] × V_nom [V]
E = 5.2 Ah × 22.2 V = 115.44 Wh - Final Decision: 115.44 Wh is greater than the 100 Wh limit. You cannot fly with this battery in your carry-on without explicit airline approval (which is rarely granted for spare loose cells). You must ship it via ground hazmat or check it installed inside the drone, per FAA passenger guidelines.
Frequently Asked Questions
Is a standard Web2 calculator accurate for lithium battery sizing?
A standard Web2 calculator (a simple HTML/JS form) is only as accurate as the assumptions you feed it. Most basic web calculators assume 100% inverter efficiency and ignore wire voltage drop. In reality, a 12V-to-120V inverter operates at 85% to 92% efficiency. If your Web2 calculator tells you that you need 1000 Wh of battery for a 1000 Wh load, you will actually run out of power early. Always multiply your final Wh requirement by 1.15 to account for inverter losses and BMS overhead before buying cells.
How do I build a custom Web2 calculator for off-grid solar math?
Building a Web2 calculator for your own blog or workshop requires basic HTML for the input fields (Voltage, Ah, Load Watts, Runtime) and JavaScript for the logic. The critical engineering step is hardcoding a 'Chemistry Dropdown' that automatically adjusts the nominal voltage and DoD limits. For example, if the user selects 'Lead-Acid', the JS should force V_nom to 12.0V and cap usable capacity at 50%. If they select 'LiFePO4', it should set V_nom to 12.8V and cap usable capacity at 80%. This prevents users from destroying their batteries based on raw, unadjusted math.
Why does my Web2 calculator output different Wh than the manufacturer label?
Manufacturer labels often play marketing games with voltage. A '12V' power bank might actually be a 3S Lithium-Ion pack with a nominal voltage of 11.1V, but the marketing team labels it based on the 12.6V fully-charged state or the 12V output port. If you input 12V into your calculator, but the internal cells are 11.1V, your calculated Wh will be 8% higher than the physical reality. Always look for the internal cell configuration (e.g., 4S1P, 3S2P) and use the true nominal chemistry voltage (3.2V for LiFePO4, 3.6V or 3.7V for NMC/NCA) as detailed in resources like Battery University.
Can I use the Wh formula for AC mains appliances?
Yes, but with a caveat. For AC resistive loads (like a space heater), Watts equal Volt-Amps (Power Factor = 1). However, for inductive AC loads like refrigerators or well pumps, the Power Factor drops to 0.7 or 0.8. Your Web2 calculator needs a Power Factor input field. The true formula becomes Apparent Power (VA) = Real Power (W) / Power Factor. You must size your inverter's VA rating to handle the apparent power, even though the battery's Wh drain is based on the real power.






