What the calculator does
A resistor in series with a signal and a capacitor from the far end to ground is a first-order low-pass filter: it passes slow changes and DC, and progressively attenuates anything faster than its cutoff frequency. The calculator takes R and C and gives the time constant, the −3 dB cutoff, and how much of a particular frequency gets through, as a ratio, in decibels and with its phase shift. Turned around, it takes a target cutoff and one of the parts and finds the other, rounded to the nearest E12, E24 or E96 value, then reports the cutoff you actually get. It also gives the step response, the time the output takes to reach 63.2 %, 90 %, 95 %, 99 % and 99.9 % of a sudden change, because in most real uses of an RC filter (debouncing, smoothing, PWM to DC) the settling time is the number that decides the design.
Formula
|H(f)| = 1 ÷ √(1 + (f ÷ fc)²) A(f) = 20 log10 |H(f)| dB φ(f) = −arctan(f ÷ fc)
Step response: v(t) = Vstep × (1 − e−t/τ) t(x) = −τ × ln(1 − x) t10–90 % = τ × ln 9 ≈ 2.2 τ
R for a target fc = 1 ÷ (2π fc C) C for a target fc = 1 ÷ (2π fc R)
These are exact for an ideal first-order RC. At fc the output is 1 ÷ √2 = 0.707 of the input (−3.0 dB, half the power) with a phase lag of 45°. Well above fc the response approaches fc ÷ f, which is a fall of 20 dB for every tenfold increase in frequency (6 dB per octave), and the phase approaches −90°. The step response reaches 63.2 % of its final value after one time constant, 90 % after 2.30 τ, 95 % after 3.00 τ, 99 % after 4.61 τ and 99.9 % after 6.91 τ. Standard values come from the IEC 60063 series.
Worked example
R = 10 kΩ and C = 100 nF, asking about 1 kHz:
- τ = 10 000 Ω × 100 × 10−9 F = 1.00 ms.
- fc = 1 ÷ (2π × 0.001 s) = 159.2 Hz.
- At 1 kHz, f ÷ fc = 6.283, so |H| = 1 ÷ √(1 + 39.48) = 0.157, which is −16.1 dB; the phase shift is −arctan(6.283) = −81.0°.
- Step response: 63.2 % at 1.00 ms, 90 % at 2.30 ms, 95 % at 3.00 ms, 99 % at 4.61 ms, 99.9 % at 6.91 ms; rise time 10–90 % is 2.20 ms.
- Whatever is connected to the output sees a 10 kΩ source at DC, so it must be much higher in impedance than that.
The verdict is a warning: 1 kHz is between fc and 10 × fc, and a single RC only attenuates it to 15.7 %. If 1 kHz is noise you want gone, lower the cutoff or add a second stage; if it is signal you want to keep, raise the cutoff.
Solving the other way: for a 1 kHz cutoff with the same 100 nF, R = 1 ÷ (2π × 1 000 × 100 × 10−9) = 1.59 kΩ; the nearest E24 value is 1.6 kΩ, which gives fc = 994.7 Hz (−0.5 % from the target) and τ = 160 µs.
Common uses and where to put the corner
| Use | Typical corner or time constant | Notes |
|---|---|---|
| Mains hum on a slow sensor line (thermistor, potentiometer, battery voltage) | f<sub>c</sub> ≈ 5–10 Hz | 50 Hz is then 5–10 times f<sub>c</sub>, attenuated by 14–20 dB: reduced, not removed. For more, average readings over one 20 ms mains cycle or use a second-order filter. |
| Switch and contact debounce | τ ≈ 5–20 ms | With a Schmitt-trigger input, or read by software after the settling time; a small series resistor protects the contacts from the capacitor's discharge. |
| PWM to an analogue voltage | f<sub>c</sub> ≤ f<sub>PWM</sub> ÷ 100 | Ripple is roughly 1.6 × V<sub>supply</sub> × f<sub>c</sub> ÷ f<sub>PWM</sub> at 50 % duty; the output follows a change in duty only after about 4.6 τ. |
| Anti-aliasing before an ADC | f<sub>c</sub> ≤ f<sub>s</sub> ÷ 5 to f<sub>s</sub> ÷ 10 | A single RC at f<sub>s</sub> ÷ 10 is only 14 dB down at the Nyquist frequency f<sub>s</sub> ÷ 2; sample faster than you need or use a higher-order filter where aliasing matters. |
| Charge reservoir at an ADC pin | 100 nF close to the pin | With the source resistance in front of it this is also a low-pass: 10 kΩ and 100 nF is 159 Hz, fine for slow signals, too slow for a multiplexed channel that changes every sample. |
Assumptions and limitations
- First-order only, ideal parts. The response is exact for one resistor and one capacitor with nothing else attached. Real circuits always have something else attached.
- The source and the load are part of the filter. The source resistance adds to R: a 1 kΩ sensor feeding the example lowers the corner to 145 Hz. A load resistance forms a divider with R and moves the corner up: a 100 kΩ load on the example drops the DC gain to 0.909 and raises the corner to 175 Hz. Feed the filter from a low impedance and into a high one, or buffer.
- Capacitors are not ideal. ESR and ESL are negligible at these frequencies, but class 2 ceramics lose capacitance under DC bias, X7R noticeably and Y5V severely, and their tolerance is often ±10 % or ±20 %; the corner moves by the same fraction. Use C0G/NP0 ceramic or film where the value matters.
- Tolerance is not modelled. A 5 % resistor and a 10 % capacitor put the corner anywhere within about ±15 %; where that matters, use E96 resistors and measured or 1 % capacitors, or make the corner deliberately conservative.
- DC passes through. A low-pass filter removes ripple and noise, not an offset. To block DC, swap the parts (capacitor in series, resistor to ground) for a high-pass.
- The slope is gentle. 20 dB per decade is all one RC can do. For a steeper roll-off use a second-order active filter (Sallen-Key) or cascade RC stages with an impedance step or a buffer between them.
Frequently asked questions
What does −3 dB mean?
The point where the output amplitude has fallen to 1 ÷ √2 = 0.707 of the input, which is half the power (10 log10 0.5 = −3.01 dB). It is the conventional definition of a filter's cutoff, not a point where the signal stops: at fc 70.7 % still gets through, and at fc ÷ 10 the loss is only 0.04 dB.
Why is the roll-off so gentle?
Because there is one energy-storing element. Each reactive element (capacitor or inductor) contributes 20 dB per decade above its corner, so one RC gives a tenth at 10 × fc and a hundredth at 100 × fc. That is enough for smoothing and debouncing; it is rarely enough to remove a strong interferer close to the signal.
Can I cascade two RC stages?
Yes, but the second stage loads the first. Make the second resistor at least ten times the first (and the second capacitor a tenth) or put a buffer between them; otherwise the corners move and the response is no longer what the formula says. Two buffered identical stages reach 40 dB per decade far above the corner, but their combined −3 dB point moves down to about 0.64 × fc. A Sallen-Key active filter does the job with one op-amp and a sharper knee.
Which comes first, the resistor or the capacitor?
For a low-pass, the resistor is in series with the signal and the capacitor goes from the output to ground. Swap them, capacitor in series and resistor to ground, and the same two parts make a high-pass with the same fc.
What capacitor do I use with a 4.7 kΩ pull-up to debounce a switch?
For τ = 10 ms, C = 10 ms ÷ 4.7 kΩ = 2.13 µF; the nearest E12 value is 2.2 µF, giving τ = 10.3 ms and fc = 15.4 Hz (choose C for a 15.9 Hz target in the calculator). The input must be a Schmitt trigger, or be read by software after 2–3 τ, because it sees a slow ramp rather than an edge. Put a resistor of about 1 kΩ between the switch and the capacitor so the contacts do not discharge 2.2 µF as a spark.
References
- P. Horowitz and W. Hill, The Art of Electronics, 3rd ed., Cambridge University Press, 2015 — §1.4 RC circuits and the time constant; §1.7 RC filters
- IEC 60063:2015, Preferred number series for resistors and capacitors — E12, E24 and E96 values
- J. Ganssle, A Guide to Debouncing, 2004 (rev. 2008) — measured bounce times of real switches and hardware and software debounce circuits
- First-order RC relations — τ = RC, f<sub>c</sub> = 1 ÷ (2πRC), the magnitude and phase response and the exponential step response are standard circuit theory and appear in any introductory circuits text