# How to calculate capacity of a battery from the readings of current and time?

The requirement is to compute the capacity of the battery in order to calculate the capacity degradation.

The input which can be acquired are current, voltage, relative time, battery level (in terms of percentage).

As per as formula

Capacity = Integral of Current over time. (of discharge cycle)

So the doubt is, does the time here mean from reaching, say, x voltage to y, or from battery level 100% to 0% on discharging?

Basically, how is the interval to calculate capacity is considered?

• How are you acquiring battery level in terms of percentage? Oct 4, 2018 at 9:39
• The readings are taken from mobile phone, so it provide API to take battery level. Oct 4, 2018 at 9:40
• You need to have the discharge graph from the battery in question in order to derive the information you want. It should be in the datasheet for the battery used. Oct 4, 2018 at 9:52
• Sorry, discharge graph means .. what all parameters are in it ? . and currently I am bothered to compute the estimated capacity which is deferred from the rated (design) capacity., Oct 4, 2018 at 10:08

## 1 Answer

You have discovered why "battery capacity" is a vague term. Yes, you have to define what the ending conditions are. Usually this is the voltage that the battery should not be discharged below to avoid damage.

If you really want to know what the battery can do for you, it is better to measure the total energy delivered in one discharge. That is the integral of voltage times current. You can still measure capacity (integral of just current) to have something to compare to the official specs.