Table of Contents (click to expand)
State of charge (SOC) is the percentage of charge left in a battery, defined as remaining capacity divided by rated capacity. There is no direct sensor for it, so it is estimated from voltage, from current (Coulomb counting), from internal impedance, or, in lead-acid cells, from electrolyte specific gravity.
While finishing up a report on your laptop late at night, you get an alert that your battery is low and that you should plug your charger in. “Just a few more minutes,” you think and continue with your work. Suddenly, you get the hated message that your system’s battery is critically low, and if you do not connect it to a charger, the computer shall turn itself off.
It’s only then that you frantically look for the charging adapter and hopefully protect your unsaved work from a digital catastrophe.

There are so many things that our laptops and smartphones can do that we often take them for granted. Among many other things, almost all modern electronic devices keep tabs on their batteries and tell you, in absolute percentage values, how much charge is left or how long they can be used before they’ll need a recharge.
Have you ever wondered how modern electronic devices do that?
How Do Smartphones And Laptops Calculate How Much Charge Is Left In Their Batteries?
Short answer: Accurately determining the amount of charge left in a battery is no easy task, but there are a few methods that can be used, including estimation based on voltage, estimation based on current (Coulomb Counting), and estimation from internal impedance measurements. All these methods rely on measuring a convenient parameter that changes as the battery is charged/discharged.

However, all these methods have their own shortcomings, and therefore cannot be relied upon to provide 100% accurate readings of the ‘remaining charge’ in the battery. Also, some of these methods are specific to certain cell chemistries.
Before we learn about some of these methods in detail, it’s important to first decipher a term that’s going to appear throughout this article with remarkable consistency.
What Is ‘State Of Charge’?
State of Charge, as the name implies, tells you the state of a battery, and more specifically, the charge remaining in a battery, at a given moment. Commonly abbreviated as SOC, it is the equivalent of a fuel gauge for the battery pack in an electric vehicle or hybrid vehicle.
Put as a formula, SOC is simply the charge currently available expressed as a percentage of the battery’s rated (full) capacity:
SOC = (remaining capacity / rated capacity) × 100%
So a 3000 mAh cell holding 1500 mAh sits at 50% SOC. The catch is that there’s no probe you can dip into a cell to read “remaining capacity” directly, so every method below is really a way of inferring that number from something you can measure, namely voltage, current or impedance.

Another closely related term to SOC is Depth of Discharge (DOD). It’s actually just the inverse of SOC, i.e., it’s an alternate method to indicate how much of a battery’s charge has been used up.
A battery holds charge, and we want to measure how much it holds at a given instant. In other words, we want to determine its State of Charge. This can be achieved through a few methods. Let’s talk about some of them.
Determining State Of Charge By Measuring The Voltage
A battery’s SOC is often measured by its voltage, as the process is simple and yields fairly accurate results. It basically converts a reading of the battery voltage to SOC and displays it to the user.
Let’s try to understand this process with the help of an analogy. A battery is like a tank of water with a faucet at its base. You have no way of looking into the tank, so you can’t know how much water it contains at a given instant. How will you determine how much water is left in the tank?

One way of estimating the amount of water left is to look at the pressure of the water coming out of the faucet. If the water comes out fast, it means that it’s under a lot of pressure, signifying that the tank is mostly full. On the other hand, if the flow of water out of the faucet is very slow, you know that the tank is almost empty
The same is true in the case of batteries. A typical Li-ion cell reads about 4.2 V when fully charged and drops to roughly 3.0 V when nearly empty, with a nominal (mid-charge) voltage of around 3.6 to 3.7 V. A device watches this terminal voltage and maps it back to a percentage. To protect the cell, the firmware usually declares 0% or ‘fully discharged’ at a cut-off voltage a little above the true floor (often around 3.0 to 3.3 V), because draining a Li-ion cell well below that point can do serious, sometimes permanent, damage.

A device will take this voltage and accordingly estimate how much charge is left in the battery, which is then shown to the user on the screen.
Problems With SOC Estimation By Voltage
Although the process is simple, it cannot be relied upon to provide 100% accurate results, because certain factors like ambient temperature, discharge rate, cell materials and battery age affect the voltage. Voltage curves in most batteries follow a non-linear curve against state of charge.

There’s also the matter of which voltage you read. The voltage measured while current is flowing sags under load, so the reliable reference is the open-circuit voltage (OCV), the resting voltage with nothing drawing power. The trouble is that a cell doesn’t settle to its true OCV instantly; it has to ‘relax’ for a while (minutes to hours) after the load is removed, and there’s even a hysteresis effect, meaning the resting voltage at a given SOC is slightly different depending on whether you got there by charging or by discharging. That’s why a phone left untouched for a few hours can suddenly report a different battery percentage than it showed when you put it down. (Source)
Determining State Of Charge Using Current (Coulomb Counter)
Another method of estimating SOC is to measure the current entering (when it’s being charged) and leaving (when it’s being discharged) the cells and integrating this over time. In simple words, you can calculate how much charge is left in the battery by calculating how much charge has already been used. This technique of determining the SOC is aptly called ‘Coulomb counting’, since it counts the charge entering/leaving the cells.
Written as a formula, you start from a known SOC and add or subtract the charge that flows in or out over time:
SOC(t) = SOC(0) − (1 / Qn) × ∫ I dt
Here Qn is the cell’s rated capacity (in ampere-hours) and the integral of the current I over time is just the total charge drawn since you last knew the SOC. Charging current is treated as negative, so the SOC climbs back up.
Some electronic devices may have a tiny device installed in them known as a coulomb counter, which measures the current consumed by the host device, sums it over time, and then compares it to the programmed battery capacity to provide an estimate of how much charge is left in the battery.
Although it provides more accuracy than most other SOC estimation methods, since it measures the current flow directly, it has its own set of limitations, namely that it does not consider the efficiency of the battery. Also, it’s very difficult (and expensive) to make consistently accurate current measurements, and small measurement errors accumulate over time as drift, so the counter has to be re-calibrated periodically (typically at a full charge or a long rest). (Source).
SOC Estimation From Specific Gravity (SG) Measurements
This is a very commonly employed method to estimate the SOC of lead acid batteries.

It involves using a sensor that measures changes in the weight of the active chemicals present in the battery as it discharges. As the charge stored in the battery is used up, the concentration of sulfuric acid (an active electrolyte in the battery) decreases, which proportionately reduces the specific gravity of the solution.
Although hydrometers have been traditionally used to make specific gravity (SG) measurements, modern lead acid batteries consist of electronic sensors that provide real-time SG measurements and yield fairly accurate SOC values. However, this method is quite exclusive to lead acid batteries and cannot be used with other cell chemistries.

SOC Estimation By Measuring Internal Impedance
The active chemicals inside a cell change their composition as they convert from one form to another during charging/discharging the battery. Therefore, by measuring the internal impedance (the opposition that a circuit presents to a current when voltage is applied) of the cell, its SOC can be determined.
However, this technique is not a popular choice: first, the impedance of a cell is temperature dependent; and second, it’s difficult to measure the impedance of a cell while it’s still active.
Combining Methods: Model-Based Estimation And The Kalman Filter
Because every single method above has a weak spot, modern battery management systems rarely rely on just one. Instead they blend them. The most widely used approach pairs a mathematical model of the cell with a Kalman filter, an algorithm that fuses a voltage reading, a current (Coulomb-counting) reading and a temperature reading, then continuously corrects its own estimate as new measurements arrive.
The neat trick is that a Kalman filter is self-correcting: even if it starts from a wrong initial SOC, it converges toward the true value within a short time, whereas plain Coulomb counting would keep carrying that initial error forever. This is why the fuel gauge in an electric car or a modern laptop is far more trustworthy than a simple voltage reading alone. (Source)
There are a few other methods that can be used to determine the state of charge of a battery, but none of them is perfect, and each offers a unique set of problems.

So, it should always be considered that SOC determination methods can provide only an estimate of the state of charge of a battery, and not a 100% accurate value. In other words… keep your charger handy!
References (click to expand)
- State of charge - Wikipedia. Wikipedia
- BU-903: How to Measure State-of-charge - Battery University. BatteryUniversity.com
- Buchli, B., Aschwanden, D., & Beutel, J. (2013). Battery State-of-Charge Approximation for Energy Harvesting Embedded Systems. Lecture Notes in Computer Science. Springer Berlin Heidelberg.
- Baccouche, I., Mlayah, A., Jemmali, S., Manai, B., & Essoukri Ben Amara, N. (2015, March). $Implementation of a Coulomb counting algorithm for SOC estimation of Li-Ion battery for multimedia applications. 2015 IEEE 12th International Multi-Conference on Systems, Signals & Devices (SSD15). IEEE.
- Explore Techniques to Estimate Battery State of Charge. MathWorks Documentation.













