Skip to content
ScienceQuest

RC Charge and Discharge Simulator

SimulatorSchool Updated

Support ScienceQuest on Buy Me a Coffee (opens in a new tab)

Watch a capacitor charge and discharge through a resistor. Adjust R, C and the supply to see what moves the time constant and what leaves it alone.

Simulator

Time constant
R times C. Independent of the supply voltage.
100 ms
Capacitor now
0 percent of the way there.
0 V
Current now
5 mA
Resistor now
The supply minus the capacitor, at every instant.
5 V
Stored energy
Ends at 1.25 mJ.
0 mJ
Charging efficiency
Exactly half the supplied energy always becomes heat, whatever the resistance.
50 %
Parameters
ohm
uF

Microfarads. Together with R this sets the time constant, and nothing else does.

V

Changes the voltages and the current, but not the time constant.

  • Capacitor
  • Resistor
Voltage across the capacitor and the resistor. They always sum to the supply while charging, because there is nowhere else for it to be.
Cite this tool

Citing this tool

Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.

On the syllabus: AP Physics 2, Unit 11: Electric Circuits.

Teaching with this? You can put it on a class page or LMS for free, with no ads inside the frame. Get the embed code.

The equation

VC(t)=V0(1−e−t/RC)V_C(t) = V_0\left(1 - e^{-t/RC}\right)

Exponential RC response, from Kirchhoff’s laws

What are the RC circuit charging and discharging formulas?

In a series resistor-capacitor (RC) circuit, capacitor voltage during charging is V(t) = V0(1 − e−t / RC), where V0 is the supply voltage, reaching 63.2% of it after one time constant τ = RC. During discharging through a resistor, the voltage decays exponentially from its starting value V0: V(t) = V0 · e−t / RC.

Where the exponential comes from

The circuit is a loop, so at every instant the supply voltage has to be split between the resistor and the capacitor. An empty capacitor takes none of it, leaving all of the supply across the resistor, which by Ohm’s law gives the largest current the circuit will ever carry: V/R.

That current carries charge onto the capacitor, so its voltage rises, which leaves less for the resistor, which reduces the current, which slows the charging. The rate of progress is proportional to the distance left to go, the defining property of exponential approach, so the curve is steep at the start and flattens out without ever reaching the supply voltage.

What the time constant means

The time constant τ = RC is the time to cover 63.2 percent of the remaining gap, from any starting point. The figure is 1 - 1/e, and it does not depend on the component values, so the table below holds for every RC circuit.

Progress in multiples of the time constant
ElapsedChargingDischarging
1τ63.2%36.8% left
2τ86.5%13.5% left
3τ95.0%5.0% left
5τ99.3%0.7% left

The supply voltage is missing from RC. Raise it and every voltage and current in the circuit scales up in proportion, so the fraction completed at any moment is unchanged. Move the Supply slider and the Time constant readout stays put while the voltages change.

Charging always wastes exactly half the energy

The supply pushes a total charge of Q = CV around the loop at a fixed potential difference V, so the energy it delivers is QV = CV². The capacitor ends up storing ½CV², half as much. Its own voltage climbed from zero to V while it filled, so on average it opposed only half the supply. Everything not stored went into the resistor as heat.

No resistance appears anywhere in that argument. Halving R charges the capacitor twice as fast, and the resistor still dissipates the same total energy in half the time. No choice of components improves the efficiency of this circuit. Switched-mode converters avoid the loss by moving energy through an inductor instead of charging capacitors straight from a fixed voltage through a resistor.

Discharging is the same curve, reversed

Switch to discharging and the supply leaves the loop. The capacitor is now the only source, driving current backwards through the resistor, and its voltage decays on the same exponential.

The current reverses direction, which you miss if you watch only the capacitor voltage. The time constant is unchanged, because the supply never entered it: the same RC governs filling and emptying.

Common mistakes

  • Thinking a bigger supply charges faster. It raises the current and the target in the same proportion. The time to any given percentage is identical.
  • Treating five time constants as fully charged. It is 99.3 percent, and the curve never reaches the supply. For most purposes that is close enough, and calling it full is a convention.
  • Mixing up the units of capacitance. Capacitors are often labelled in microfarads, and the formula wants farads. A 100 µF capacitor is 10⁻⁴ F, and treating the 100 as farads moves the time constant by six orders of magnitude.
  • Expecting a lower resistance to be more efficient. It charges faster, and the resistor dissipates the same total energy either way.
  • Expecting overshoot. An RC circuit is first order and cannot overshoot its target. For ringing you need an inductor, which the RLC Circuit Simulator adds.

Model and assumptions

The method, what it assumes and how accurate it is
Method
Exact expression, no time stepping
Repeatability
Deterministic. The same link gives the same numbers on any machine.

What it assumes

  • First order and exactly solvable, so the voltage is the analytic exponential rather than a numerical approximation.
  • Deliberately not the RLC model with the inductor set to zero: that would divide by the inductance and replace an exact answer with an estimate.
  • Ideal resistor and capacitor with no leakage and no equivalent series resistance.

Numerical accuracy

No method error to report: the result is a closed-form expression evaluated directly, with no time stepping to accumulate error. What remains is double-precision rounding, of order one part in 10^16 per operation.

Common questions

Why does the supply voltage not change the time constant?

Because it changes the destination and the starting current in the same proportion. A bigger supply means more charge to move, but it also pushes harder, so the fraction of the way there after any given time is identical. The time constant is RC and nothing else appears in it.

What does the time constant actually mean?

It is the time to get 63.2 percent of the way to the final value, which is one minus one over e. After two it is 86.5 percent, after three 95.0, after five 99.3. Those percentages are the same for every R and C, which is what makes the time constant a useful single number.

Does the capacitor ever finish charging?

No. The curve is exponential, so it approaches the supply without reaching it, and there is always a little further to go. Five time constants is an engineering convention rather than a physical fact: at 99.3 percent the remainder stops mattering for most purposes.

Why is charging only 50 percent efficient?

The supply moves a charge of CV through a fixed potential difference V, so it delivers CV squared. The capacitor keeps half of that, because its own voltage climbed from zero to V while filling rather than sitting at V the whole time. The difference becomes heat in the resistor. No resistance appears in that argument, which is why the answer is one half whatever R you pick.

Why is the current largest at the very start?

An empty capacitor puts up no opposition, so at the instant the switch closes the full supply is across the resistor and the current is simply V over R. As the capacitor fills its voltage takes a growing share, leaving less across the resistor, so the current decays on exactly the same exponential.

How is this different from the RLC simulator?

An RC circuit is first order and can only approach its final value. Adding an inductor makes the system second order, which introduces overshoot and ringing, so it can oscillate around the target instead of creeping up to it. Use the RLC simulator for that behaviour and this one for the plain exponential.