OP-AMP AMPLIFIERS

Difference Amplifier Calculator

Analyze a four-resistor subtractor and solve either input, the output, or any resistor.

BROWSER-LOCAL · FREE
Difference AmplifierLIVE CALCULATION

Set your values

The selected unknown appears in the result.

R1 feeds the − input; R2 provides feedback. R3 feeds the + input; R4 connects it to ground. Ratios may be unequal. Ideal linear model; supply limits and clipping are not simulated.

−+AR₂—Vout—R₁—V₁ (−)—R₃—R₄—V₂ (+)—Ideal op-amp · supply connections omitted
The relationshipVout = (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

  1. Choose Vout, V1, V2, R1, R2, R3, or R4 as the unknown.
  2. Enter the remaining signed voltages and positive resistances.
  3. Read the solved value and each input’s gain coefficient.
  4. 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.

If R₂/R₁ = R₄/R₃: Vout = (R₂/R₁)(V₂ − 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) ↗

APP DOWNLOADS

Electronics Tools & Calculator

Also available for iOS, Android, and Windows.