Differential op-amp calculator
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/R1Calculation model (updates with parameters)
Bode plot (magnitude / phase, updates with parameters)
| Differential gain Ad = R2 / R1 | 1.0000V/V | ≈ 0.00 dB |
| Differential gain range (resistor tolerance) | 0.9802 ~ 1.0202V/V | ±1.00% resistor worst case (R2/R1) |
| Output range (resistor tolerance) | 179.8 mV ~ 219.8 mV | V1 / V2 unchanged; nominal 200 mV |
| Maximum resistor-mismatch error | -20.2 mV ~ 19.8 mV | relative to ideal 200 mV: max ±20.2 mV; gain error -1.98% ~ +2.02%; Vcm common-mode error ±22.22 mV |
| Matching ratio R4 / R3 | 1.0000 | Perfectly matched to Ad: common-mode gain is 0 |
| Resistor set R1 / R2 / R3 / R4 | 10 kΩ / 10 kΩ / 10 kΩ / 10 kΩ | |
| Common-mode Vcm / differential Vd | 1.1000 / 0.2000 V | Vcm = (V1+V2)/2, Vd = V2 − V1 |
| Ideal output (matched formula) | 200 mV | Ad · (V2 − V1) |
| Actual output Vout | 200 mV | With resistor mismatch: V2·R4/(R3+R4)·(1+R2/R1) − V1·R2/R1 |
| Common-mode gain Acm | 0.00000 | Output factor for V1 = V2; closer to 0 is better |
| CMRR (actual resistors) | ideal ∞ | the four resistor ratios are exactly equal |
| CMRR (±1.00% worst case) | 33.9 dB | Worst case over the resistor corners; sets the real common-mode rejection |
| Differential input impedance R1 + R3 | 20 kΩ | Total series resistance seen by the differential source |
| Common-mode input impedance R1∥R2 | 5 kΩ | Take R1∥R2 (symmetric with R3∥R4 when matched) |
| Noise gain 1 + Ad | 2.0000 | Amplification of the op-amp offset / noise |
| Closed-loop bandwidth BW = GBW/(1+Ad) | 500 kHz | GBW 1 MHz; a difference amp uses the noise gain |
| Output amplitude (peak) | 100 mV | differential peak 100 mV × Ad |
| Required slew rate SR_req | 6.28 mV/µs | 2π · f · Vpk @ 10 kHz |
| Device SR / margin | ×79.58 | Device 500 mV/µs | required 6.28 mV/µs |
| Full-power bandwidth FPBW | 795.8 kHz | Highest sine frequency the slew rate allows |
| Small-signal rise time tr | 700 ns | ≈ 0.35 / BW (10–90%) |
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…