The Charging Capacitor Formula: Direct Answer & Symbol Key

When a DC voltage is applied to a series resistor-capacitor (RC) network, the voltage across the capacitor does not rise instantly. It follows an exponential curve dictated by the charging capacitor formula:

Vc(t) = Vs (1 - e-t / RC)

This equation calculates the exact voltage across the capacitor at any given moment. The current flowing through the circuit during this charge phase is described by the derivative form: I(t) = (Vs / R) * e-t / RC.

Table 1: Symbol Definitions and Standard Units
Symbol Definition Standard SI Unit Realistic Hobby Magnitude
Vc(t) Voltage across the capacitor at time t Volts (V) 0V to 24V
Vs Source (supply) voltage Volts (V) 3.3V, 5V, 12V
t Time elapsed since voltage was applied Seconds (s) 1ms to 10s
R Series resistance Ohms (Ω) 1kΩ to 1MΩ
C Capacitance Farads (F) 100pF to 10,000µF
e Euler’s number (mathematical constant) Dimensionless ≈ 2.71828
τ (tau) Time constant (R × C) Seconds (s) 1ms to 5s

A critical benchmark for realistic magnitudes is the 5τ (five time-constant) rule. At t = 5τ, the capacitor reaches 99.3% of Vs. In practical DC circuit design, we consider the capacitor "fully charged" at 5τ. If your calculated 5τ is 45 seconds, but your microcontroller expects a 5ms debounce, your component values are off by orders of magnitude.

Assumptions, Limits, and the Unit Traps That Break It

The charging capacitor formula is an idealized mathematical model. It applies strictly under the following assumptions:

  • Ideal DC Step Input: Vs transitions from 0V to its target voltage instantaneously.
  • Lumped Components: The resistance and capacitance are discrete, ideal components.
  • Zero Initial Charge: The capacitor starts at exactly 0V. (If it starts at V0, the formula shifts to Vc(t) = Vs - (Vs - V0)e-t/RC).

Where the Formula Fails in the Real World

At high frequencies or high-current pulses, parasitic elements dominate. Every real capacitor has Equivalent Series Resistance (ESR) and Equivalent Series Inductance (ESL). If you are charging a bank of low-ESR ceramic capacitors directly from a lithium cell with minimal wire resistance, the initial current spike is limited by ESL and trace inductance, not just your intentional series resistor. The formula will accurately predict the long-tail RC charge, but it will completely miss the initial high-frequency ringing.

⚠️ The Unit Trap: 90% of calculation errors in RC circuits come from failing to convert sub-multiples to base SI units. You cannot plug 100 into the formula for a 100µF capacitor. You must plug in 0.0001 (or 100 × 10-6). Similarly, 50ms must be entered as 0.05 seconds. Always convert to Farads, Ohms, and Seconds before calculating.

Rearranged Forms: Solving for R, C, and t

In bench work, you rarely need to find Vc. Usually, you know your target voltage threshold and your time delay, and you need to select the resistor or capacitor. Here are the algebraically rearranged forms, derived by isolating the target variable using the natural logarithm (ln):

  • Solve for Time (t):
    t = -R * C * ln(1 - (Vc / Vs))
  • Solve for Resistance (R):
    R = -t / (C * ln(1 - (Vc / Vs)))
  • Solve for Capacitance (C):
    C = -t / (R * ln(1 - (Vc / Vs)))

For a deeper theoretical breakdown of the calculus behind these derivations, refer to the RC Charging Circuit tutorial on Electronics Tutorials.

Worked Examples with Strict Unit Tracking

Let’s run two common bench scenarios, tracking every unit conversion to ensure the math holds up.

Example 1: Finding Voltage at a Specific Time

Scenario: You have a 5V rail, a 10kΩ series resistor, and a 100µF capacitor. What is the voltage across the capacitor exactly 0.5 seconds after power is applied?

  1. Convert to base units:
    Vs = 5V
    R = 10,000 Ω
    C = 100 × 10-6 F = 0.0001 F
    t = 0.5 s
  2. Calculate the time constant (τ):
    τ = R × C = 10,000 × 0.0001 = 1.0 second.
  3. Apply the formula:
    Vc(0.5) = 5 * (1 - e-0.5 / 1.0)
    Vc(0.5) = 5 * (1 - e-0.5)
    Vc(0.5) = 5 * (1 - 0.60653)
    Vc(0.5) = 5 * 0.39347
  4. Final Answer: 1.967 V

Example 2: Sizing a Resistor for a Target Delay

Scenario: You need a 12V relay to trigger when a capacitor reaches 9V. You have a 47µF capacitor and need this to happen exactly 200ms after the switch is closed. What resistor value do you need?

  1. Convert to base units:
    Vs = 12V
    Vc = 9V
    C = 47 × 10-6 F = 0.000047 F
    t = 200 × 10-3 s = 0.2 s
  2. Select the rearranged formula for R:
    R = -t / (C * ln(1 - (Vc / Vs)))
  3. Calculate the logarithmic term:
    Vc / Vs = 9 / 12 = 0.75
    1 - 0.75 = 0.25
    ln(0.25) ≈ -1.38629
  4. Solve for R:
    R = -0.2 / (0.000047 * -1.38629)
    R = -0.2 / -0.000065155
    R ≈ 3069.6 Ω
  5. Final Answer: The exact mathematical value is 3069.6 Ω. In practice, you would select a standard E24 5% resistor of 3.0kΩ (yielding a slightly faster 195ms delay) or an E96 1% resistor of 3.09kΩ for precision.

Decision Path: Sizing R and C for an ESP32 GPIO Delay

Let’s terminate the theory in a concrete hardware decision. Suppose you are designing a soft-start or power-on delay for an ESP32 GPIO pin. You want the pin to read as a logical HIGH exactly 500ms after the 3.3V rail stabilizes.

Table 2: ESP32 GPIO Delay Decision Matrix
Design Parameter Value / Constraint Reasoning
Source Voltage (Vs) 3.3V ESP32 logic level rail.
Target Voltage (Vc) 2.475V ESP32 VIH (High-level input voltage) is typically 0.75 × VDD. (0.75 × 3.3 = 2.475V).
Target Time (t) 0.5s (500ms) Required power-on delay before peripheral initialization.
Capacitor Choice (C) 10µF Selected to be large enough to ignore stray PCB capacitance (~20pF), but small enough to avoid massive inrush currents.

Step-by-Step Component Selection

  1. Calculate Required Resistance:
    Using the rearranged formula: R = -0.5 / (10e-6 * ln(1 - (2.475 / 3.3)))
    1 - (2.475 / 3.3) = 0.25
    ln(0.25) = -1.38629
    R = -0.5 / (10e-6 * -1.38629) = 36,066 Ω
  2. Select the Resistor:
    We need 36.066kΩ. A standard 5% E24 value of 36kΩ is close, but GPIO thresholds can vary slightly with temperature. To guarantee the 500ms mark, we select a 1% tolerance E96 metal film resistor. The exact E96 value is 36.0kΩ.
  3. Select the Capacitor Chemistry:
    Do not use an aluminum electrolytic capacitor here. Electrolytics have high leakage currents (often modeled as a parallel resistor) which will alter the charge curve and cause the delay to stretch unpredictably. You must use a Multi-Layer Ceramic Capacitor (MLCC) with an X7R dielectric. X7R offers stable capacitance across temperature, unlike Y5V which can lose 50% of its capacitance at room temperature under DC bias.
✅ Final BOM Pick:
Resistor: Yageo MF1/4WCT52R3602F (36.0kΩ, 1/4W, 1% Metal Film)
Capacitor: Murata GRM21BR71A106KE51L (10µF, 10V, X7R, 0805 MLCC)
Wire them in series from the 3.3V rail to GND, and tap the junction directly to your target ESP32 GPIO pin.