Difference Amplifier Calculator
Analyze a four-resistor subtractor and solve either input, the output, or any resistor.
Vout = (1 + R₂/R₁) × [R₄/(R₃ + R₄)] × V₂ − (R₂/R₁) × V₁Calculations stay in your browser. Share links contain the input values you choose to share.
How to use this calculator
- Choose Vout, V1, V2, R1, R2, R3, or R4 as the unknown.
- Enter the remaining signed voltages and positive resistances.
- Read the solved value and each input’s gain coefficient.
- Compare the resistor ratios: unequal ratios also amplify common-mode input.
A quick worked example
With R1 = R3 = 10 kΩ and R2 = R4 = 20 kΩ, V1 = 1 V and V2 = 2 V give Vout = 2 V. With R1 = 10 kΩ, R2 = 22 kΩ, R3 = 33 kΩ, R4 = 47 kΩ, V1 = 0.3 V and V2 = 0.7 V, the output is 0.656 V.
A few useful answers
Is this a differential or difference amplifier?
This is a single op-amp, four-resistor difference amplifier, also called a subtractor. It is not a multi-op-amp instrumentation amplifier.
Must the resistors be matched?
The general calculation supports independent values. Equal resistor ratios R2/R1 = R4/R3 give Vout = (R2/R1)(V2 − V1) and zero ideal common-mode gain.
Why can some resistor targets not be solved?
Some targets require zero, negative, or infinite resistance. Other inputs leave the selected resistor unconstrained. For example, V1 = V2 = Vout = 0 does not determine any resistor. The calculator reports these cases.
What do differential and common-mode gain mean?
With Vd = V2 − V1 and Vcm = (V1 + V2)/2, the output is Ad × Vd + Acm × Vcm. If Vout = a × V2 + b × V1, then Ad = (a − b)/2 and Acm = a + b.
Model & assumptions: Ideal op-amp with negative feedback, infinite open-loop gain and input impedance, and zero output impedance. Positive finite resistors and signed DC voltages. Supply rails, output swing, input common-mode limits, offset, bias current, loading, bandwidth and slew rate are not modeled. Check the real device datasheet for linear operation. R4 terminates at 0 V; no separate reference voltage. Resistor labels follow this page’s schematic.
Reference: Texas Instruments — difference amplifier (resistor labels differ) ↗
Electronics Tools & Calculator
Also available for iOS, Android, and Windows.