Op-Amp Gain Calculator
Calculate voltage gain (V/V and dB), output voltage, feedback resistor values, clipping warnings, and gain-bandwidth limits for inverting, non-inverting, voltage follower, summing, and differential amplifier configurations. Free, instant, no account needed.
What Is an Op-Amp?
An Operational Amplifier (op-amp) is a high-gain differential voltage amplifier packaged as a single integrated circuit. It has two inputs — inverting (−) and non-inverting (+) — and one output. On its own, the open-loop gain of a typical op-amp is enormous: 100,000× (100 dB) or more. This makes it useless directly — any millivolt difference between inputs would saturate the output.
The trick is negative feedback: connect the output back to the inverting input through a resistor network. This tames the gain to a precise, predictable value set entirely by the ratio of two resistors. The result is a stable, accurate amplifier whose gain you can dial in from 1× to 1000× with just two resistor values.
The Two Core Configurations
Non-Inverting Amplifier
Signal enters the (+) input. Output swings in the same direction as the input. Gain is always ≥ 1.
Vout = Vin × Av
Set R2 = 9kΩ, R1 = 1kΩ → Av = 10 (20 dB)
Inverting Amplifier
Signal enters the (−) input via R1. Output swings opposite to the input (180° phase shift). Gain can be < 1.
Vout = −Vin × (R2/R1)
Set R2 = 10kΩ, R1 = 1kΩ → Av = −10 (20 dB inverted)
Worked Design Example — Step by Step
Goal: Design a non-inverting amplifier to amplify a 50 mV microphone signal to 1 V for an ADC input, powered from a single 3.3V supply.
- Calculate required gain: Av = Vout / Vin = 1V / 0.05V = 20
- Apply non-inverting formula: 20 = 1 + R2/R1 → R2/R1 = 19
- Choose standard resistor values: R1 = 1kΩ, R2 = 19kΩ (use 18kΩ standard + 1kΩ in series, or 20kΩ if 5% is acceptable)
- Check for clipping: Single 3.3V supply → max output ≈ 3.0V (standard op-amp) or 3.2V (rail-to-rail). Output = 1V ✅ — well within range.
- Check GBW: If using MCP6002 (GBW = 1 MHz): max gain at 20 kHz = 1MHz / 20kHz = 50. Our gain of 20 < 50 ✅ — feasible.
- Add bias compensation resistor: Connect R1 ‖ R2 = (1k × 19k)/(1k + 19k) ≈ 950Ω to the (+) input to minimise output offset from input bias current.
⚠️ Output Clipping
If Gain × Vin > supply voltage the output hits the rail
and flattens. Always check:
|Vout| < Vcc × 0.9 (standard) or
|Vout| < Vcc × 0.98 (rail-to-rail op-amp).
⚠️ Gain-Bandwidth Limit
Every op-amp has a fixed GBW. At gain = 100, the LM741 (1 MHz GBW) is only usable up to 10 kHz — it clips audio at 20 kHz. Use GBW ÷ desired gain to find the usable bandwidth.
⚠️ Resistor Range
Keep R1 and R2 between 1kΩ and 1MΩ. Below 1kΩ: excessive current draw loads the output. Above 1MΩ: input bias current causes significant DC offset and the circuit picks up interference.
✅ Bias Compensation
Add a resistor equal to R1 ‖ R2 at the (+) input to minimise DC offset from input bias current. Both inputs then see the same source impedance and the offset cancels. Essential for precision designs.
Op-Amp Configuration Comparison
| Configuration | Gain Formula | Min Gain | Phase | Input Impedance | Best For |
|---|---|---|---|---|---|
| Non-Inverting | 1 + R2/R1 |
1× | 0° (same) | Very high (MΩ+) | Sensor amplification, ADC input buffering |
| Inverting | −R2/R1 |
Any (incl. <1) | 180° (flipped) | Moderate (= R1) | Signal conditioning, active filters, DAC output |
| Voltage Follower | 1 (fixed) |
1× | 0° (same) | Highest (GΩ range) | Impedance buffering, driving loads from high-Z sources |
| Summing Amplifier | −Rf(V1/R1 + V2/R2) |
Any | 180° | Per-input R | Audio mixing, DAC R-2R ladders, weighted summing |
| Differential | (R2/R1)(V+ − V−) |
Any | 0° (differential) | Moderate | Bridge sensors, current sensing, rejecting common-mode noise |
| Integrator | −1/(R1×C × s) |
— | −90° | Moderate | Active low-pass filter, waveform generation, PID controllers |
Choosing a Real Op-Amp
The classic LM741 op-amp (DIP-8 package pinout pictured) is the textbook general-purpose operational amplifier — invented in 1968, still in production, and universally taught in classrooms worldwide. But it is rarely the right choice for modern circuit designs. Its 1 MHz GBW, 0.5 V/µs slew rate, and inability to operate reliably below a ±5V dual rail supply make it unsuitable for most modern low-voltage, battery-powered microcontrollers or high-fidelity audio designs.
For audio: NE5532 (10 MHz GBW, 9 V/µs, ultra-low noise). For single-supply / Arduino: MCP6002 (1 MHz, rail-to-rail, 1.8–5.5V). For precision: OPA2134 (8 MHz, audio-grade THD). For high speed: TL071 (3 MHz, 13 V/µs, JFET input).
Diagram: Premium custom vector drawing of the classic LM741 DIP-8 package and pin configuration.
Op-Amp Selection Guide
| Op-Amp | GBW | Slew Rate | Supply | Input Type | Best Application |
|---|---|---|---|---|---|
| LM741 | 1 MHz | 0.5 V/µs | ±5 to ±18V | BJT | Textbook / general purpose |
| LM358 | 1 MHz | 0.6 V/µs | 3–32V single | BJT | Low-cost single supply |
| TL071 | 3 MHz | 13 V/µs | ±7 to ±18V | JFET | Audio, high-speed general |
| NE5532 | 10 MHz | 9 V/µs | ±3 to ±20V | BJT | Audio preamps, low noise |
| MCP6002 | 1 MHz | 0.6 V/µs | 1.8–5.5V | CMOS R-R | Arduino / microcontroller circuits |
| OPA2134 | 8 MHz | 20 V/µs | ±2.5 to ±18V | JFET | Hi-fi audio, instrumentation |
| AD8620 | 25 MHz | 35 V/µs | ±2.3 to ±16V | JFET | Precision wideband |
Practical Applications
Microphone Preamps — A dynamic microphone outputs 1–10 mV. A non-inverting amplifier with Av = 100–500 (40–54 dB) brings it to line level (100 mV–1 V). The high input impedance of the non-inverting configuration avoids loading the microphone capsule.
Sensor Signal Conditioning — Thermocouples, strain gauges, and pH probes produce millivolt signals from high-impedance sources. A voltage follower or non-inverting amplifier buffers the signal, then a second stage amplifies it to the 0–5V range of a microcontroller ADC. This is called a two-stage instrumentation front-end.
Active Filters — Replace R2 in the inverting configuration with a capacitor and you get an active integrator. Add frequency-dependent impedances and you build Butterworth, Chebyshev, or Sallen-Key filter topologies — far sharper than passive RC filters. See our RC Filter Calculator and Audio Crossover Calculator for filter design tools.
Inverting Summing Amplifier (Audio Mixer) — Connect multiple audio sources through individual input resistors to the inverting input. Output = −Rf × (V1/R1 + V2/R2 + V3/R3). Each input is independently weighted by its resistor ratio. This is how analog mixing consoles work at the channel strip level.
DAC Output Buffering — Digital-to-Analog converters typically output a current into a fixed impedance. An inverting transimpedance amplifier (I-to-V converter, R2 only, no R1) converts that current to a precise voltage: Vout = −Iout × R2. Used in audio DACs, arbitrary waveform generators, and precision voltage references.
Video: What Is an Op-Amp? — EEVblog #600
EEVblog founder Dave Jones called this his most-requested video for good reason. In under 45 minutes he covers what op-amps are, how negative feedback works, the virtual ground concept, inverting and non-inverting configurations, voltage followers, and real-world circuit behaviour — all with oscilloscope demonstrations on real hardware. Essential viewing before using this calculator for the first time.
Frequently Asked Questions
How do I calculate op-amp gain?
Non-inverting: Av = 1 + (R2/R1).
Inverting: Av = −(R2/R1).
Convert to dB: Av_dB = 20 × log₁₀(|Av|).
A gain of 10 = 20 dB. A gain of 100 = 40 dB. A gain of 0.1 = −20 dB (attenuation).
What is the difference between inverting and non-inverting?
In a non-inverting amplifier the signal enters the (+) input — output is in phase, gain ≥ 1. In an inverting amplifier the signal enters the (−) input through R1 — output is 180° flipped, gain can be anything including less than 1 (attenuation). Both use the same two resistors; how you wire them determines which formula applies.
What is a voltage follower and when do I need one?
A voltage follower (unity-gain buffer) connects the output directly back to the (−) input with no resistors — gain = 1. You use it when you need to copy a voltage without loading the source. For example: reading a 10MΩ pH probe with a microcontroller ADC that has only 10kΩ input impedance. Without the buffer, the ADC loads the probe and the reading is wrong. With the buffer, the op-amp's near-infinite input impedance protects the probe while driving the ADC.
What is virtual ground?
In the inverting configuration, the (−) input is held at 0V by negative feedback — even though it is not connected to ground. The op-amp drives the output to whatever voltage forces both inputs equal. Since (+) is at ground, (−) must also be at 0V. This imaginary 0V node is virtual ground. It makes current calculations simple: all current from Vin flows through R1 then R2, giving Av = −R2/R1.
Why does my op-amp output clip?
When the calculated output voltage exceeds the supply rails, the output saturates (clips) at approximately Vcc − 1.5V (standard op-amps) or Vcc − 0.05V (rail-to-rail). A LM741 running on ±12V can only output about ±10.5V. If gain × Vin pushes past this, the sine wave becomes flat-topped. Fix it by reducing gain, reducing Vin, increasing supply voltage, or switching to a rail-to-rail op-amp.
What is gain-bandwidth product (GBW)?
GBW is a fixed constant for each op-amp model: GBW = Gain × Bandwidth.
An LM741 with GBW = 1 MHz can deliver gain 10 only up to 100 kHz,
or gain 100 only up to 10 kHz. For audio work at 20 kHz with gain 50,
you need GBW ≥ 1 MHz — LM741 just barely works. For gain 100 at 20 kHz,
you need GBW ≥ 2 MHz. The NE5532 (GBW = 10 MHz) handles gain 100 up to 100 kHz.
What resistor values should I use?
Stay in the 1kΩ to 100kΩ range for most designs. Below 1kΩ the output drives excessive current, increasing power dissipation and output loading. Above 1MΩ, input bias current creates significant DC offset and the circuit becomes an antenna for interference. The ratio R2/R1 sets the gain — so for gain 10 you might use R1 = 10kΩ, R2 = 100kΩ or R1 = 1kΩ, R2 = 10kΩ. Both give identical AC gain, but the lower-value pair draws more current and is less susceptible to noise.
Do I need a dual power supply (+/−)?
Only if your signal swings negative. Audio signals are AC and swing both ways — a dual supply (e.g. ±12V) lets the op-amp faithfully reproduce both halves. On a single supply (e.g. 5V), the output can never go below 0V, so the negative half of an AC wave is clipped. The workaround: bias the (+) input to Vcc/2 (2.5V) creating a "mid-rail virtual ground", then AC-couple inputs and outputs with capacitors. This is standard practice in single-supply audio circuits.
Going Deeper: Op-Amp Non-Idealities
The ideal op-amp model — infinite gain, infinite bandwidth, zero offset — works well for most calculations but breaks down in precision and high-speed designs. Here are the key real-world parameters to check in a datasheet.
Input Offset Voltage (Vos)
A small DC voltage difference between the two inputs that causes a non-zero output even with no input signal. Multiplied by gain — a 1mV offset at gain 100 produces 100mV of DC error at the output. In precision designs, choose op-amps with Vos below 100µV (e.g. OP07: 75µV, OPA188: 25µV) or use offset-null trimming.
Input Bias Current (Ib)
BJT-input op-amps (LM741, NE5532) draw small base currents into both inputs, typically 10–500 nA. Flowing through feedback resistors, this creates a DC offset voltage of I_b × R. Add a bias compensation resistor equal to R1 ‖ R2 at the (+) input so both inputs see the same impedance — the offset largely cancels. JFET-input (TL071) and CMOS-input (MCP6002) op-amps have input bias currents in the picoamp range and rarely need compensation.
Slew Rate (SR)
The maximum output voltage rate of change in V/µs. Determines the highest frequency
and amplitude you can faithfully amplify. Required slew rate:
SR_min = 2π × f × Vpeak.
For a 10 Vpeak signal at 50 kHz: SR_min = 2π × 50,000 × 10 = 3.14 V/µs.
An LM741 (0.5 V/µs) fails here. A TL071 (13 V/µs) handles it comfortably.
Common-Mode Rejection Ratio (CMRR)
In a differential amplifier, CMRR measures how well the op-amp rejects voltages that appear equally on both inputs (common-mode noise), such as 50/60 Hz mains interference in long cable runs. CMRR = 80–120 dB for most precision op-amps. Higher is better. The differential amplifier's ability to reject noise depends on both the op-amp's CMRR and the matching of the four resistors — mismatched resistors degrade practical CMRR dramatically.
Related Tools on CircuitsLab Wiki
Op-amps rarely operate alone — they are part of larger signal chains. These companion tools cover the circuits before and after your amplifier:
- RC Filter Calculator — Low-pass and high-pass filter cutoff frequency from R and C values
- Audio Crossover Calculator — Butterworth crossover filter design for speaker systems
- LC Filter Calculator — Inductor-capacitor filter networks for RF and power applications
- 555 Timer Calculator — Astable and monostable oscillator timing
- ADC/DAC Resolution Calculator — LSB voltage and dynamic range for analog-digital conversion
- Voltage Divider Calculator — Resistor divider output voltage and loading effects