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 sizing is a critical step in designing off-grid solar systems, UPS backups, electric vehicles, and any application requiring reliable DC power. The required capacity depends on the load current, desired runtime, battery voltage, and several correction factors that account for real-world limitations.

The fundamental relationship is: Capacity (Ah) = Current (A) × Time (h). However, this theoretical value must be adjusted for depth of discharge (to preserve battery life), system efficiency (to account for conversion losses), and safety margin (to handle aging and unexpected loads).

How to Use This Calculator

  1. Load Current (I): Enter the total current draw of your load in Amperes (A). Sum all parallel loads.
  2. Runtime (t): Specify how long the load must operate in hours (h).
  3. Battery Voltage (V): Input the nominal battery bank voltage (e.g., 12V, 24V, 48V).
  4. Depth of Discharge (DOD): Set the maximum percentage of capacity you'll use. Lower DOD extends cycle life.
  5. System Efficiency (η): Enter the overall efficiency (typically 80-95%) to account for inverter, wiring, and conversion losses.
  6. Safety Margin: Add 10-25% extra capacity for battery aging, temperature effects, and unexpected load increases.

What is Depth of Discharge (DOD)?

Depth of Discharge is the percentage of battery capacity that has been used. For example, 50% DOD means you only discharge the battery to half its rated capacity. This dramatically extends cycle life: a lead-acid battery at 50% DOD may last 1000+ cycles, while at 100% DOD it may only last 200-300 cycles. Lithium-ion batteries tolerate deeper discharge (80-90% DOD) with minimal life reduction.

Why include a safety margin?

Batteries lose capacity over time due to chemical degradation. A 20% safety margin ensures the system continues to meet runtime requirements even as the battery ages. It also accounts for temperature effects (capacity drops in cold weather), manufacturing tolerances, and unexpected load increases.

How does voltage affect the calculation?

Battery voltage doesn't affect the Amp-hour calculation directly, but it determines the total energy capacity in Watt-hours (Wh = Ah × V). Higher voltage systems can deliver the same power with lower current, reducing wire size and I²R losses. This is why large solar systems use 48V or higher instead of 12V.

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.