Electromagnetism

The RC Circuit

A resistor and capacitor that trade current for time — charging as V(t) = V₀(1 − e−t/RC)

An RC circuit is a resistor (R) and capacitor (C) wired together so the capacitor charges and discharges through the resistor along a smooth exponential curve — V(t) = V₀(1 − e−t/RC) when charging, V(t) = V₀·e−t/RC when discharging. The single number that governs the whole behaviour is the time constant τ = RC (ohms × farads = seconds): the capacitor reaches 63.2% of its final voltage in one τ and is 99.3% settled after five. Feed the same network an AC signal and it becomes a first-order filter with cutoff frequency fc = 1/(2πRC). RC networks were among the first analog computing elements and remain the workhorse of timing, smoothing, and frequency shaping in nearly every electronic device.

  • ChargingV(t) = V₀(1 − e−t/RC)
  • DischargingV(t) = V₀·e−t/RC
  • Time constantτ = RC (s = Ω × F)
  • One τ63.2% charged / 36.8% left
  • Settled~99.3% after 5τ
  • Cutoff frequencyf_c = 1/(2πRC)
  • Roll-off−20 dB/decade (first order)

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

Why the RC circuit matters

The RC circuit is the simplest circuit that has memory. A pure resistor responds instantly; a pure inductor and capacitor store energy but oscillate forever without loss. Put a resistor and a capacitor together and you get the archetypal first-order system: a network whose present state depends on its recent past, governed by a single exponential time scale. That one idea — an exponential approach to equilibrium set by a time constant — reappears everywhere, from cooling coffee to charging neurons, which is why an RC circuit is the canonical physical model taught alongside Newton's law of cooling and radioactive decay.

Practically, RC networks do three jobs that appear in almost every piece of electronics:

  • Timing. The predictable τ = RC delay drives the 555 timer, debounce circuits, one-shot pulses, and the reset lines that hold a microcontroller in check until its supply stabilises.
  • Filtering. An RC pair is the cheapest way to remove hum, smooth a rectified supply, roll off high-frequency noise, or block a DC offset — a low-pass or high-pass filter with a corner at fc = 1/(2πRC).
  • Smoothing and coupling. Decoupling capacitors, integrator/differentiator stages in op-amp circuits, and the AC coupling between amplifier stages are all RC networks in disguise.

How it works, step by step

Consider a DC source V₀, a resistor R, and an initially uncharged capacitor C in series, with a switch. The physics is one application of Kirchhoff's voltage law plus the defining relation of a capacitor.

1. Close the switch. At the instant t = 0 the uncharged capacitor holds zero volts, so the entire source voltage appears across the resistor. The initial current is the largest it will ever be:

I(0) = V₀ / R

2. Charge accumulates. That current pushes charge onto the capacitor plates. As charge Q builds up, the capacitor voltage VC = Q/C rises, which leaves less voltage across the resistor and so reduces the current. Slower current means slower charging — a self-limiting feedback that produces the characteristic exponential.

3. Write Kirchhoff's voltage law around the loop:

V₀ = I·R + Q/C,   with I = dQ/dt

Substituting I = dQ/dt gives a first-order linear differential equation:

R·(dQ/dt) + Q/C = V₀

Its solution for an initially uncharged capacitor is the charging law:

V_C(t) = V₀·(1 − e^(−t/RC))
I(t)   = (V₀/R)·e^(−t/RC)

4. Reach steady state. As t grows, e−t/RC → 0, so VC → V₀ and I → 0. The fully charged capacitor blocks DC entirely and behaves like an open circuit. Notice the final voltage is set by V₀ alone — R controls only how fast, never how far.

5. Discharge. Disconnect the source and connect the charged capacitor across the resistor. Now V₀ = 0 in the loop equation, and the capacitor drives its own current backward through R, decaying as:

V_C(t) = V₀·e^(−t/RC)

Symbols and units

SymbolQuantitySI unit
V₀Source / initial voltagevolt (V)
VC(t)Capacitor voltage at time tvolt (V)
I(t)Loop currentampere (A)
RResistanceohm (Ω)
CCapacitancefarad (F)
QCharge on capacitor (Q = C·VC)coulomb (C)
τ = RCTime constantsecond (s)
fc = 1/(2πRC)Cutoff frequencyhertz (Hz)
ωc = 1/RCAngular cutoff frequencyrad/s

The time constant and the 63% rule

Everything about an RC transient is scaled by τ = RC. Set t = τ in the charging law and the exponent becomes exactly −1:

V_C(τ) = V₀·(1 − e^(−1)) = V₀·(1 − 0.3679) = 0.632·V₀

So after one time constant the capacitor sits at 63.2% of its final voltage — the famous "63%" is nothing but the numerical value of 1 − 1/e. Each subsequent τ closes 63.2% of the remaining gap, giving the geometric progression below.

Elapsed timeCharging: V/V₀Discharging: V/V₀Fraction remaining
00%100%1
1 τ63.2%36.8%1/e
2 τ86.5%13.5%1/e²
3 τ95.0%5.0%1/e³
4 τ98.2%1.8%1/e⁴
5 τ99.3%0.7%1/e⁵

The engineering convention is that a capacitor is "fully charged" (or "fully discharged") after 5τ, when less than 1% of the transient remains. Two useful mental hooks: the initial slope of the charging curve, if extended in a straight line, would hit V₀ at exactly t = τ, and the half-life of an RC decay is t½ = τ·ln 2 ≈ 0.693·RC.

The RC circuit as a filter

Drive the network with a sinusoid instead of a step, and the capacitor's frequency-dependent reactance XC = 1/(2πfC) turns the RC pair into a frequency-selective filter. The behaviour flips depending on where you measure the output.

  • Low-pass filter (output across C). At low frequencies the capacitor's reactance is huge, so it drops most of the voltage and the output tracks the input. At high frequencies XC shrinks, the capacitor "shorts" the signal to ground, and the output falls. Low frequencies pass; high frequencies are attenuated.
  • High-pass filter (output across R). Swap R and C. Now the capacitor blocks low frequencies (large XC means little current, little voltage across R) and passes high ones. High frequencies pass; low frequencies are attenuated. This is exactly the AC-coupling capacitor between amplifier stages.

Both share the same corner. The cutoff (or −3 dB) frequency is where the capacitive reactance equals the resistance, XC = R:

f_c = 1 / (2π·R·C)      (hertz)
ω_c = 1 / (R·C) = 1/τ   (rad/s)

At fc the output amplitude is 1/√2 ≈ 0.707 of the input, so the delivered power is exactly halved — that is the meaning of the −3 dB point (since 10·log₁₀(½) ≈ −3.01 dB). The phase shift between input and output is 45° there. Above (low-pass) or below (high-pass) the corner, a single RC stage rolls off at −20 dB per decade, equivalently about −6 dB per octave. Cascading n independent RC stages steepens this to −20n dB/decade.

Design example: pick R and C for a target f_c

RCτ = RCf_c = 1/(2πRC)
10 kΩ100 µF1.0 s0.16 Hz
1 kΩ1 µF1.0 ms159 Hz
1.6 kΩ0.1 µF0.16 ms~1 kHz
10 kΩ1 nF10 µs15.9 kHz
1 kΩ100 pF0.1 µs1.59 MHz

Worked example

A 9 V battery charges a 100 µF capacitor through a 47 kΩ resistor. Find the time constant, the voltage after 3 seconds, and the initial current.

Time constant:

τ = R·C = 47,000 Ω × 100×10⁻⁶ F = 4.7 s

Voltage after 3 s (t/τ = 3/4.7 = 0.638):

V_C(3) = 9·(1 − e^(−0.638)) = 9·(1 − 0.528) = 9·0.472 ≈ 4.25 V

Initial current (t = 0, full source across R):

I(0) = V₀/R = 9 / 47,000 ≈ 191 µA

The capacitor will be ~99% charged (8.94 V) after 5τ ≈ 23.5 s. Notice how a modest 47 kΩ with a small 100 µF gives a multi-second delay — this is why large RC products are used for slow timing and small ones for high-frequency work.

JavaScript — RC circuit calculations

// Charging: capacitor voltage at time t
function chargeVoltage(V0, R, C, t) {
  const tau = R * C;
  return V0 * (1 - Math.exp(-t / tau));
}

// Discharging: capacitor voltage at time t
function dischargeVoltage(V0, R, C, t) {
  const tau = R * C;
  return V0 * Math.exp(-t / tau);
}

// Loop current while charging
function chargeCurrent(V0, R, C, t) {
  return (V0 / R) * Math.exp(-(t / (R * C)));
}

// Cutoff (corner) frequency of an RC filter, in Hz
function cutoffFrequency(R, C) {
  return 1 / (2 * Math.PI * R * C);
}

// Time to reach a target fraction of the final voltage (charging)
function timeToFraction(R, C, fraction) {
  return -R * C * Math.log(1 - fraction);  // fraction in (0,1)
}

const R = 47000;      // 47 kΩ
const C = 100e-6;     // 100 µF
const V0 = 9;         // volts

console.log(`tau = ${(R * C).toFixed(2)} s`);                       // 4.70 s
console.log(`V after 3 s = ${chargeVoltage(V0, R, C, 3).toFixed(2)} V`);  // 4.25 V
console.log(`I(0) = ${(V0 / R * 1e6).toFixed(0)} µA`);              // 191 µA
console.log(`f_c = ${cutoffFrequency(1600, 0.1e-6).toFixed(0)} Hz`); // ~995 Hz
console.log(`time to 99% = ${timeToFraction(R, C, 0.99).toFixed(1)} s`); // ~21.6 s (≈ 4.6τ)

// Energy accounting: charging C to V0 always dissipates 1/2 C V0^2 in R
const E_stored = 0.5 * C * V0 * V0;
console.log(`Stored = ${(E_stored * 1000).toFixed(2)} mJ, dissipated in R = same`); // 4.05 mJ each

Common misconceptions

  • "A bigger resistor charges the capacitor to a higher voltage." No. The final voltage is V₀, set by the source. R changes τ = RC (the speed), not the destination. At steady state the current is zero, so there is no IR drop.
  • "The capacitor charges linearly." It charges exponentially. The rate is fastest at t = 0 and continuously slows; only the very first instant is approximately linear (the initial slope V₀/τ).
  • "After one time constant it's fully charged." After 1τ it is only 63.2% charged. Full (99%+) takes about 5τ, and mathematically it never quite reaches V₀.
  • "Low-pass and high-pass need different components." They use the same R and C with the same fc = 1/(2πRC); only the output tap moves — across C for low-pass, across R for high-pass.
  • "Making R smaller wastes less energy while charging." The heat lost in R is always ½CV₀², independent of R. A smaller R just dumps the same energy faster as a larger current spike.
  • "An RC filter has a sharp cutoff." A single stage rolls off gently at −20 dB/decade with a 45° phase shift at the corner. Sharp "brick-wall" responses need higher-order (multi-pole) filters.
  • "Using Celsius, milliseconds, or microfarads inconsistently is fine." τ = RC only gives seconds when R is in ohms and C in farads. Mixing kΩ with µF (which conveniently gives milliseconds) is a common shortcut, but forgetting the unit scaling is a classic error.

A little history

The capacitor's ancestor, the Leyden jar, was demonstrated independently by Ewald von Kleist (1745) and Pieter van Musschenbroek (1746) at the University of Leiden, and its charging behaviour puzzled early experimenters precisely because it was not instantaneous. Georg Ohm published the resistor law V = IR in 1827, and Gustav Kirchhoff formulated his circuit laws in 1845, giving the tools to write the RC loop equation exactly. The exponential 1 − e−t/RC is the same mathematics Lord Kelvin (William Thomson) used in 1855 to model signal delay on submarine telegraph cables — his "law of squares" for cable retardation is an RC transmission-line result that governed the transatlantic cable of 1858 and 1866. Today the identical first-order response underlies the RC pull-up on every I²C bus and the reset timing of every microcontroller.

Frequently asked questions

What is the time constant of an RC circuit?

The time constant is τ = R·C, with R in ohms and C in farads giving τ in seconds. It is the time for the capacitor voltage to reach 63.2% (that is, 1 − 1/e) of its final value while charging, or to fall to 36.8% (1/e) while discharging. For example, R = 10 kΩ and C = 100 µF give τ = 1 second. A larger resistance or capacitance means a slower circuit.

Why is it 63% after one time constant?

Charging follows V(t) = V₀(1 − e^(−t/RC)). At t = τ = RC the exponent is −1, so V = V₀(1 − e^(−1)) = V₀(1 − 0.368) = 0.632·V₀. That is where the 63% comes from — it is just the value of 1 − 1/e, not a rounded engineering rule. After 2τ you reach 86.5%, after 3τ 95.0%, after 4τ 98.2%, and after 5τ 99.3%, which is why circuits are treated as fully settled after about five time constants.

How long does a capacitor take to fully charge?

Strictly, never — the exponential approach means V(t) only reaches V₀ as t → ∞. In practice a capacitor is considered fully charged after about 5τ, when it sits at 99.3% of the supply voltage, close enough that the remaining difference is negligible. With τ = RC, five time constants is 5RC. So a 1 kΩ resistor charging a 1 µF capacitor (τ = 1 ms) is settled in roughly 5 ms.

What is the difference between an RC low-pass and high-pass filter?

It depends on where you take the output. If the output is across the capacitor, high frequencies are shorted to ground and low frequencies pass — a low-pass filter. If the output is across the resistor, low frequencies are blocked by the capacitor's high impedance and high frequencies pass — a high-pass filter. Both share the same cutoff frequency f_c = 1/(2πRC), where the output power is halved (−3 dB) and the phase shift is 45°.

What is the cutoff frequency of an RC filter?

The cutoff (corner) frequency is f_c = 1/(2πRC) in hertz, equivalently the angular cutoff ω_c = 1/RC = 1/τ in rad/s. At f_c the output amplitude is 1/√2 ≈ 0.707 of the input, meaning the output power drops to half (−3 dB). Beyond f_c a single-stage RC filter rolls off at 20 dB per decade (about 6 dB per octave). For R = 1.6 kΩ and C = 0.1 µF, f_c ≈ 1 kHz.

Does the resistor value change the final capacitor voltage?

No. In a simple series RC circuit driven by a DC source, the capacitor eventually charges to the full source voltage V₀ regardless of R, because at steady state no current flows and there is no IR drop across the resistor. The resistor only sets how fast you get there (through τ = RC), not where you end up. Once fully charged the capacitor blocks DC entirely and behaves like an open circuit.

How much energy is lost charging a capacitor through a resistor?

Exactly half the energy delivered by the source is dissipated as heat in the resistor, independent of the resistance value. Charging a capacitor C to voltage V₀ stores E_cap = ½CV₀² in the capacitor, while the source supplies Q·V₀ = CV₀². The difference, ½CV₀², is turned into heat in R. This is a famous surprise: the 50% loss holds even as R → 0, because a smaller R just delivers the same heat in a shorter, larger current burst.