The Core Differential Amplifier Equation
For a standard operational amplifier configured with a balanced four-resistor network, the differential amplifier equation is:
Vout = (R2 / R1) × (V2 - V1)
This formula assumes the resistor ratios are perfectly matched, meaning R1 = R3 (the input and ground resistors) and R2 = R4 (the feedback and non-inverting gain resistors). When this condition is met, the circuit rejects common-mode voltage and amplifies only the difference between the two inputs.
| Symbol | Definition | Standard Unit |
|---|---|---|
| Vout | Output voltage referenced to circuit ground | Volts (V) |
| V1 | Voltage applied to the inverting input terminal (via R1) | Volts (V) |
| V2 | Voltage applied to the non-inverting input terminal (via R3) | Volts (V) |
| R1 | Input resistor on the inverting branch | Ohms (Ω) |
| R2 | Feedback resistor connecting output to inverting input | Ohms (Ω) |
| Ad | Differential gain, defined as (R2 / R1) | Unitless (V/V) |
Assumptions, Unit Traps, and Realistic Magnitudes
The elegance of the differential amplifier equation relies on several ideal assumptions. Understanding where these assumptions break down in real hardware is what separates a textbook simulation from a working bench prototype.
When the Formula Applies (and When It Doesn't)
This specific equation only holds true if the resistor bridge is balanced. If R2/R1 ≠ R4/R3, the circuit no longer perfectly rejects common-mode voltage, and you must use the full, unbalanced superposition equation. Furthermore, the formula assumes an ideal op-amp with infinite open-loop gain and infinite input impedance. In reality, standard parts like the LM741 have input bias currents that create offset voltages across high-value resistors, while precision parts like the AD620 instrumentation amplifier integrate laser-trimmed internal resistors to guarantee the ratio match.
Unit Mistakes That Break the Math
- Mixing units in subtraction: If V1 is 15 mV and V2 is 1.2 V, you cannot simply calculate (1.2 - 15). You must convert both to Volts (1.2 - 0.015) or both to millivolts (1200 - 15) before subtracting.
- Mismatched ratio units: The gain term (R2 / R1) is a ratio. You can use kΩ for both, or Ω for both, but if R2 is 100 kΩ and R1 is 10 kΩ, the ratio is 10, not 10,000. Never mix Ω and kΩ across the numerator and denominator without converting first.
Realistic Answer Magnitudes
A common beginner mistake is calculating an output voltage that exceeds the physical limits of the silicon. The output is strictly bounded by the power supply rails. If you power an LM358 with a single +5V supply and ground, a calculated Vout of +6V is impossible. Furthermore, the LM358 cannot swing all the way to the positive rail; its realistic maximum output magnitude is roughly Vcc - 1.5V (about 3.5V). For true rail-to-rail output magnitudes, you must select a modern RRIO (Rail-to-Rail Input/Output) op-amp like the MCP6001.
Worked Examples with Unit Tracking
Example 1: Calculating Output Voltage from Sensor Inputs
Scenario: You are reading a shunt resistor for current sensing. The voltage at the non-inverting input (V2) is 45 mV. The voltage at the inverting input (V1) is 20 mV. The input resistor R1 is 4.7 kΩ, and the feedback resistor R2 is 47 kΩ.
- Convert inputs to a common unit (Volts):
V2 = 0.045 V
V1 = 0.020 V - Calculate the differential gain (Ad):
Ad = R2 / R1 = 47 kΩ / 4.7 kΩ = 10 V/V - Apply the equation:
Vout = 10 × (0.045 V - 0.020 V)
Vout = 10 × 0.025 V
Vout = 0.25 V (or 250 mV)
Verification: The differential input is 25 mV. Multiplied by a gain of 10, the 250 mV output is mathematically sound and well within the typical ±12V or +5V supply rails of most op-amps.
Example 2: Sizing Resistors for a Target Output Swing
Scenario: You have a differential thermocouple signal that swings by a maximum of 12 mV. You need to amplify this to exactly 3.0 V to maximize the resolution of your Arduino's 5V ADC. You have a precision 1.5 kΩ resistor available for R1. What value must R2 be?
- Determine required gain:
Gain = Vout / (V2 - V1)
Gain = 3.0 V / 0.012 V = 250 V/V - Rearrange the formula to solve for R2:
R2 = Gain × R1 - Calculate R2:
R2 = 250 × 1.5 kΩ
R2 = 375 kΩ
Practical Note: 375 kΩ is not a standard 1% E96 series resistor value. The closest standard value is 374 kΩ. Using 374 kΩ yields a gain of 249.33, resulting in an output of 2.992 V—well within the acceptable error margin for a 10-bit ADC. For high-impedance sensor circuits, remember that using such large resistors increases thermal noise; an instrumentation amplifier topology is often preferred here to buffer the inputs.
Rearranged Forms for Circuit Design
When designing or debugging differential circuits on the bench, you rarely need just Vout. Here are the algebraically rearranged forms of the standard matched-resistor equation, solving for each primary variable:
- To find the non-inverting input (V2):
V2 = (Vout / Ad) + V1 - To find the inverting input (V1):
V1 = V2 - (Vout / Ad) - To find the feedback resistor (R2):
R2 = R1 × [Vout / (V2 - V1)] - To find the input resistor (R1):
R1 = R2 × [(V2 - V1) / Vout] - To find the Differential Gain (Ad):
Ad = Vout / (V2 - V1)
Frequently Asked Questions
How does resistor mismatch affect the differential amplifier equation?
If your resistor ratios are not perfectly matched, the circuit loses its Common-Mode Rejection Ratio (CMRR). For example, if R2/R1 is 10.0, but R4/R3 is 10.1 due to using standard 5% tolerance resistors, any voltage common to both inputs (like 50/60Hz mains hum) will be amplified by the mismatch error and appear at the output as noise. For precision DC measurements, always use 0.1% tolerance resistors or an integrated instrumentation amplifier like the INA128, which guarantees matched internal ratios.
Why does my differential amplifier output clip before reaching the calculated voltage?
Clipping occurs when the calculated Vout exceeds the op-amp's output voltage swing limits. Standard op-amps like the LM741 powered by ±15V rails can typically only swing to about ±13V. If you are using a single-supply configuration (e.g., 0V and +5V), standard op-amps cannot pull the output all the way down to 0V or up to +5V. To achieve the full calculated magnitude in a single-supply design, you must specify a Rail-to-Rail Output (RRO) op-amp in your BOM and ensure your common-mode input voltage stays within the datasheet's specified limits.
What is the difference between a differential amplifier and an instrumentation amplifier?
A standard differential amplifier uses a single op-amp and four resistors. Its major flaw is that its input impedance is determined by the resistors themselves, meaning it will load down high-impedance sensors like piezo elements or pH probes. An instrumentation amplifier adds two buffer op-amps at the inputs, providing massive, balanced input impedance (often >10 GΩ) while maintaining the differential gain equation. Use standard diff amps for low-impedance, cost-sensitive tasks, and instrumentation amps for sensitive sensor front-ends.






