← thecodex.expert
Simulations Hub Capacitance (Concept)
Overview Simulation The Physics Sources
Simulation · Electromagnetism

RC Circuit Simulation

Reading time: 6 minConfidence: HighLast verified: July 2026

This simulation plots the exponential charging and discharging curves of a resistor-capacitor (RC) circuit in real time, letting you adjust resistance, capacitance, and supply voltage and see how the time constant τ = RC controls the speed of charge and discharge.

Interactive simulation

Time constant τ: — ms
Capacitor voltage: — V
Circuit current: — mA
Elapsed time: — ms

The physics behind this simulation

When a capacitor charges through a resistor from a supply voltage V₀, its voltage follows an exponential approach to the supply voltage:

V_C(t) = V₀(1 − e⁻ᵀ¹ₕᵀ⁾⁾ᵏₕ⁾⁾ₕₕ),   τ = RC

When discharging (supply disconnected, capacitor discharging through the resistor), the voltage instead decays exponentially from its starting value toward zero: V_C(t) = V₀e⁻ᵀ¹ₕᵀ⁾⁾ᵏₕ⁾⁾ₕₕ. In both cases, τ = RC (the time constant) is the time for the voltage to close roughly 63% of the remaining gap to its final value — a single, convenient number capturing how "fast" a given RC circuit responds.

Common mistakeThe capacitor never mathematically reaches exactly full charge (or exactly zero on discharge) in finite time — the exponential only approaches its limit asymptotically. In practice, after about 5τ, the capacitor is charged (or discharged) to over 99% of its final value, which is why "5 time constants" is the usual practical rule of thumb for "fully charged" in circuit design.

Sources

  • Halliday, D., Resnick, R., Walker, J. (2013). Fundamentals of Physics, 10th ed. Wiley, Ch. 27.
Last verified: July 2026 · Source: Halliday, Resnick & Walker (2013) · Confidence: high