Understanding the RC time constant calculator — concept and principle
This calculator finds the time constant τ of a resistor–capacitor circuit and uses it to predict the capacitor voltage at any moment while charging or discharging, the time needed to reach 99% of the final value, and the −3 dB cut-off frequency of the same RC pair used as a filter. It is used for delays, reset networks, switch debouncing and simple filters.
How it is calculated
- Time constant: τ = R · C, with R in ohms and C converted from µF to farads (× 10⁻⁶), giving seconds.
- Charging: v(t) = V · (1 − e^(−t/τ)).
- Discharging (from V): v(t) = V · e^(−t/τ).
- Time to 99%: t = τ · ln(100) ≈ 4.605 τ.
- Cut-off frequency: f_c = 1 / (2πτ) = 1 / (2πRC).
The principle
The charging current flows through the resistor, so it equals (V − v)/R. That current is also C · dv/dt, the rate at which charge builds on the capacitor. Setting them equal gives a differential equation whose solution is an exponential approach to V. The key idea is that the speed of charging is proportional to the remaining gap: as the capacitor fills, the voltage across the resistor shrinks, the current drops and charging slows. After one τ, the gap has shrunk to 1/e ≈ 36.8% of its starting size, so the capacitor reaches about 63.2%. Each further τ again multiplies the gap by 0.368: about 86.5% after 2τ, 95.0% after 3τ and 99.3% after 5τ. In a filter, the same τ sets the frequency where the capacitor's reactance equals R and the output falls to 1/√2 of the input.
Worked example
- Inputs: R = 10,000 Ω, C = 100 µF, V = 5 V, t = 1 s.
- τ = 10,000 × 100 × 10⁻⁶ = 1 s.
- Charging: 5 × (1 − e^(−1)) = 5 × 0.632121 = 3.1606 V.
- Discharging: 5 × e^(−1) = 5 × 0.367879 = 1.8394 V.
- Time to 99%: 1 × ln 100 = 4.6052 s.
- Cut-off: 1 ÷ (2π × 1) = 0.15915 Hz.
| Resistance (Ω) | τ = RC (s) |
|---|---|
| 2,500 | 0.25 |
| 5,000 | 0.5 |
| 7,500 | 0.75 |
| 10,000 | 1 |
| 12,500 | 1.25 |
| 15,000 | 1.5 |
| 20,000 | 2 |
How to read the result
Engineers usually treat a capacitor as fully charged after 5τ. If t is much shorter than τ, the voltage rises almost linearly; if t is many τ, the voltage is effectively at its final value. A filter passes frequencies well below f_c and attenuates those well above it by about 20 dB per decade.
Common mistakes
- Entering capacitance in farads into the µF field, or forgetting kΩ means × 1000.
- Expecting the capacitor to reach exactly V. In theory it only approaches V; in practice 5τ is close enough.
- Ignoring source and load resistance, which change the effective R and τ.
Frequently asked questions
Why is 63.2% the magic number?
It equals 1 − 1/e, the fraction reached after exactly one time constant in any first-order exponential process.
How do I get a specific delay, for example reaching 50%?
Solve t = −τ · ln(1 − fraction). For 50%, t = τ · ln 2 ≈ 0.693 τ.
Is the cut-off frequency the same for a high-pass filter?
Yes. Swapping R and C positions turns the low-pass into a high-pass with the same f_c = 1/(2πRC).
Sources: C. K. Alexander and M. N. O. Sadiku, Fundamentals of Electric Circuits, McGraw-Hill, chapter on first-order circuits · P. Horowitz and W. Hill, The Art of Electronics, 3rd ed., Cambridge University Press