A capacitor stores energy in an electric field. Put a resistor in its charging path, and the pair also gives a circuit a characteristic timescale.
The time constant
For an ideal resistor-capacitor circuit, the time constant is
Resistance is measured in ohms and capacitance in farads, so the result is in seconds. A resistor and a capacitor give a time constant of one second.
If the capacitor starts uncharged and is connected through that resistor to an ideal constant voltage source, its voltage follows
After one time constant, the voltage is about 63.2% of the source voltage. After five time constants, it is about 99.3%. It approaches the final voltage gradually rather than reaching it at an exact cutoff time.
Why does charging slow down?
Initially, the voltage across the resistor is large. As the capacitor charges, its voltage rises, leaving less voltage across the resistor. Ohm’s law then gives a smaller charging current.
This feedback between voltage and current produces the exponential curve. The same kind of mathematical behaviour appears in many first-order systems, including simplified thermal models.
Try the calculation
from math import exp
resistance = 10_000 # ohms
capacitance = 100e-6 # farads
supply = 3.3 # volts
tau = resistance * capacitance
for t in [0, 1, 2, 3, 5]:
voltage = supply * (1 - exp(-t / tau))
print(f"{t}s: {voltage:.3f} V")
Real components add wrinkles
Capacitance tolerance, leakage, source resistance, and any connected load can change the measured response. An RC network is useful for delays and filtering, but it is not automatically a precision clock.