The fundamental equation for charging and discharging of capacitor circuits dictates how voltage and current change over time when a DC source is applied or removed through a resistor. For a capacitor charging from zero initial voltage, the voltage at time t is V(t) = Vs(1 - e-t/RC). For a capacitor discharging through a resistor, the voltage is V(t) = V0e-t/RC. These exponential relationships form the backbone of timing circuits, filters, and power supply smoothing.
On the bench, memorizing the formula isn't enough; you need to know how to rearrange it to select components, track your units to avoid magnitude errors, and understand the physical assumptions baked into the math. Below is the complete reference for RC time-domain analysis.
The Core Equations and Symbol Definitions
The behavior of an RC (Resistor-Capacitor) network is governed by four primary equations covering voltage and current for both charging and discharging phases. The term RC (Resistance × Capacitance) is known as the time constant, denoted by the Greek letter tau (τ). One time constant represents the time it takes for the capacitor to charge to ~63.2% of the source voltage, or discharge to ~36.8% of its initial voltage.
| Symbol | Parameter Name | SI Unit | Typical Hobbyist Range |
|---|---|---|---|
| V(t) | Voltage across capacitor at time t | Volts (V) | 0V to 50V |
| Vs | Source / Supply Voltage (Charging) | Volts (V) | 3.3V, 5V, 12V, 24V |
| V0 | Initial Voltage (Discharging) | Volts (V) | 5V to 400V |
| I(t) | Current through the circuit at time t | Amperes (A) | µA to mA |
| R | Resistance | Ohms (Ω) | 100Ω to 10MΩ |
| C | Capacitance | Farads (F) | pF to mF (10-12 to 10-3) |
| t | Time elapsed | Seconds (s) | µs to minutes |
| e | Euler's number (mathematical constant) | Dimensionless | ~2.71828 |
Real-World Component Data and Time Constants
Before solving abstract math, it helps to ground the equation for charging and discharging of capacitor networks in real component values. The table below maps common resistor-capacitor pairings to their time constants (τ = R × C) and their practical applications. Note that it takes approximately 5τ for a capacitor to be considered fully charged or discharged (reaching 99.3% of the final state).
| Resistance (R) | Capacitance (C) | Time Constant (τ) | Full Charge Time (5τ) | Typical Application |
|---|---|---|---|---|
| 10 kΩ | 100 µF | 1.0 second | 5.0 seconds | Switch debouncing, soft-start delays |
| 1 MΩ | 10 µF | 10.0 seconds | 50.0 seconds | Long-duration 555 timer intervals |
| 100 Ω | 1000 µF (1mF) | 0.1 seconds | 0.5 seconds | Power supply ripple filtering |
| 1 kΩ | 1 nF | 1.0 microsecond | 5.0 microseconds | Audio signal coupling, high-pass filters |
| 10 kΩ | 10 pF | 100 nanoseconds | 500 nanoseconds | RF bypass, high-speed logic edge shaping |
Rearranged Forms for Circuit Design
On the workbench, you rarely calculate V(t) from scratch; usually, you know the target voltage and time, and you need to select R or C. According to LibreTexts University Physics, algebraic manipulation of the natural logarithm (ln) allows us to isolate any variable. Here are the rearranged forms you will actually use:
Solving for Time (t)
- Charging: t = -R × C × ln(1 - [V(t) / Vs])
- Discharging: t = -R × C × ln(V(t) / V0)
Solving for Resistance (R)
- Charging: R = -t / [C × ln(1 - [V(t) / Vs])]
- Discharging: R = -t / [C × ln(V(t) / V0)]
Solving for Capacitance (C)
- Charging: C = -t / [R × ln(1 - [V(t) / Vs])]
- Discharging: C = -t / [R × ln(V(t) / V0)]
Worked Examples with Unit Tracking
The most common point of failure in RC calculations is unit mismanagement. The equations strictly require base SI units: Ohms, Farads, Seconds, and Volts. Below are two step-by-step bench scenarios.
Problem 1: ESP32 Brownout Delay (Charging)
Scenario: You are designing a soft-start circuit. A 5V USB source charges a capacitor through a 47 kΩ resistor. The ESP32's EN (enable) pin triggers when the voltage reaches 3.3V. The capacitor is 22 µF. How long after power is applied does the microcontroller boot?
- Convert to base SI units:
Vs = 5 V
V(t) = 3.3 V
R = 47,000 Ω (47 kΩ)
C = 0.000022 F (22 µF) - Calculate the time constant (τ):
τ = R × C = 47,000 × 0.000022 = 1.034 seconds - Apply the rearranged charging time formula:
t = -τ × ln(1 - [V(t) / Vs])
t = -1.034 × ln(1 - [3.3 / 5])
t = -1.034 × ln(1 - 0.66)
t = -1.034 × ln(0.34) - Calculate the natural log and final time:
ln(0.34) ≈ -1.0788
t = -1.034 × -1.0788 = 1.115 seconds
Result: The ESP32 will remain held in reset for approximately 1.12 seconds after 5V is applied.
Problem 2: Camera Flash Dump (Discharging)
Scenario: A xenon flash tube is triggered, dumping a 330 µF capacitor initially charged to 300V. The plasma inside the tube acts as a dynamic resistor, but for this approximation, we model it as a constant 15 Ω load. What is the voltage across the capacitor 4 milliseconds after the flash triggers?
- Convert to base SI units:
V0 = 300 V
R = 15 Ω
C = 0.00033 F (330 µF)
t = 0.004 s (4 ms) - Calculate the time constant (τ):
τ = R × C = 15 × 0.00033 = 0.00495 seconds (4.95 ms) - Apply the discharging voltage formula:
V(t) = V0 × e-t / τ
V(0.004) = 300 × e-0.004 / 0.00495
V(0.004) = 300 × e-0.808 - Calculate the exponential and final voltage:
e-0.808 ≈ 0.4457
V(0.004) = 300 × 0.4457 = 133.7 V
Result: After 4ms, the capacitor still holds roughly 134V, highlighting why camera flash circuits remain lethal even after the visible light stops.
Boundary Conditions, Assumptions, and Unit Traps
The standard equation for charging and discharging of capacitor circuits is an idealized mathematical model. As Georgia State University's HyperPhysics notes, real-world components introduce parasitics that deviate from the pure exponential curve. Understanding these boundaries prevents design failures.
When the Formula Applies (and When it Doesn't)
- Constant DC Source: The charging equation assumes Vs is a stiff, ideal DC voltage. If your power supply sags under the initial inrush current (common with weak bench supplies or high-ESR batteries), the actual charge time will be longer than calculated.
- Purely Resistive Load: The formula assumes R is a fixed, linear resistor. If you are charging a capacitor through a diode, a transistor, or a non-linear load like an LED, the resistance changes with voltage, and the simple RC equation becomes invalid. You must use piecewise approximation or SPICE simulation.
- Zero Initial Charge: The standard charging formula V(t) = Vs(1 - e-t/RC) assumes the capacitor starts at exactly 0V. If the capacitor has a residual charge (Vinitial), the generalized formula is V(t) = Vinitial + (Vs - Vinitial)(1 - e-t/RC).
The Unit Mistakes That Break Calculations
If your calculated time constant seems physically impossible, you have almost certainly fallen victim to a prefix error. The equation demands Farads and Ohms.
- The Microfarad Trap: Capacitors are rarely labeled in base Farads. A 100µF capacitor is 0.0001 F. If you plug '100' into the C variable, your calculated time constant will be one million times too large.
- The Kilohm Trap: Resistors are often in kΩ or MΩ. 10kΩ must be entered as 10,000. If you enter '10', your time constant will be 1,000 times too small.
- The Millisecond Trap: When solving for 't', the output is strictly in seconds. If your answer is 0.005, that is 5 milliseconds, not 5 seconds.
Realistic Answer Magnitudes
Developing an intuition for realistic magnitudes is a hallmark of bench experience. In standard low-voltage hobbyist and commercial PCB design (3.3V to 24V logic/power), RC time constants usually fall between 1 microsecond and 10 seconds.
If you are designing a simple LED fade circuit or a debounce filter and your math yields a τ of 4,500 seconds, stop and check your unit conversions. Conversely, if you are calculating the discharge time of a high-voltage power supply bleeder resistor and get 0.0002 seconds, verify that you didn't accidentally use microfarads instead of farads for your bulk filter caps. Trust the math, but verify the magnitude against physical reality.






