Op-Amp Gain Calculator
Calculate gain and resistor values for op-amp circuits
Output is inverted (180° phase shift) with gain = -Rf/Rin
Circuit Formula
Vout = -(Rf / Rin) × Vin
Design Tips
- • Use 1% tolerance resistors for better gain accuracy
- • Keep resistor values between 1kΩ and 1MΩ for best performance
- • Add bypass capacitors (100nF) close to op-amp power pins
- • Consider gain-bandwidth product (GBW) for high-frequency applications
- • Output swing is limited by supply rails (rail-to-rail op-amps help)
Formula Source and Checked Examples
The calculator uses the ideal op-amp closed-loop gain equations found in any analog electronics textbook. Inverting: gain = −Rf / Rin. Non-inverting: gain = 1 + Rf / Rin. Differential, with both resistor pairs matched: Vout = (Rf / Rin) × (V1 − V2). Buffer: gain = 1. Gain in decibels is 20 × log10 of the absolute gain. In the find-resistors mode, Rf is solved from the same equations and both resistors are then rounded to the nearest E24 value, so the actual gain shown can differ from the gain you asked for.
An ideal op-amp has infinite open-loop gain and bandwidth, draws no input current and can drive its output to any voltage. A real part cannot. The output cannot go beyond the supply rails, so a calculated output voltage above the supply will clip. Gain falls at higher frequencies according to the part's gain-bandwidth product, and offset voltage, bias current and resistor tolerance all add error. The differential result is only valid when the two resistor ratios are equal.
The rows below were entered in the live calculator (local production build) and checked by hand calculation. Last run: November 20, 2026.
| Configuration and inputs | Gain | Gain (dB) | Also shown |
|---|---|---|---|
| Inverting: Rf 100 kΩ, Rin 10 kΩ, input 0.1 V | -10.000x | 20.00 dB | Output −1.0000 V |
| Non-inverting: Rf 47 kΩ, Rin 10 kΩ, input 0.5 V | 5.700x | 15.12 dB | Output 2.8500 V |
| Non-inverting, find resistors: gain 11, Rin 10 kΩ | 11.000x | 20.83 dB | Rf 100.00 kΩ, Rin 10.00 kΩ |
Hand check for row 2: gain = 1 + 47 / 10 = 5.7; 20 × log10(5.7) = 15.12 dB; output = 5.7 × 0.5 = 2.85 V. Found an error? Email hello@yourpcb.com.
Understanding Op-Amp Configurations
Operational amplifiers (op-amps) are versatile analog building blocks used in countless electronic circuits. By selecting the right configuration and resistor values, you can create amplifiers, buffers, filters, and signal conditioning circuits.
Common Configurations
Inverting Amplifier
Gain = -Rf / Rin
- • Output is 180° out of phase with input
- • Input impedance equals Rin
- • Virtual ground at inverting input
- • Can achieve gains less than 1
Non-Inverting Amplifier
Gain = 1 + Rf / Rin
- • Output is in phase with input
- • Very high input impedance
- • Minimum gain is 1 (unity)
- • Better for high-impedance sources
Differential Amplifier
Vout = (Rf/Rin) × (V1 - V2)
- • Amplifies difference between two inputs
- • Rejects common-mode signals
- • Useful for sensor interfaces
- • Requires matched resistors for best CMRR
Voltage Follower (Buffer)
Gain = 1
- • Unity gain (no amplification)
- • Extremely high input impedance
- • Very low output impedance
- • Isolates high-Z sources from loads
Ideal vs. Real Op-Amps
| Parameter | Ideal | Typical Real |
|---|---|---|
| Open-loop gain | ∞ | 100,000 - 1,000,000 |
| Input impedance | ∞ | 1MΩ - 10TΩ |
| Output impedance | 0 | 10Ω - 100Ω |
| Bandwidth | ∞ | 1MHz - 1GHz (GBW) |
| Input offset voltage | 0 | 0.1mV - 10mV |
| Input bias current | 0 | 1pA - 1µA |
Popular Op-Amp ICs
General Purpose
- • LM741 (classic)
- • LM358 (dual)
- • TL072 (JFET input)
- • NE5532 (audio)
Precision
- • OPA277 (low offset)
- • AD8628 (zero-drift)
- • LTC2057 (chopper)
- • OPA189 (ultra-low noise)
Rail-to-Rail
- • MCP6001 (single)
- • OPA344 (single supply)
- • AD8605 (low power)
- • LMV358 (low voltage)
Design Considerations
- Gain-Bandwidth Product (GBW): The product of gain and bandwidth is constant. Higher gain reduces available bandwidth. Check GBW in the datasheet.
- Resistor Selection: Use values between 1kΩ and 1MΩ. Too low increases power consumption; too high increases noise and offset errors.
- Matching Resistors: For differential amplifiers, use 0.1% tolerance resistors or resistor networks for best common-mode rejection.
- Stability: Some op-amps require compensation capacitors. Unity-gain stable op-amps are easier to use but may have lower bandwidth.
- Power Supply: Use adequate bypass capacitors (100nF ceramic + 10µF electrolytic) close to power pins. Consider single vs. dual supply operation.