The Core Capacitor Charging and Discharging Equation
The capacitor charging and discharging equation defines the exponential voltage change across a capacitor in a series resistor-capacitor (RC) network when subjected to a DC step voltage. This is the foundational math for timing circuits, soft-start delays, debounce filters, and power supply bleeder networks.
For a capacitor charging from 0V toward a source voltage, the equation is:
V(t) = Vs(1 - e-t/RC)
For a capacitor discharging from an initial voltage toward 0V, the equation is:
V(t) = V0e-t/RC
The term RC is the time constant (tau, τ), representing the time required to charge to ~63.2% or discharge to ~36.8% of the total voltage delta.
| Symbol | Parameter | Standard Unit | Practical Range (Hobby/Bench) |
|---|---|---|---|
| V(t) | Voltage across the capacitor at time t | Volts (V) | 0V to 400V |
| Vs | Source (supply) voltage for charging | Volts (V) | 3.3V, 5V, 12V, 24V |
| V0 | Initial voltage across capacitor before discharge | Volts (V) | 12V to 400V |
| R | Series resistance | Ohms (Ω) | 100Ω to 10MΩ |
| C | Capacitance | Farads (F) | 100pF to 1F (supercap) |
| t | Elapsed time | Seconds (s) | 1µs to 60s |
| e | Euler's number (base of natural logarithm) | Dimensionless | ~2.71828 |
Rearranged Forms for Circuit Design
In practical design, you rarely solve for V(t). You know the voltage threshold your microcontroller or transistor needs, and you need to size R, C, or t. Here are the algebraically rearranged forms solving for each variable:
- Solving for time (t) - Charging: t = -RC × ln(1 - V(t)/Vs)
- Solving for time (t) - Discharging: t = -RC × ln(V(t)/V0)
- Solving for Resistance (R): R = -t / (C × ln(1 - V(t)/Vs)) [Charging]
- Solving for Capacitance (C): C = -t / (R × ln(1 - V(t)/Vs)) [Charging]
- Solving for Source Voltage (Vs): Vs = V(t) / (1 - e-t/RC)
- Solving for Initial Voltage (V0): V0 = V(t) / e-t/RC
Assumptions, Limits, and Unit Traps
When the Formula Applies (and When It Doesn't)
This equation assumes an ideal DC voltage source, constant lumped R and C values, and zero parasitic inductance. It applies perfectly to low-frequency timing circuits (e.g., 555 timers, soft-start delays). It fails when:
- High-Frequency/RF: At high frequencies, parasitic ESL (Equivalent Series Inductance) and skin effect dominate. The capacitor acts like an inductor.
- High-Ripple Power Supplies: If the source voltage Vs is not a flat DC step but a rectified AC waveform, you must use differential equations incorporating the AC ripple frequency.
- Very Low RC Values: If your calculated τ is below 1µs, breadboard parasitic capacitance (~50pF) and oscilloscope probe loading (~12pF) will skew your real-world measurements by 20% or more.
The Unit Mistakes That Break Your Math
The most common reason hobbyists 'break' this formula is unit mismatch. The formula demands base SI units: Ohms, Farads, and Seconds.
- The Microfarad Trap: Entering 100µF as '100' instead of '0.0001' or '100e-6' inflates your time constant by a factor of 1,000,000. A circuit meant to delay for 2 seconds will theoretically take 23 days.
- The Kilohms Trap: Entering 47kΩ as '47' instead of '47,000' shrinks your time constant by 1,000.
Realistic Answer Magnitudes
A realistic hobbyist RC time constant (τ = R × C) ranges from 1 millisecond to 10 seconds. If your calculation yields τ = 500 seconds, your resistor is too large (leakage current will dominate) or your capacitor is physically impractical. If τ = 5 nanoseconds, your physical layout parasitics will override your component values.
Worked Example 1: Sizing a Soft-Start Gate Delay
Scenario: You need an RC network to delay the turn-on of an N-channel MOSFET gate. The supply is 5.0V. The MOSFET threshold voltage is 3.3V. You need the gate to reach 3.3V exactly 2.0 seconds after power is applied. You have a 10µF capacitor in your bin.
Knowns:
Vs = 5.0 V
V(t) = 3.3 V
t = 2.0 s
C = 10µF = 10 × 10-6 F
Step 1: Set up the charging equation
3.3 = 5.0(1 - e-2.0 / (R × 10e-6))
Step 2: Isolate the exponential term
3.3 / 5.0 = 1 - e-2.0 / (R × 10e-6)
0.66 = 1 - e-2.0 / (R × 10e-6)
e-2.0 / (R × 10e-6) = 1 - 0.66 = 0.34
Step 3: Take the natural log (ln) of both sides
ln(0.34) = -2.0 / (R × 10e-6)
-1.0788 = -2.0 / (R × 10e-6)
Step 4: Solve for R
R × 10e-6 = -2.0 / -1.0788
R × 10e-6 = 1.8539
R = 1.8539 / 10e-6 = 185,390 Ω
Component Selection: 185.39kΩ is not a standard value. We select the closest E96 1% metal film resistor: 187kΩ. Recalculating with 187kΩ yields a delay of 2.018 seconds, well within acceptable tolerance for a soft-start.
Worked Example 2: Discharging a High-Voltage Snubber
Scenario: A motor drive has a 100µF DC bus capacitor charged to 400V. For safety compliance, a bleeder resistor must discharge it to a safe touch voltage of 50V within 5.0 seconds of power-off.
Knowns:
V0 = 400 V
V(t) = 50 V
t = 5.0 s
C = 100µF = 100 × 10-6 F
Step 1: Set up the discharging equation
50 = 400 × e-5.0 / (R × 100e-6)
Step 2: Isolate the exponential term
50 / 400 = e-5.0 / (R × 100e-6)
0.125 = e-5.0 / (R × 100e-6)
Step 3: Take the natural log
ln(0.125) = -5.0 / (R × 100e-6)
-2.0794 = -5.0 / (R × 100e-6)
Step 4: Solve for R
R = -5.0 / (-2.0794 × 100e-6)
R = 5.0 / 0.00020794 = 24,045 Ω
Component Selection & Power Rating: We select a standard 24kΩ resistor. However, we must calculate the steady-state power dissipation while the circuit is ON:
P = V2 / R = 4002 / 24,000 = 160,000 / 24,000 = 6.67 Watts.
A standard 1/4W or 1/2W resistor will instantly catch fire. You must spec a 10W wirewound power resistor (e.g., Ohmite 270 series) mounted with adequate airflow.
Decision Tree: Picking Your R and C Values
Use this decision path to finalize your component selection based on your circuit's precision requirements. Do not default to 'it depends'—follow the logic to a concrete Bill of Materials (BOM).
| Condition / Requirement | Action / Component Choice |
|---|---|
| Need timing accuracy < 2% (e.g., precision baud rate generation) | Abandon standard RC. Use a crystal oscillator or ceramic resonator. |
| Need timing accuracy ~5% (e.g., 555 timer monostable) | Use C0G/NP0 dielectric capacitors (temperature stable) and 1% metal film resistors. Avoid X7R/Y5V ceramics which suffer from DC bias capacitance drop. |
| Need simple power-on delay, 10-20% error acceptable | Standard aluminum electrolytic capacitor + 5% carbon film or metal film resistor. Add a Schmitt trigger (e.g., 74HC14) to square off the slow RC ramp. |
| Calculated R is > 5MΩ | STOP. PCB surface leakage and op-amp input bias currents will ruin the timing. Increase C by 10x and decrease R by 10x. |
| Calculated C is > 10,000µF | STOP. Electrolytic leakage current will prevent the capacitor from ever reaching Vs. Use a digital timer IC (e.g., TLC555) or microcontroller instead. |
For further reading on RC network transient responses and the underlying differential calculus, refer to the HyperPhysics RC Circuit modules hosted by Georgia State University, or the practical component-level breakdowns at Electronics Tutorials.






