← All calculators

RC filter calculator

Low-pass or high-pass RC filter from standard R and C, with PWM DAC, ADC and debounce checks

This RC filter calculator designs a first-order RC low-pass or high-pass filter from standard parts: E24 or E96 resistors and E6, E12 or E24 capacitors. It shows the cutoff with its worst-case spread, includes the source and load resistance, and checks the design for its job: a general filter, a PWM DAC, an ADC input or a switch debounce.

RC low-pass filter calculator

An RC low pass filter has R in series and C to ground. It passes frequencies below the cutoff and falls by 20 dB per decade above it. The calculator tries every capacitor in its range with the resistors nearest the target, within the loading you allow. For a 1 kHz target it picks 16 kΩ and 10 nF: 994.72 Hz (−0.528 %).

RC high-pass filter calculator

An RC high pass filter swaps the parts: C in series and R to ground, so it blocks DC. The source resistance adds to R and the load sits in parallel with it, so both move the corner. For a 100 Hz target with a 50 Ω source and a 100 kΩ load, 6.2 kΩ and 270 nF give 100.112 Hz, and the filter's R adds 0.8 % of loss (total gain 0.9915, −0.074 dB).

Cutoff frequency formula: fc = 1 / (2πRC)

The cutoff frequency (the corner or −3 dB frequency) is where the output is 70.7 % of its pass-band level and the phase has turned by 45°:

fc = 1 / (2π × R × C) τ = R × C = 1 / (2π × fc)

With a source Rs and a load RL, a low-pass uses (Rs + R) in parallel with RL in place of R. The output rises from 10 % to 90 % in τ × ln 9 and settles to 1 % in τ × ln 100. With ±1 % resistors and ±10 % capacitors, the worst case moves the 994.72 Hz filter from 895.34 Hz to 1.1164 kHz.

RC filter for PWM to analog (PWM DAC)

The ripple is largest at 50 % duty; a lower cutoff gives less ripple but slower settling. The calculator finds the highest cutoff whose worst-case ripple meets your limit (the TI SPRAA88 method). For a 3.3 V, 20 kHz PWM and 10 mV of ripple, fc must stay below 38.58 Hz: 12 kΩ and 390 nF give at most 9.892 mV and settle to half an LSB of 10 bits in 39.6 ms.

RC anti-aliasing filter for an ADC

An anti-aliasing filter must pass the signal with little loss and attenuate everything near half the sample rate. That sets a window for fc, and the calculator aims at its centre. For 100 kSa/s, a 500 Hz signal within 0.5 dB and 20 dB at fs / 2, the window is 1.4314 kHz to 5.0252 kHz. C must also refill the ADC's sampling capacitor (the charge-bucket rule): 330 Ω and 180 nF give 2.6794 kHz.

RC switch debounce

With a pull-up, pressing the switch discharges C through R and releasing it charges C through the pull-up and R; both delays must outlast the bounce. For 10 ms of bounce, 30 % and 70 % Schmitt-trigger thresholds and a 10 kΩ pull-up, 24 kΩ and 390 nF give at least 10.04 ms on press and 14.22 ms on release.

Worst-case checks and honest limits

  • Every part is a standard value, shown beside the raw one.
  • A check that rests on an assumed tolerance or threshold is marked unverified until you enter your datasheet value.
  • A failing design is still shown, with the fix.
  • The model is first order; results are estimates to confirm on the bench.

Frequently asked questions

How do you calculate the cutoff frequency of an RC filter?

fc = 1 / (2πRC). At fc the output is 3 dB down (70.7 %) and the phase is −45° for a low-pass. For example, 16 kΩ and 10 nF give 994.7 Hz.

What is the difference between an RC low-pass and high-pass filter?

A low-pass has R in series and C to ground and passes frequencies below fc. A high-pass has C in series and R to ground, passes frequencies above fc and blocks DC.

How do I choose R and C for a PWM to analog filter?

Use the largest fc whose ripple meets your limit, then check settling. For a 3.3 V, 20 kHz PWM and 10 mV ripple, fc must stay below 38.6 Hz; 12 kΩ and 390 nF give at most 9.9 mV ripple and settle to ½ LSB of 10 bits in about 40 ms.

Why does my measured cutoff differ from the calculation?

Part tolerances (an X7R capacitor is often ±10 % and loses more under DC bias), the source resistance and the load. With ±1 % resistors and ±10 % capacitors the cutoff can move by −10 % to +12 %.

What RC values do I need to debounce a switch?

The RC must hold the input past its threshold for longer than the bounce. For 10 ms of bounce at 3.3 V with 30 % / 70 % Schmitt thresholds, RC must be at least 8.3 ms: 24 kΩ and 390 nF with a 10 kΩ pull-up work. Use a Schmitt-trigger input.

Other calculators