Skip to main content
DD-CAT IDE logoDD-CAT IDE

Differential op-amp calculator

Favorite

Four-resistor difference (subtractor) amplifier: compute the output, differential gain, common-mode gain and CMRR from R1–R4 and two inputs, bound the gain / output error and worst-case CMRR with the resistor tolerance, or match standard resistors to a target gain, and check input impedance, bandwidth and slew rate.

Key points

A differential (difference / subtractor) amplifier uses four resistors and one op amp: V1 drives the − input through R1 with R2 feeding back from the output to −, while V2 drives the + input through R3 with R4 from + to ground. The output is Vout = V2·[R4/(R3+R4)]·(1+R2/R1) − V1·(R2/R1); when R2/R1 = R4/R3 = Ad it reduces to Vout = Ad·(V2 − V1) with zero common-mode gain. CMRR is dominated by how precisely the four resistors match (about 34 dB for 1% resistors at Ad = 1), and the closed-loop bandwidth uses the noise gain 1+Ad: BW = GBW/(1+Ad). The tool solves output / gain / CMRR from the resistors, or standard matched resistors for a target gain, together with differential and common-mode input impedance, required slew rate and full-power bandwidth.

Inputs

Vout = V2·R4/(R3+R4)·(1+R2/R1) − V1·R2/R1 | when matched, Vout = Ad·(V2−V1), Ad = R2/R1

Calculation model (updates with parameters)

−+V1R110 kΩR210 kΩVout200 mVV2R310 kΩR410 kΩAd = R2/R1 = 1.0000 V/V (matched: use the same values for R4/R3)Vout = Ad·(V2−V1) | CMRR(tolerance) ≈ 33.9 dB

Bode plot (magnitude / phase, updates with parameters)

Differential gain |Ad|-50-40-30-20-100-90°-45°0°10 kHz100 kHz1 MHz10 MHzf (log axis)dBphase500 kHz0.0 dB (flat at low frequency)-45° @ 500 kHzSingle-pole model: low-frequency differential gain 0.0 dB, bandwidth uses the noise gain 1+Ad so BW = GBW/(1+Ad) = 500 kHz, then -20 dB/decade roll-off
Differential gain Ad = R2 / R11.0000V/V
Differential gain range (resistor tolerance)0.9802 ~ 1.0202V/V
Output range (resistor tolerance)179.8 mV ~ 219.8 mV
Maximum resistor-mismatch error-20.2 mV ~ 19.8 mV
Matching ratio R4 / R31.0000
Resistor set R1 / R2 / R3 / R410 kΩ / 10 kΩ / 10 kΩ / 10 kΩ
Common-mode Vcm / differential Vd1.1000 / 0.2000 V
Ideal output (matched formula)200 mV
Actual output Vout200 mV
Common-mode gain Acm0.00000
CMRR (actual resistors)ideal ∞
CMRR (±1.00% worst case)33.9 dB
Differential input impedance R1 + R320 kΩ
Common-mode input impedance R1∥R25 kΩ
Noise gain 1 + Ad2.0000
Closed-loop bandwidth BW = GBW/(1+Ad)500 kHz
Output amplitude (peak)100 mV
Required slew rate SR_req6.28 mV/µs
Device SR / margin×79.58
Full-power bandwidth FPBW795.8 kHz
Small-signal rise time tr700 ns
⚠ tolerance ±1.00% gives a worst-case CMRR of only 33.9 dB: for high common-mode rejection use 0.1% resistors, a resistor network (matched within the package) or an instrumentation amplifier (INA).

Engineering notes

  • Difference (subtractor) amplifier: V1 drives the − input through R1 with R2 feeding back from the output to −; V2 drives the + input through R3 with R4 from + to ground. Only when R2/R1 = R4/R3 does Vout = Ad·(V2−V1) with Ad = R2/R1.
  • CMRR is set by how well the four resistors match, not by the op amp itself: 1% resistors give only about 34 dB at Ad = 1, while 0.1% reaches 54 dB or more. For demanding cases use an integrated difference amplifier, an instrumentation amplifier or a resistor network.
  • For gain ≥ 1 the differential input impedance is R1 + R3; gain < 1 (R2 < R1) costs common-mode rejection and input impedance, so weigh the trade-off.
  • The closed-loop bandwidth uses the noise gain 1 + R2/R1 (not the signal gain Ad): BW = GBW/(1+Ad), narrower than a non-inverting stage of the same gain.
  • The + input common-mode level is V2·R4/(R3+R4) and must stay within the input common-mode range; keep the source impedances equal, otherwise unequal division further degrades CMRR.

FAQ

What is Differential op-amp calculator for?
Four-resistor difference (subtractor) amplifier: compute the output, differential gain, common-mode gain and CMRR from R1–R4 and two inputs, bound the gain / output error and worst-case CMRR with the resistor tolerance, or match standard resistors to a target gain, and check input impedance, bandwidth and slew rate.
What is the formula for Differential op-amp calculator?
Core formula: Vout = V2·R4/(R3+R4)·(1+R2/R1) − V1·R2/R1 | when matched, Vout = Ad·(V2−V1), Ad = R2/R1. The tool returns results instantly using this formula and the selected parameters.
What engineering notes should I keep in mind when using Differential op-amp calculator?
Difference (subtractor) amplifier: V1 drives the − input through R1 with R2 feeding back from the output to −; V2 drives the + input through R3 with R4 from + to ground. Only when R2/R1 = R4/R3 does Vout = Ad·(V2−V1) with Ad = R2/R1. CMRR is set by how well the four resistors match, not by the op amp itself: 1% resistors give only about 34 dB at Ad = 1, while 0.1% reaches 54 dB or more. For demanding cases use an integrated difference amplifier, an instrumentation amplifier…