PortDock

RC Time Constant & Cut-off Frequency Calculator

RC time constant τ, charge and discharge times (63 %, 99 %), first-order low-pass cut-off frequency, attenuation and phase, and R or C for a target cut-off.

Results
Time constant τ = R × C
Cut-off frequency fc
10 → 90 % rise time
To 99 % (≈ 4.6 τ)
Charged / left after discharge at t
Attenuation at f
Phase at f
C for fc with this R
R for fc with this C

The defaults (10 kΩ, 100 nF) are an example. Capacitor tolerance and temperature behaviour, and the next stage's input resistance, change the real result.

Results update as you type. Everything runs in your browser; nothing you type is sent anywhere.

Formulas

  • τ = R × C (Ω × F = s)
  • Charge: Vc(t) = V × (1 − e^(−t/τ)), discharge: Vc(t) = V × e^(−t/τ)
  • Time to fraction x: t = −τ × ln(1 − x), 10→90 % rise = τ × ln 9 ≈ 2.2 τ
  • fc = 1 ÷ (2π × R × C)
  • |H(f)| = 1 ÷ √(1 + (f/fc)²), dB = −10 × log10(1 + (f/fc)²), phase = −atan(f/fc)

Multiples of τ and charge

TimeCharged (%)Left after discharge (%)
0.5 τ39.360.7
1 τ63.236.8
2 τ86.513.5
3 τ95.05.0
4 τ98.21.8
5 τ99.30.7

Reading a first-order low-pass filter

  • At the cut-off frequency the output is 1/√2 of the input (−3.01 dB) and the phase is −45°. Ten times higher it is about −20 dB, a hundred times about −40 dB: 20 dB per decade.
  • Below the cut-off the attenuation is not zero: at half of fc it is about −0.97 dB (89 %), so keep the signal band well below fc.
  • The output lags by τ. Following a step to 99 % takes about 4.6 τ, so do not push fc too low on inputs that must respond quickly.

Where it is used

  • Noise filter in front of an ADC: the ATmega328P datasheet (§23.6.1) advises removing components above the Nyquist frequency (f_ADC/2) with a low-pass filter. The same section asks for a source impedance of about 10 kΩ or less, so do not make R too large.
  • Debouncing switch inputs or delaying a reset is about time, so look at τ and the charge fraction rather than the cut-off.
  • When filtering PWM into an analog voltage, the attenuation at the PWM frequency sets the remaining ripple (a first-order filter leaves |H| of it).

FAQ

What are τ and fc for 10 kΩ and 100 nF?

τ = 10,000 × 100 × 10⁻⁹ = 1 ms and fc = 1 ÷ (2π × 1 ms) ≈ 159 Hz.

What percentage is one time constant?

Charging reaches 1 − e⁻¹ ≈ 63.2 %; discharging leaves e⁻¹ ≈ 36.8 %. 95.0 % at 3τ and 99.3 % at 5τ.

What fc cuts 50 Hz noise to 1/10?

A first-order filter has |H| = 0.1 at f/fc = √99 ≈ 9.95, so fc ≈ 5 Hz. The response slows to match (τ ≈ 32 ms), so decide together with the signal speed.

What changes when I connect a load after the filter?

The next stage's input resistance in parallel with C divides the output and shifts fc. Choose an input resistance much larger than R or add a buffer.

For ADC resolution and engineering units, use the ADC Resolution & Scaling Calculator. For standard resistor values, use the Voltage Divider Calculator. For capacitor reactance at a frequency and LC resonance, use the Reactance & LC Resonance Calculator.

Basis

τ, the charge curve, cut-off, attenuation and phase are computed from circuit definitions. The ADC input filter advice follows Microchip's ATmega328P datasheet (7810D) §23.6.1 Analog Input Circuitry. Check component tolerances in their datasheets.