The Core Butterworth Magnitude Formula

When you punch numbers into a Butterworth filter calculator, the software is solving the defining characteristic of the Butterworth topology: a maximally flat passband with no ripple, trading off a slower roll-off rate compared to Chebyshev or elliptic designs. Whether you are designing a passive RC network or an active Sallen-Key op-amp stage, the fundamental magnitude response dictates your component choices.

The universal transfer function magnitude (in decibels) for an n-th order low-pass Butterworth filter is:

AdB = -10 × log10 [ 1 + (f / fc)2n ]

Symbol Definition Table

SymbolParameterStandard UnitBench Context
AdBAttenuation / GainDecibels (dB)Measured on a spectrum analyzer or scope FFT. Always negative for passive/unity-gain active filters.
fTarget FrequencyHertz (Hz)The specific interference frequency you want to reject (e.g., 60 Hz mains hum, or ADC Nyquist noise).
fcCutoff Frequency (-3dB)Hertz (Hz)The -3.01 dB point. For a 2nd-order Sallen-Key, this is where the output voltage drops to 0.707 of the passband.
nFilter OrderInteger (unitless)Number of reactive poles. A 2nd-order filter rolls off at -40 dB/decade; a 4th-order at -80 dB/decade.

Rearranged Forms for the Bench

A calculator is only as good as your ability to manipulate it. Here are the algebraic rearrangements to solve for the variable you actually need to buy components for:

  • Solve for Target Frequency (f): f = fc × [ 10(-AdB/10) - 1 ]1/(2n)
  • Solve for Cutoff Frequency (fc): fc = f / [ 10(-AdB/10) - 1 ]1/(2n)
  • Solve for Filter Order (n): n = log10[ 10(-AdB/10) - 1 ] / ( 2 × log10(f / fc) )

Assumptions, Unit Traps, and Realistic Magnitudes

Before you order your resistors and capacitors, you must understand the boundaries of this math.

When the Formula Applies (And When It Fails)

This formula assumes an ideal, continuous-time analog filter with perfect components. It applies flawlessly to active topologies (like Sallen-Key or Multiple Feedback) operating well below the op-amp's Gain-Bandwidth Product (GBWP). It fails when:

  • Component tolerances stack: A 5% resistor and 10% capacitor will shift your actual fc by up to 15%, ruining the Butterworth Q-factor (0.707) and introducing passband peaking.
  • Op-amp limitations: If your fc is 100 kHz, but your TL072 op-amp has a GBWP of 3 MHz, the open-loop gain is only 30. The filter will behave like a 1st-order rolloff at high frequencies.

The Unit Mistake That Breaks the Math

The most common error on the bench is mixing angular frequency (ω, rad/s) with standard frequency (f, Hz). The ratio (f / fc) is beautifully unitless because the cancels out. However, if you accidentally plug ω (e.g., 6283 rad/s) into the numerator and fc (e.g., 1000 Hz) into the denominator, your ratio is inflated by . For a 2nd-order filter, this single unit mistake will result in a calculated attenuation error of roughly 15.9 dB. Always convert everything to Hertz before calculating.

Realistic Answer Magnitudes

What should your calculator output look like?

  • Order (n): Typically 1 through 4 for active analog filters. If your math demands n = 8, stop. Analog component tolerances will ruin an 8th-order Butterworth; switch to a switched-capacitor IC or a digital FIR filter.
  • Attenuation (AdB): At exactly f = fc, the formula yields exactly -3.01 dB regardless of the order n. This is a great sanity check for your math.

Worked Problems: Tracking Units from Bench to Math

Let's run two scenarios with explicit intermediate steps to prove the math holds up.

Problem 1: Finding Attenuation at a Known Interference Frequency

Scenario: You have a 2nd-order (n=2) Butterworth low-pass filter with a cutoff frequency (fc) of 1,000 Hz. You want to know the exact attenuation at a 5,000 Hz switching noise spike.

  1. Identify variables: f = 5000, fc = 1000, n = 2.
  2. Calculate the ratio: f / fc = 5000 / 1000 = 5.
  3. Apply the exponent (2n): 2 × 2 = 4. So, 54 = 625.
  4. Add 1: 1 + 625 = 626.
  5. Take log base 10: log10(626) ≈ 2.7966.
  6. Multiply by -10: -10 × 2.7966 = -27.97 dB.

Bench translation: A 1V peak-to-peak 5kHz noise spike will be reduced to roughly 40mV at the filter output.

Problem 2: Sizing the Filter Order for ADC Anti-Aliasing

Scenario: You need at least -40 dB of attenuation at 10,000 Hz to protect an ADC. Your passband requires a cutoff (fc) of 2,000 Hz. What order filter do you need?

  1. Identify variables: f = 10000, fc = 2000, AdB = -40.
  2. Calculate the ratio: 10000 / 2000 = 5.
  3. Process the dB term: -(-40)/10 = 4. Therefore, 104 = 10,000.
  4. Subtract 1: 10,000 - 1 = 9,999.
  5. Numerator (log of dB term): log10(9999) ≈ 3.99996.
  6. Denominator (log of ratio): 2 × log10(5) ≈ 2 × 0.69897 = 1.39794.
  7. Divide: 3.99996 / 1.39794 ≈ 2.86.

Bench translation: You cannot build a 2.86-order filter. You must round up to the next integer. You need a 3rd-order (n=3) Butterworth filter, which will actually give you -41.9 dB of attenuation at 10 kHz.

Real-World Scenario: The ESP32 Anti-Alias Filter Failure

Math is perfect; the breadboard is not. Here is a narrative walkthrough of a design that looked perfect on paper but failed on the bench, highlighting why a Butterworth filter calculator is only step one.

1. The Setup

We were designing an acoustic sensor using an ESP32. The ESP32's internal ADC was sampling at 20 kSPS (kilo-samples per second), making the Nyquist limit 10 kHz. We had high-frequency ultrasonic interference at 14 kHz that was folding back (aliasing) into our 6 kHz audio band. We needed a 2nd-order (n=2) Sallen-Key Butterworth low-pass filter with fc = 5,000 Hz to kill the 14 kHz noise.

2. The Calculator Numbers

Using the standard equal-component Sallen-Key equations, the calculator spit out ideal values: R = 15 kΩ and C = 2.2 nF.
Math check: fc = 1 / (2π × 15,000 × 2.2e-9) = 4,822 Hz. Close enough to 5 kHz. We set the op-amp gain to 1.586 to achieve the exact Butterworth Q of 0.707.

3. The Outcome

We built the circuit on a breadboard using an LM358 op-amp, standard E24 15k resistors, and 2.2 nF surface-mount MLCC capacitors from the parts bin. We fed in a 14 kHz test tone. The oscilloscope showed the 14 kHz tone was only attenuated by -18 dB, not the -29 dB the math promised. The aliasing persisted.

4. What Went Wrong (The DC Bias Trap)

The Diagnosis: The 2.2 nF capacitors we grabbed were X7R dielectric MLCCs. X7R capacitors exhibit severe DC bias capacitance derating. Because our sensor had a 1.6V DC offset, the electric field across the capacitor's dielectric physically reduced its effective capacitance from 2.2 nF down to roughly 1.1 nF.

With the capacitance halved, our actual cutoff frequency shifted from 4.8 kHz up to 6.8 kHz. The filter was passing the 14 kHz noise right into the ADC.
The Fix: We swapped the X7R MLCCs for C0G/NP0 dielectric capacitors (or WIMA film caps for through-hole). C0G dielectrics have zero DC bias derating. The capacitance stayed at exactly 2.2 nF, the cutoff locked in at 4.8 kHz, and the 14 kHz aliasing vanished.

Bridging the Calculator to the Breadboard

To ensure your calculated Butterworth values actually work in copper, follow these three bench rules:

  1. Resistor Selection: Never use the exact decimal the calculator spits out. Map your ideal values to the E24 series (5% tolerance) or E96 series (1% tolerance). If the calculator demands 11,432 Ω, use a 11.3k or 11.5k 1% resistor. Keep resistor values between 1 kΩ and 100 kΩ to avoid excessive thermal noise (Johnson-Nyquist) or op-amp input bias current voltage drops.
  2. Capacitor Dielectrics: For any filter handling signals, never use Y5V or X7R MLCCs in the timing network. Always specify C0G (NP0) for values under 10 nF, or polypropylene/film capacitors for larger values. The math assumes capacitance is constant; voltage-dependent dielectrics break the transfer function.
  3. Op-amp GBWP Rule of Thumb: Your op-amp's Gain-Bandwidth Product must be at least 100 times the cutoff frequency for a 2nd-order filter. If fc is 50 kHz, you need an op-amp with a minimum GBWP of 5 MHz. A classic TL072 (3 MHz GBWP) will choke and introduce phase shift errors long before the math predicts.