Compute output voltage, closed-loop gain, and component sensitivity for inverting, non-inverting, and differential op‑amp configurations.
The operational amplifier (op-amp) is a fundamental building block of analog electronics. This calculator determines the output voltage (Vout) and closed-loop gain for three essential configurations, assuming ideal op‑amp characteristics: infinite input impedance, zero output impedance, and infinite open-loop gain. The virtual short principle (V+ = V-) is applied.
\[ V_{out} = -\frac{R_f}{R_{in}} V_{in} \] | \[ V_{out} = \left(1 + \frac{R_f}{R_g}\right) V_{in} \] | \[ V_{out} = \frac{R_f}{R_1}(V_2 - V_1) \] (matched resistors)
For an inverting amplifier, the inverting terminal is at virtual ground. Using Kirchhoff’s current law: \( \frac{V_{in} - 0}{R_{in}} = \frac{0 - V_{out}}{R_f} \) → \( V_{out}/V_{in} = -R_f/R_{in} \). The non‑inverting amplifier uses a voltage divider at the inverting node: \( V_- = V_{out} \cdot \frac{R_g}{R_g+R_f} \), and since \( V_+ = V_{in} \), the gain becomes \( 1 + R_f/R_g \). For differential amplifiers, superposition yields the classic difference amplification. Our calculator assumes ideal op‑amp and perfectly matched resistors for differential mode; practical CMRR is discussed in the reference section.
A pressure sensor outputs 0–50 mV. To interface with an ADC (0–5V range), an inverting amplifier with gain -100 is needed. Using our calculator: set Rf = 100 kΩ, Rin = 1 kΩ, Vin = 0.05 V → Vout = -5 V. An additional inverting stage corrects polarity. The tool quickly verifies gain accuracy, preventing overdrive. The non‑inverting option avoids phase inversion in DC-coupled systems.
A non‑inverting amplifier with gain 10 (Rf=9k, Rg=1k) boosts a microphone signal. Using the calculator confirms Vout = 10*Vin, and the high input impedance respects the microphone source. The interactive circuit display helps students understand feedback networks.
| Parameter | LM358 (General purpose) | TL081 (JFET input) | OP07 (Precision) | NE5532 (Audio) |
|---|---|---|---|---|
| Supply voltage (V) | 3–32 | 7–36 | 6–36 | 5–30 |
| Input offset voltage (max) | 7 mV | 6 mV | 0.15 mV | 4 mV |
| Input bias current | 45 nA | 0.03 nA | 1.8 nA | 300 nA |
| Gain-bandwidth product (GBP) | 1 MHz | 3 MHz | 0.6 MHz | 10 MHz |
| Slew rate (V/µs) | 0.6 | 13 | 0.17 | 9 |
Note: The calculator's ideal output assumes the op‑amp's GBP is not limiting the signal frequency. For a closed-loop gain of G and signal frequency f, ensure f < GBP / G to avoid gain roll-off.
The differential amplifier provides high common-mode rejection only when resistor ratios match precisely: \( \frac{R_f}{R_1} = \frac{R_2}{R_3} \). In practice, use 0.1% matched resistor sets or a single instrumentation amplifier IC. The common‑mode rejection ratio (CMRR) is defined as:
\[ \text{CMRR} = 20 \log_{10}\left( \frac{|A_d|}{|A_{cm}|} \right) \text{ (dB)} \]
With 1% resistors, CMRR typically degrades to ~60 dB, while 0.1% resistors achieve >80 dB. Our calculator assumes ideal matching; for critical applications (e.g., ECG, strain gauges), consider an INA826 or AD8429.
| Aspect | Ideal model (this tool) | Real-world limitation |
|---|---|---|
| Open-loop gain | Infinite → virtual short exact | Finite AOL (10⁵–10⁶) causes tiny error |
| Input impedance | Infinite | BJT inputs: ~1 MΩ; FET: >10¹² Ω; may load high‑impedance sources |
| Output swing | Any voltage | Rail‑to‑rail types can reach within 50 mV of supply; others lose 1–2 V |
| Bandwidth | Infinite | Limited by gain‑bandwidth product; use f < GBP/G |
| Slew rate | Infinite | Limits maximum slope; large signals distort above SR/(2π·Vpeak) |
| Configuration | Gain Equation | Example Values | Output (Vin=0.2V) |
|---|---|---|---|
| Inverting | -Rf/Rin | Rf=10k, Rin=1k → Gain -10 | -2.00 V |
| Non‑Inverting | 1+Rf/Rg | Rf=9k, Rg=1k → Gain 10 | 2.00 V |
| Differential | Rf/R1 (V2-V1) | Rf=10k, R1=1k, V2=0.5V, V1=0.2V → Gain 10 | 3.00 V |