Battery Runtime Calculator
Estimate battery runtime from capacity (mAh/Wh) and device power consumption. Enter values for instant results with step-by-step formulas.
Calculator
Adjust values & calculateFormula
First converts mAh to Wh by multiplying capacity by voltage, then applies efficiency factor to get usable energy, and finally divides by load power in watts to get runtime in hours.
Last reviewed: December 2025
Worked Examples
Example 1: Smartphone Battery Life Estimation
Example 2: IoT Sensor Node on AA Batteries
Background & Theory
The Battery Runtime Calculator applies the following established principles and formulas. Date and time calculations underpin a vast range of applications from financial settlement to scheduling and age verification. The complexity arises because civil timekeeping uses irregular units: months have 28, 29, 30, or 31 days; years have 365 or 366 days; hours, minutes, and seconds use base-60 arithmetic; and time zones introduce offsets ranging from -12:00 to +14:00 relative to UTC. The Gregorian calendar's leap year rule is a compound condition: a year is a leap year if it is divisible by 4, except for century years, which must be divisible by 400. Thus 1900 was not a leap year but 2000 was. This rule keeps the calendar synchronized with the solar year to within about 26 seconds per year. For algorithmic date calculations, the Julian Day Number provides a continuous integer count of days since January 1, 4713 BCE, eliminating the irregularity of calendar months and making interval arithmetic straightforward. The Unix epoch, by contrast, counts seconds since 00:00:00 UTC on January 1, 1970, and is the basis of POSIX time used in most computing systems. ISO 8601 standardizes date and time representation as YYYY-MM-DD and combined datetime as YYYY-MM-DDTHH:MM:SSยฑHH:MM, ensuring unambiguous machine-readable interchange across locales that would otherwise differ in day/month/year ordering. Business day calculation requires excluding weekends and, optionally, a jurisdiction-specific list of public holidays. Duration calculations expressed in years, months, and days must account for the variable length of months, making them non-commutative: the interval from January 31 to February 28 is different from the interval from February 28 to March 31. Age calculation algorithms must handle the edge case of birthdays on February 29 and ensure that a person born on December 31 is not counted as one year older on January 1 of the following year until the clock passes midnight. Zeller's Congruence provides a closed-form formula to determine the day of the week for any Gregorian or Julian calendar date using only integer arithmetic.
History
The history behind the Battery Runtime Calculator traces back through the following developments. The need to track time and predict astronomical events gave rise to calendrical systems independently across many civilizations. The Babylonians, around 2000 BCE, developed a lunisolar calendar with 12 months of alternating 29 and 30 days, inserting an intercalary month periodically to keep pace with the solar year. They also divided the day into 24 hours and the hour into 60 minutes, a sexagesimal convention that persists in every modern clock. The Egyptian civil calendar used 12 months of exactly 30 days plus five epagomenal days, totaling 365 days. Though simple for administrative purposes, it drifted against the solar year by one day every four years. Julius Caesar, advised by the Egyptian astronomer Sosigenes, reformed the Roman calendar in 45 BCE. The Julian calendar introduced a 365-day year with a leap day every four years, a system that served Europe for over sixteen centuries. By the 16th century, the accumulated error of the Julian calendar had shifted the spring equinox ten days from its ecclesiastically mandated date, disrupting the calculation of Easter. Pope Gregory XIII commissioned the calendar reform that bears his name, and the Gregorian calendar was introduced in Catholic countries in October 1582. The transition required skipping ten days: October 4 was followed by October 15. Protestant and Orthodox countries adopted the reform slowly; Britain and its colonies switched in 1752, Russia not until 1918, and Greece in 1923. The expansion of railways in the 1840s created an urgent practical problem: each city operated on its own local solar time, making train timetables impossible to coordinate. British railways adopted Greenwich Mean Time as a standard in 1847. The International Meridian Conference of 1884 in Washington formalized the prime meridian at Greenwich and established the global framework of 24 time zones. Daylight saving time was first adopted nationally during World War I to reduce coal consumption. The development of atomic clocks after World War II led to the definition of Coordinated Universal Time (UTC) in 1960, accurate to nanoseconds. The Y2K problem of 1999-2000 demonstrated that two-digit year storage in legacy systems could cause widespread failures, prompting a global remediation effort costing an estimated 300 to 600 billion dollars.
Frequently Asked Questions
Formula
Runtime (hours) = (Capacity_mAh / 1000 * Voltage * Efficiency) / Power_W
First converts mAh to Wh by multiplying capacity by voltage, then applies efficiency factor to get usable energy, and finally divides by load power in watts to get runtime in hours.
Worked Examples
Example 1: Smartphone Battery Life Estimation
Problem: A smartphone has a 5000 mAh battery at 3.7V. The average power consumption during mixed use is 4W. Assume 90% efficiency. How long will the battery last?
Solution: Energy = (5000 / 1000) * 3.7 = 18.5 Wh\nUsable energy = 18.5 * 0.90 = 16.65 Wh\nRuntime = 16.65 / 4 = 4.16 hours\nCurrent draw = (4 / 3.7) * 1000 = 1081 mA\nC-rate = 1081 / 5000 = 0.216C
Result: Runtime: 4 hours 10 minutes | Current draw: 1081 mA | C-rate: 0.216C
Example 2: IoT Sensor Node on AA Batteries
Problem: An IoT sensor runs on 2 AA batteries in series (3V total, 2500 mAh each). It draws 50mW average. Assume 85% efficiency from the voltage regulator. What is the expected runtime?
Solution: Energy = (2500 / 1000) * 3.0 = 7.5 Wh\nUsable energy = 7.5 * 0.85 = 6.375 Wh\nRuntime = 6.375 / 0.05 = 127.5 hours = 5.31 days\nCurrent draw = (0.05 / 3.0) * 1000 = 16.7 mA\nC-rate = 16.7 / 2500 = 0.0067C
Result: Runtime: 127.5 hours (5.3 days) | Current draw: 16.7 mA | C-rate: 0.007C
Frequently Asked Questions
How is battery runtime calculated from mAh and power consumption?
Battery runtime is calculated by first converting the battery capacity from mAh to watt-hours (Wh) using the formula Wh = (mAh / 1000) * voltage. Then you divide the available energy by the power consumption of the device in watts. For example, a 5000 mAh battery at 3.7V has 18.5 Wh of energy. If a device draws 5 watts, the theoretical runtime would be 18.5 / 5 = 3.7 hours. However, real-world runtime is always less due to conversion efficiency losses, voltage regulator overhead, and battery degradation over time.
What is the difference between mAh and Wh for battery capacity?
Milliamp-hours (mAh) measures electric charge capacity and does not account for voltage, while watt-hours (Wh) measures total energy and includes voltage in the calculation. Two batteries can have the same mAh rating but different energy capacities if they operate at different voltages. A 3000 mAh battery at 3.7V has 11.1 Wh, but a 3000 mAh battery at 7.4V has 22.2 Wh, meaning twice the actual energy. Wh is the more meaningful metric for comparing batteries of different chemistries and voltages. Phone manufacturers typically advertise mAh because all phones use similar 3.7V lithium cells, making mAh a reasonable comparison.
What is C-rate and why does it affect battery runtime?
C-rate describes how fast a battery is being discharged relative to its total capacity. A 1C rate means the battery is fully discharged in one hour, 0.5C means two hours, and 2C means 30 minutes. C-rate matters because batteries deliver less total energy at higher discharge rates due to internal resistance losses and chemical reaction limitations. A battery rated at 5000 mAh might only deliver 4500 mAh at a 1C rate and even less at 2C. This phenomenon is described by Peukerts law for lead-acid batteries and similar effects occur in lithium-ion cells. For maximum runtime, keep the C-rate as low as practical.
How does efficiency factor into battery runtime estimates?
Efficiency accounts for energy losses in the power delivery chain between the battery and the actual load. These losses come from voltage regulators (which convert battery voltage to the required device voltage), DC-DC converters, power management ICs, and heat dissipation in the battery itself due to internal resistance. Typical efficiency values are 85 to 95 percent for well-designed switching regulators and 50 to 70 percent for linear regulators. The calculator multiplies the raw battery energy by the efficiency percentage to get usable energy. For example, at 90 percent efficiency, a 20 Wh battery provides only 18 Wh of usable energy to the device.
How does temperature affect battery runtime?
Temperature significantly impacts battery performance and runtime. Most lithium-ion batteries perform best between 20 and 25 degrees Celsius. In cold temperatures (below 0 degrees C), the chemical reactions slow down, internal resistance increases, and available capacity can drop by 20 to 40 percent. At minus 20 degrees C, some batteries may deliver only half their rated capacity. High temperatures above 45 degrees C can temporarily increase available capacity slightly but accelerate permanent degradation and capacity loss. Extreme heat can also trigger thermal runaway, a dangerous condition. For outdoor or automotive applications, always account for the expected temperature range when sizing batteries.
What is battery degradation and how does it affect long-term runtime?
Battery degradation is the gradual, permanent loss of capacity and increase in internal resistance that occurs over a battery lifecycle. Lithium-ion batteries typically retain 80 percent of their original capacity after 300 to 500 full charge cycles, depending on the chemistry and usage conditions. After that, degradation accelerates. Factors that speed up degradation include deep discharges (below 20 percent), charging to 100 percent regularly, high temperatures, and fast charging. A phone with a 5000 mAh battery might effectively have only 4000 mAh after two years of daily charging. To maximize battery longevity, keep the charge between 20 and 80 percent and avoid extreme temperatures.
References
Reviewed by Daniel Agrici, Founder & Lead Developer ยท Editorial policy