Skip to main content
Back to Blogs
MathematicsCalculusAP Calculus ABAP Calculus BCNovember 6, 2026

The Calculus Behind EV Batteries and Live Charging Estimates

See how integrals turn live current and voltage readings into battery charge, energy totals, and changing charging-time estimates—with a worked AP Calculus example.

An electric car can show both “62% charged” and “18 minutes remaining.” Those numbers describe different things: one estimates accumulated charge; the other predicts a future event. As the charging rate changes, the prediction changes. Calculus connects the live measurements to both displays.

The useful question is simple: if a sensor tells us how quickly something is flowing right now, how much has arrived over an interval? That is the same accumulation question students meet in AP Calculus AB and BC.

Three battery quantities that should stay separate

QuantityMeaningTypical unit
Electric chargeThe amount of charge transferred through the circuit.Ampere-hours, Ah
EnergyThe electrical energy transferred; voltage matters as well as charge.Kilowatt-hours, kWh
State of chargeEstimated remaining charge relative to the battery's present usable charge capacity.A fraction or percentage

Battery health is a separate idea: it describes longer-term condition, often using remaining capacity or resistance. A battery can be fully charged relative to its current capacity while having less capacity than when new. Likewise, a charge percentage does not identify an exact energy amount unless we also know how voltage and usable capacity behave.

Current is a rate; charge is its accumulation

Let I(t) be charging current in amperes. If time is measured in hours, charge added is the definite integral of current. If time is measured in minutes, include the conversion:

Charge added, in Ah = (1/60) ∫ I(t) dt
Rate of charge accumulation: q′(t) = I(t)/60

The second equation uses minutes. An ampere-hour is an ampere multiplied by one hour, so integrating over minutes without dividing by 60 would overstate the result sixtyfold. We take charging current as positive and assume ideal charge retention in the example.

A worked charging example

Consider a simplified 100 Ah battery initially at 30% state of charge. Over the next 20 minutes, suppose the measured current follows I(t) = 120 − 2t. This is an invented teaching model for this interval, rather than a manufacturer's charging profile.

Δq = (1/60) ∫ from 0 to 20 (120 − 2t) dt
   = (1/60) [120t − t²] from 0 to 20
   = (2400 − 400)/60
   = 33.333... Ah

The battery starts with 30 Ah. Under our assumptions it finishes with 63.333... Ah, or approximately 63.3% state of charge. The instantaneous current at minute 20 is only 80 A. Using that final rate for the entire interval would miss the higher rates earlier.

How software integrates sensor readings

A controller receives samples, rather than a perfect formula. Here are three readings from the same example:

Time, minutesCurrent, APower at an assumed 400 V, kW
012048
1010040
208032

The trapezoidal rule estimates each interval's area using its average endpoint current:

Δq ≈ (10/60) × [(120 + 100)/2 + (100 + 80)/2]
   = 33.333... Ah

This matches the integral exactly because our current function is linear. For curved or noisy measurements, it is an approximation; more frequent samples can capture changes that widely spaced readings miss.

Power leads to a different integral

Power in watts is voltage times current. At a constant assumed 400 V, power here is P(t) = 48 − 0.8t kW. Integrating power over hours gives energy:

Energy transferred = (1/60) ∫ from 0 to 20 (48 − 0.8t) dt
                   = 800/60
                   ≈ 13.33 kWh

This is electrical energy entering the pack terminals in our model. It is not automatically the increase in recoverable stored energy: some energy can become heat. Real battery voltage also varies, so a controller can integrate sampled voltage-times-current instead of assuming a fixed voltage.

A current application: charging that responds to changing conditions

Managed EV charging is an active application in 2025–2026: vehicles, chargers, and energy-management systems can coordinate charging around departure needs and available electrical capacity. Battery management systems monitor current, voltage, and temperature while estimating charge. Some implementations can renegotiate charging as conditions change; capabilities vary by vehicle and charging equipment.

The calculus connection is the energy target. A controller must allocate a changing power rate whose accumulated energy meets a required amount by a deadline. Recalculating that forecast after new measurements is what makes the estimate live. A slower rate now can move the predicted completion time even though the battery percentage continues rising.

Current integration alone also accumulates sensor error. Practical estimators combine measurements with battery models and corrections; the simple integral is one part of the calculation.

Connect it to your calculus course

For AB, identify a rate's units, form an accumulation integral, apply the Fundamental Theorem of Calculus, and approximate from a table. For BC, connect sampled updates to Euler's method for a differential equation: qnext ≈ qnow + I(t)Δt/60 when Δt is in minutes. The step size and changing rate affect the approximation.

Try this: current decreases linearly through 80 A, 60 A, and 40 A at minutes 0, 5, and 10. For an ideal 100 Ah battery initially at 50%, find its final percentage. Then estimate energy at a constant 400 V. Check: the trapezoids add 10 Ah, giving 60% charge; the corresponding energy is 4 kWh.

Build the underlying skills in the AP Calculus AB study guide or explore numerical methods in the AP Calculus BC study guide.