Electrical Engineering Calculator

Battery Capacity Calculator

Calculate the required battery capacity in Amp-hours (Ah) and Watt-hours (Wh) for any DC load, accounting for depth of discharge, system efficiency, and safety margins.

Battery System Configuration

DC load powered by a battery bank with specified capacity

+−V = 12 VLOADI = 10 ACurrent Flowt = 5 hBattery Bank

Input Parameters

Enter values using the SI-derived A-V-h unit system.

A

Total current draw of the load.

h

Required operating time for the load.

V

Nominal battery bank voltage.

%

Maximum discharge percentage (lower = longer life).

%

Overall system efficiency including conversion losses.

%

Additional capacity for aging and unexpected loads.

Engineering Tip

For lead-acid batteries, never exceed 50% DOD to maximize cycle life. Lithium-ion can safely use 80-90% DOD.

Required Battery Capacity

133.33Ah

Energy Capacity

1,600.00 Wh

In kWh

1.600 kWh

Governing Formula

CAh = (I × t × SF) / (DOD × η)
CAh

Required battery capacity

IA

Load current

th

Runtime

VV

Battery voltage

DOD—

Depth of discharge

η—

System efficiency

SF—

Safety factor

Calculation Assumptions

  • Constant load current
  • Constant battery voltage
  • Linear discharge characteristics
  • Temperature effects neglected
  • Peukert effect neglected (for lead-acid)
  • Single battery or parallel bank

Engineering Code

Reuse the calculation in your own engineering workflow.

Python
def battery_capacity(I, t, V, DOD, efficiency, safety_margin):
    """
    Calculate required battery capacity for a DC load.
    I: Load current (A)
    t: Runtime (h)
    V: Battery voltage (V)
    DOD: Depth of discharge (0-1)
    efficiency: System efficiency (0-1)
    safety_margin: Safety factor (e.g., 1.2 for 20% margin)
    Returns:
        Capacity in Ah and Wh
    """
    if I <= 0 or t <= 0 or V <= 0:
        raise ValueError("Current, time, and voltage must be positive.")
    if not (0 < DOD <= 1) or not (0 < efficiency <= 1):
        raise ValueError("DOD and efficiency must be between 0 and 1.")
    
    # Base capacity needed
    base_capacity_Ah = I * t
    
    # Adjust for DOD, efficiency, and safety
    required_capacity_Ah = (base_capacity_Ah * safety_margin) / (DOD * efficiency)
    required_capacity_Wh = required_capacity_Ah * V
    
    return required_capacity_Ah, required_capacity_Wh

# Example
I = 10
t = 5
V = 12
DOD = 50 / 100
eff = 90 / 100
safety = 1 + 20 / 100

Ah, Wh = battery_capacity(I, t, V, DOD, eff, safety)
print(f"Required Capacity: {Ah:.2f} Ah ({Wh:.2f} Wh)")
MATLAB
function [Ah, Wh] = battery_capacity(I, t, V, DOD, efficiency, safety_margin)
% Calculate required battery capacity for a DC load.
%   I: Load current (A)
%   t: Runtime (h)
%   V: Battery voltage (V)
%   DOD: Depth of discharge (0-1)
%   efficiency: System efficiency (0-1)
%   safety_margin: Safety factor (e.g., 1.2 for 20% margin)

    if I <= 0 || t <= 0 || V <= 0
        error('Current, time, and voltage must be positive.');
    end
    if DOD <= 0 || DOD > 1 || efficiency <= 0 || efficiency > 1
        error('DOD and efficiency must be between 0 and 1.');
    end
    
    % Base capacity needed
    base_capacity_Ah = I * t;
    
    % Adjust for DOD, efficiency, and safety
    Ah = (base_capacity_Ah * safety_margin) / (DOD * efficiency);
    Wh = Ah * V;
end

% Example
I = 10;
t = 5;
V = 12;
DOD = 50 / 100;
eff = 90 / 100;
safety = 1 + 20 / 100;

[Ah, Wh] = battery_capacity(I, t, V, DOD, eff, safety);
fprintf('Required Capacity: %.2f Ah (%.2f Wh)\n', Ah, Wh);
Excel Formula
=(I*t*safety)/(DOD*efficiency)

Example Calculation

For a 10A load running for 5 hours on a 12V battery system with 50% depth of discharge, 90% efficiency, and 20% safety margin:

C = (10 × 5 × 1.2) / (0.50 × 0.90)
C = 133.33 Ah
Energy = 133.33 × 12 = 1600 Wh = 1.6 kWh

Technical Explanation: Battery Capacity

Battery capacity is the total electric charge a battery can deliver under specified conditions. It is normally expressed in ampere-hours (Ah), which is the product of a discharge current and the time over which it can be sustained. Multiplying capacity by the nominal voltage gives the stored energy in watt-hours (Wh), which is the quantity that ultimately determines how long a given load can be supported. Sizing a battery bank correctly is a core task in off-grid solar systems, UPS and telecom backup, electric vehicles, marine and RV power systems, and any portable DC application.

This calculator computes the required battery capacity in Ah and Wh for a DC load, applying corrections for depth of discharge, system efficiency, and a safety margin.

Governing Formula

The calculation starts from the ideal charge requirement and then divides by the correction factors:

Creq = (I × t × SF) / (DOD × η)

where I is the load current (A), t is the required runtime (h), SF is the safety factor expressed as a multiplier (for example 1.2 for 20%), DOD is the allowed depth of discharge as a fraction, and η is the round-trip system efficiency as a fraction. The corresponding energy is:

Ereq = Creq × Vnom

Derivation

The charge drawn by a constant-current load is simply Q = I × t. This ideal value must then be adjusted upward in two ways. First, only a fraction DOD of the rated capacity is usable, so the nameplate capacity must be larger than the delivered charge by a factor 1/DOD. Second, losses in the inverter, wiring, converter, and battery internal resistance mean that more charge must be drawn from the battery than is delivered to the load, so the nameplate capacity must also be enlarged by a factor 1/η. Finally, a safety factor accounts for aging, temperature derating, and load growth, giving the final expression above.

Input Parameters

  • Load current (I): Total DC current drawn by the load, in amperes. For AC loads fed through an inverter, convert the AC power to DC current using I = P / (V × η). Summing loads that operate simultaneously is essential; using the average rather than the peak load is a common error.
  • Runtime (t): The time the load must be supported, in hours. Fractional hours should be used for short duty cycles.
  • Battery voltage (V): The nominal bank voltage (12, 24, 48 V, etc.). Voltage does not affect the Ah result but determines the Wh result and the current drawn for a given power.
  • Depth of discharge (DOD): The fraction of rated capacity that will be used. Lead-acid batteries are typically limited to 50% DOD; lithium-ion can often be cycled to 80–90% DOD. A smaller DOD substantially increases cycle life but increases the required nameplate capacity.
  • System efficiency (η): The combined efficiency of inverter, wiring, converter, and battery round-trip losses. Typical values range from 80% to 95%. Underestimating losses leads to an undersized bank.
  • Safety margin: An additional allowance, usually 10–25%, for capacity fade with age, low-temperature derating, manufacturing tolerance, and future load growth.

Engineering Interpretation

The result is the nameplate capacity the battery bank must provide at its rated discharge rate. Because real battery capacity depends on discharge rate, temperature, and age, the calculated value must be compared against the manufacturer’s data at the expected discharge rate and temperature. For lead-acid chemistries the Peukert effect means that higher discharge currents reduce the effective capacity, so the delivered Ah at the actual load may be significantly lower than the nameplate value. The calculation here gives the required nameplate capacity; it does not by itself confirm that a specific battery will deliver the required runtime under all operating conditions.

Units and Conversion

  • 1 Ah = 3,600 coulombs (C)
  • 1 Wh = 1 Ah × 1 V
  • 1 kWh = 1,000 Wh
  • 1 A × 1 h = 1 Ah (for a constant-current load)

Alternative and General Cases

This calculator assumes a constant current or constant power load over a single discharge period. Real duty cycles often vary in time: a load may draw a high current for a short period and a low current for a long period. In that case the total charge is the sum of each segment’s current multiplied by its duration before the correction factors are applied. Temperature derating, self-discharge during storage, and the Peukert exponent for lead-acid batteries are not modelled here. Series and parallel arrangements of cells change the voltage and Ah rating of a bank but not the stored energy, and must be evaluated separately.

Assumptions and Limitations

  • Load current is constant over the discharge period.
  • Battery operates at the nominal voltage used in the calculation.
  • Efficiency and DOD values are representative averages.
  • No Peukert correction or temperature derating is applied.
  • Self-discharge and standby losses are ignored.
  • Battery management system limits and cut-off voltages are not modelled.
  • The result does not constitute a safety or certification assessment.

Practical Engineering Use

Required battery capacity is determined when designing solar home systems, telecom and data-centre backup, medical equipment power, electric vehicle traction packs, marine and RV house banks, and industrial UPS installations. In each case the calculation feeds the choice of cell chemistry, bank voltage, and configuration (series/parallel strings), and influences the sizing of the charge controller, inverter, and wiring. The result should always be checked against the battery manufacturer’s discharge curves and the applicable safety standards before procurement and installation.

Real-World Engineering Cases

Boeing 787 Dreamliner Lithium Battery Fires (2013)

Two Boeing 787 aircraft experienced catastrophic lithium-ion battery fires within the same week, grounding the entire fleet. The NTSB investigation revealed that the battery management system failed to prevent thermal runaway, and the battery capacity was insufficient to handle fault conditions without overheating.

Engineering Lesson

Battery sizing must account for worst-case fault scenarios, not just normal operation. Thermal management and battery management systems (BMS) are critical for lithium chemistries. Always include adequate safety margins and redundancy in aerospace and safety-critical applications.

Samsung Galaxy Note 7 Battery Explosions (2016)

Samsung was forced to recall 2.5 million Galaxy Note 7 smartphones after multiple units caught fire or exploded. The root cause was a combination of aggressive battery capacity packing (to maximize runtime in a thin device) and manufacturing defects that caused internal short circuits.

Engineering Lesson

Pushing battery capacity to the absolute limit compromises safety. Always maintain adequate physical spacing, proper thermal design, and conservative DOD limits. A slightly larger device with safer battery margins is preferable to a recalled product.

Frequently Asked Questions

What is battery capacity?

Battery capacity is the total electric charge a battery can deliver, typically measured in Amp-hours (Ah) or the total energy in Watt-hours (Wh). It represents how much current a battery can supply over a specified time period.

How do I calculate required battery capacity?

Required capacity (Ah) = (Load Current × Runtime) / (DOD × Efficiency × Safety Factor). For example, a 10A load running 5 hours with 50% DOD, 90% efficiency, and 20% safety margin requires: (10×5)/(0.5×0.9×0.8) = 138.9 Ah.

What is depth of discharge (DOD)?

Depth of Discharge (DOD) is the percentage of battery capacity that has been discharged relative to the total capacity. For example, 50% DOD means you only use half the battery capacity to extend cycle life. Lead-acid batteries typically use 50% DOD, while lithium-ion can use 80-90%.

Why do I need a safety margin?

A safety margin accounts for battery aging, temperature effects, unexpected load increases, and manufacturing tolerances. A 20% safety margin is typical for most applications, ensuring the system remains reliable over the battery lifetime.

Engineering calculations provided by this tool are for educational and preliminary design purposes. Always verify calculations with battery manufacturer specifications, account for temperature derating, consider Peukert's law for lead-acid batteries, and comply with applicable safety standards (UL, IEC, UN) before finalizing a battery system design.