Differential Amplifier Calculator

Compute output voltage, differential gain (Ad), common-mode gain (Acm), and CMRR (dB) for a classic four-resistor differential amplifier.

Unity Gain (R1=R2=R3=R4=10k)
Gain = 10 (R1=1k,R2=10k,R3=1k,R4=10k)
High CMRR (R1=R3=2.2k, R2=R4=22k)
Client‑side computation: All calculations run locally in your browser. No data is transmitted or stored.

Theory & Operation of Differential Amplifiers

A differential amplifier (subtractor) using an operational amplifier amplifies the difference between two input signals while rejecting common-mode signals. The classic circuit uses four external resistors: R1, R2, R3, R4. Under ideal op-amp conditions (infinite gain, infinite input impedance, zero output impedance), the output voltage is given by:

Vout = $$ \frac{R_4}{R_3+R_4} \left(1+\frac{R_2}{R_1}\right) V_2 - \frac{R_2}{R_1} V_1 $$

When resistor ratios are matched (R1/R2 = R3/R4), the circuit becomes a true differential amplifier: Vout = (R2/R1)·(V2 − V1). In this condition, common-mode gain (Acm) drops to zero, yielding infinite CMRR (theoretically). In real-world applications, mismatched resistors cause finite CMRR, limiting performance. Our calculator uses the general transfer function to accurately compute output and key metrics.

Key Performance Metrics

  • Differential Gain (Ad): Amplification factor for the difference (V2 - V1). Ideally Ad = R2/R1 when R1/R2 = R3/R4.
  • Common-Mode Gain (Acm): Gain applied to the average of inputs. Desired value is 0.
  • CMRR (dB): 20·log10(|Ad / Acm|). High CMRR (80–120 dB) indicates excellent noise rejection.
Real‑World Application: Biomedical Instrumentation

In ECG amplifiers, differential amplifiers reject 50/60 Hz common-mode interference while amplifying the small heart signal (millivolts). With matched resistors (tolerance 0.1%), CMRR > 80 dB is achieved. Our calculator helps designers select resistor values to maximize CMRR before trimming.

Step-by-Step Calculation Methodology

  1. Read resistor values R1, R2, R3, R4 and voltages V1, V2.
  2. Compute coefficients: A = (R4/(R3+R4)) * (1 + R2/R1), B = R2/R1.
  3. Output voltage: Vout = A·V2 − B·V1.
  4. Differential voltage Vdiff = V2 - V1, Common-mode Vcm = (V1+V2)/2.
  5. Differential gain Ad = (A + B)/2, Common-mode gain Acm = A - B.
  6. CMRR (dB) = 20 * log10(|Ad / Acm|) if |Acm| > 1e-12, else "∞ dB (ideal)".
Condition Vout Formula CMRR Typical Use
Matched Ratios (R1/R2 = R3/R4) (R2/R1)·(V2-V1) Very high (ideal ∞) Precision measurement
R1=R3, R2=R4 (R2/R1)(V2-V1) Infinite (ideal) Standard diff-amp
Mismatched ratios General formula Degraded Low-cost applications

Engineering foundation: Based on classical operational amplifier theory (Sedra & Smith, "Microelectronic Circuits", 8th Ed.) and precision analog design principles. The tool adheres to IEEE standards for gain/CMRR definitions.

References: Texas Instruments "Op Amps for Everyone" (Ron Mancini), Analog Devices MT-074 Tutorial, and The Art of Electronics (Horowitz & Hill).

Frequently Asked Questions

High CMRR ensures that noise appearing equally on both inputs (common-mode interference) is suppressed. This is critical in sensors, audio, and medical devices.

For CMRR > 80 dB, use 0.1% resistors or matched resistor networks. Even 1% resistors limit CMRR to ~46 dB theoretically.

The linear formula applies, but real op-amps have input/output voltage limitations. Our calculator assumes ideal behavior; for real designs, check datasheet ranges.

Match the ratios R2/R1 = R4/R3 exactly, use precision resistors, and consider a trim-pot for fine adjustment.