The Core Charging of Capacitor Formula and Derivation
When a DC voltage is applied to a series resistor-capacitor (RC) network, the voltage across the capacitor does not rise instantly. The fundamental charging of capacitor formula that defines the voltage across the capacitor at any given time is:
V(t) = Vs (1 - e-t/RC)
This equation is derived directly from Kirchhoff’s Voltage Law (KVL). At any instant after the switch closes, the source voltage (Vs) must equal the sum of the voltage drops across the resistor (VR) and the capacitor (VC):
Vs = VR + VC
Substituting Ohm’s law for the resistor (iR) and the integral definition of capacitance for the capacitor, we get:
Vs = iR + (1/C) ∫ i dt
By differentiating both sides with respect to time (noting that the derivative of a constant Vs is zero), we obtain a first-order linear differential equation: 0 = R(di/dt) + i/C. Solving this yields the current decay equation i(t) = (Vs/R)e-t/RC. Integrating that current over time to find the accumulated charge, and dividing by capacitance, yields the final voltage formula shown above. For a deeper look at the calculus behind this, All About Circuits provides an excellent breakdown of RC time constants.
| Symbol | Name | Standard Unit | Practical Notes |
|---|---|---|---|
| V(t) | Capacitor Voltage at time t | Volts (V) | The potential difference across the capacitor plates at a specific moment. |
| Vs | Source Voltage | Volts (V) | The constant DC supply voltage applied to the circuit. |
| t | Time | Seconds (s) | Elapsed time since the charging began (t=0). |
| R | Resistance | Ohms (Ω) | Series resistance limiting the charging current. |
| C | Capacitance | Farads (F) | Capacity to store charge. Often given in µF or nF on the bench. |
| e | Euler’s Number | Dimensionless | Mathematical constant ≈ 2.71828. Base of the natural logarithm. |
Rearranged Forms: Solving for Time, Resistance, and Capacitance
On the workbench, you rarely need to find V(t). Usually, you know the target threshold voltage (like the trigger point of a 555 timer or the VBE of a transistor) and need to select components to hit a specific delay time. Here are the algebraically rearranged forms of the charging of capacitor formula:
- Solving for Time (t):
t = -RC × ln(1 - V(t)/Vs) - Solving for Resistance (R):
R = -t / [C × ln(1 - V(t)/Vs)] - Solving for Capacitance (C):
C = -t / [R × ln(1 - V(t)/Vs)]
Domain Restriction Warning: The natural logarithm function ln(x) is undefined for x ≤ 0. Therefore, these rearranged formulas will throw a math error if you attempt to solve for a target voltage V(t) that is equal to or greater than the source voltage Vs. An ideal capacitor asymptotically approaches Vs but never mathematically reaches it.
Assumptions, Unit Traps, and Realistic Magnitudes
The formula is elegant, but it models an idealized universe. Before plugging numbers into your calculator, you must understand the boundaries of the math.
When the Formula Applies (and its Assumptions)
- Constant DC Source: Vs must be a stable, unchanging DC voltage step. If your supply sags under the initial inrush current, the formula breaks.
- Zero Initial Charge: The formula assumes the capacitor is fully discharged at t=0. If there is residual voltage, the formula must be offset: V(t) = Vfinal - (Vfinal - Vinitial)e-t/RC.
- Ideal Components: It assumes the capacitor has zero Equivalent Series Resistance (ESR) and infinite parallel leakage resistance. It also assumes the resistor is purely resistive with no parasitic inductance.
The Unit Mistake That Breaks 90% of Bench Builds
The most common failure in student and hobbyist RC timing circuits is a unit prefix mismatch. The formula strictly requires base SI units: Ohms, Farads, and Seconds.
If you multiply 10 kΩ by 100 µF, the time constant (τ = RC) is not 1,000 seconds. It is 1 second.
10,000 Ω × 0.0001 F = 1 second. Always convert microfarads (µF) to Farads by multiplying by 10-6 before calculating.
Realistic Answer Magnitudes
What should your answer look like? Context dictates the scale:
- Snubber / High-Speed Filtering: Nanoseconds to microseconds (ns to µs). Uses small pF/nF caps and low-ohm resistors.
- 555 Timers / Relay Delays: Milliseconds to tens of seconds (ms to s). Uses µF to mF caps and kΩ to MΩ resistors.
- Supercapacitor Backup: Minutes to hours. Uses Farad-range supercaps and high-value bleed resistors.
Worked Examples: Tracking Units from Microfarads to Seconds
Let’s run through two common bench scenarios, explicitly tracking the unit conversions to prevent magnitude errors.
Problem 1: Finding Voltage at a Specific Time
Scenario: You have a 12V DC supply, a 4.7 kΩ series resistor, and a 220 µF electrolytic capacitor. What is the voltage across the capacitor 1.5 seconds after the circuit is energized?
- Convert to base units:
R = 4,700 Ω
C = 220 × 10-6 F = 0.00022 F
t = 1.5 s - Calculate the time constant (τ = RC):
τ = 4,700 × 0.00022 = 1.034 seconds - Apply the formula:
V(1.5) = 12 × (1 - e-1.5 / 1.034)
V(1.5) = 12 × (1 - e-1.4506)
V(1.5) = 12 × (1 - 0.2344)
V(1.5) = 12 × 0.7656 = 9.18 V
Sanity Check: 1.5 seconds is roughly 1.5 time constants. At 1τ, a cap reaches 63.2% of source voltage (7.58V). At 2τ, it reaches 86.5% (10.38V). Our answer of 9.18V sits perfectly between these benchmarks.
Problem 2: Solving for Time to Reach a Threshold
Scenario: A microcontroller GPIO pin configured as an analog input triggers an interrupt when it reads 3.3V. The RC network is powered by a 5V USB rail, using a 100 kΩ resistor and a 47 µF capacitor. How long until the interrupt fires?
- Convert to base units:
V(t) = 3.3 V
Vs = 5.0 V
R = 100,000 Ω
C = 47 × 10-6 F = 0.000047 F - Calculate τ:
τ = 100,000 × 0.000047 = 4.7 seconds - Apply the rearranged time formula:
t = -4.7 × ln(1 - 3.3/5.0)
t = -4.7 × ln(1 - 0.66)
t = -4.7 × ln(0.34)
t = -4.7 × (-1.0788) = 5.07 seconds
Bench War Story: When the Math Meets Real-World Component Flaws
The charging of capacitor formula assumes ideal components. Real components have parasitics that will ruin your day if you ignore them. Here is a scenario from the bench that highlights the danger of high-impedance RC networks.
The Setup
I was designing a simple soft-start delay for a 12V relay. The goal was a 10-second delay before the relay clicked on. The circuit used an NPN transistor (2N2222) to switch the relay coil. The transistor turns on when the base-emitter voltage (VBE) reaches approximately 0.7V. The base was driven by an RC network connected to the 12V rail.
The Numbers
Using the rearranged formula to find the required RC time constant to reach 0.7V at 10 seconds:
RC = -10 / ln(1 - 0.7/12) = 166.2 seconds
To keep component sizes reasonable, I chose a 10 MΩ resistor and calculated the required capacitance:
C = 166.2 / 10,000,000 = 16.6 µF
I grabbed a standard 22 µF, 16V aluminum electrolytic capacitor from the bin, figuring the extra capacitance would just push the delay to about 13 seconds. I wired it up and applied power.
The Outcome
I waited 13 seconds. Then 30 seconds. Then a minute. The relay never triggered. I probed the capacitor with a multimeter and watched the voltage climb to 0.45V, stall out, and sit there indefinitely. It never reached the 0.7V threshold required to turn on the transistor.
What Went Wrong (and How to Fix It)
The math wasn't wrong; the component choice was. Aluminum electrolytic capacitors suffer from inherent leakage current, which acts as a high-value resistor in parallel with the ideal capacitor.
A cheap 22 µF electrolytic might have a leakage current spec of I = 0.01CV or a minimum of 3 µA. At 12V, a leakage of just 1.2 µA creates an equivalent parallel leakage resistance (Rleak) of 10 MΩ.
Because my series charging resistor was also 10 MΩ, the capacitor and the leakage path formed a 1:1 voltage divider. The maximum voltage the capacitor could ever reach was half the supply voltage (6V) in a perfect world, but in reality, transistor base current and higher-than-spec leakage clamped it at 0.45V.
The Fix: To maintain the ~166 second time constant while defeating the leakage current, I had to lower the impedance of the network. I swapped the 10 MΩ resistor for a 100 kΩ resistor and increased the capacitance to a 2,200 µF low-ESR electrolytic.
New RC = 100,000 × 0.0022 = 220 seconds.
Because the series resistance was now 100 times lower than the capacitor's leakage resistance, the leakage current became mathematically negligible. The voltage ramped cleanly past 0.7V, and the relay triggered reliably at 13.5 seconds. When using the charging of capacitor formula for timing circuits, always keep your series resistance below 1 MΩ to avoid the leakage trap.






