Op Amp Gain Calculator - Inverting & Non-Inverting Gain
Use this op amp gain calculator to find voltage gain for inverting and non-inverting circuits. Enter Rin and Rf to read magnitude, decibels, and output phase.
Op Amp Gain Calculator
Results
What Is the Op Amp Gain Calculator?
An op amp gain calculator is a quick way to find the closed-loop voltage gain of an operational amplifier circuit from the two resistors that set the feedback network, and it tells you whether the output is in phase with the input or flipped 180 degrees.
- • Design an audio pre-amplifier: Pick Rin and Rf so a microphone or line-level signal lands at the ADC input range without clipping.
- • Build a summing or difference amplifier: Set the feedback and input resistors so the per-channel gain matches what your signal chain expects.
- • Verify a non-inverting buffer: Check that a unity-gain follower delivers a gain of 1 with 0° phase before a high-impedance sensor.
- • Translate gain into decibels for an RF chain: Convert the voltage gain magnitude into dB so a stage matches the budget of an antenna or mixer datasheet.
Operational amplifiers are the workhorses of analog signal conditioning, and almost every circuit starts with the two resistor values that set the closed-loop gain. The same math covers a TL072 audio pre-amp, an LM358 sensor front end, and a precision OPA227 instrumentation channel.
The calculator also prevents the most common sign mistake: inverting and non-inverting configurations share the same gain magnitude when the resistor ratio matches, but the polarity is opposite, which decides whether the next stage sees a positive or negative version of your signal.
When you only need to step a supply voltage down, the voltage divider calculator gives the unloaded Vout from two resistors using the same ratio math that op-amps rely on for feedback.
How the Op Amp Gain Calculator Works
The calculator evaluates two textbook gain equations, one for the inverting configuration and one for the non-inverting configuration, and reports the magnitude in linear units and decibels alongside the output phase.
- R_in (or R1): Resistor between the input source and the op-amp inverting terminal. It sets the input impedance and is the gain-ratio denominator.
- R_f (or R2): Feedback resistor between the op-amp output and the inverting input. The R_f / R_in ratio sets the gain magnitude.
- Configuration: Whether the input goes to the inverting terminal (inverting, gain negative) or the non-inverting terminal (non-inverting, gain positive).
Both equations assume the op-amp's open-loop gain is large enough that any difference between the two inputs is amplified until it is essentially zero. With negative feedback through R_f, the inverting input tracks the non-inverting input, and the algebra collapses to a simple resistor ratio.
Once the linear gain is known, the calculator takes its absolute value and applies the 20 log10 voltage rule to express the result in decibels. The sign is dropped because dB describes magnitude only, and the phase column carries polarity separately.
Inverting pre-amp with Rin = 1 kΩ and Rf = 10 kΩ
Configuration = inverting, Rin = 1 kΩ, Rf = 10 kΩ
A_v = -R_f / R_in = -10000 / 1000 = -10; magnitude = 10; dB = 20 log10(10) = 20.00 dB; phase = 180°
A_v = -10×, magnitude 10×, 20.00 dB, output 180° out of phase.
A 100 mV input becomes -1 V at the output. The same numbers apply to any small-signal audio or sensor front end.
Non-inverting buffer with Rin = 1 kΩ and Rf = 10 kΩ
Configuration = non-inverting, Rin = 1 kΩ, Rf = 10 kΩ
A_v = 1 + R_f / R_in = 1 + 10000 / 1000 = 11; magnitude = 11; dB = 20 log10(11) = 20.83 dB; phase = 0°
A_v = 11×, magnitude 11×, 20.83 dB, output in phase with the input.
The same resistor pair gives a different gain because the signal also passes through the op-amp's own unity-gain path. Use this when you want amplification without flipping polarity, for example to drive an ADC from a high-impedance sensor.
According to Wikipedia (Operational amplifier), the voltage gain of an inverting op-amp is A_v = -R_f / R_in and the gain of a non-inverting op-amp is A_v = 1 + R_2 / R_1, with the negative sign indicating the 180° phase inversion.
Pick Rin and Rf with standard E12 or E24 values and check the actual load behavior with the electrical resistance calculator before you place the parts on a breadboard.
Key Op Amp Concepts Explained
Four ideas show up in every op-amp gain discussion; understand these once and the rest of the page reads itself.
Inverting vs non-inverting topology
In the inverting configuration the input signal goes through Rin into the inverting terminal, so the output is 180° out of phase and the gain is negative. In the non-inverting mode the signal enters the non-inverting terminal directly, the output stays in phase, and the formula adds +1 instead of a leading minus sign.
Negative feedback
Routing part of the output back through R_f forces the op-amp to settle where its two inputs sit at the same voltage. That is what turns an open-loop gain of 100000 or more into a closed-loop gain set only by the resistor ratio.
Gain in decibels
Voltage gain is reported in decibels as 20 log10(|A_v|). The 20 comes from converting a power ratio to a voltage ratio (10 · 2), and the absolute value drops the sign because dB describes magnitude only.
Closed-loop versus open-loop gain
Open-loop gain is the op-amp's intrinsic amplification without feedback; closed-loop gain is what the resistor network actually delivers. Real op-amps only deliver the closed-loop value at frequencies well below the gain-bandwidth product, so very large resistor ratios stop working at high audio or RF frequencies.
These four ideas are enough to read any op-amp datasheet, because input offset voltage, gain-bandwidth product, and slew rate all describe how the closed-loop gain behaves at the edges of real device performance.
According to Wikipedia (Negative-feedback amplifier), applying negative feedback trades open-loop gain for predictable closed-loop gain, wider bandwidth, and lower distortion.
If your gain figure needs to land on a 50 Ω or 75 Ω RF load in dBm instead of dB, the dBm to watts calculator applies the same 20 log10 voltage rule to translate the gain into a power level.
How to Use the Op Amp Gain Calculator
Five quick steps take you from a resistor pair to a complete gain, magnitude, decibel, and phase result.
- 1 Pick the op-amp configuration: Select Inverting if the signal goes through Rin into the inverting terminal, or Non-Inverting if it goes into the non-inverting terminal.
- 2 Enter the input resistance: Type Rin (inverting) or R1 (non-inverting) in ohms. The 1 kΩ default is a sensible starting point for low-impedance audio and sensor signals.
- 3 Enter the feedback resistance: Type Rf (inverting) or R2 (non-inverting) in ohms. Set Rf to 0 Ω for a unity-gain non-inverting buffer.
- 4 Read the linear gain and magnitude: Voltage Gain shows the signed result (negative for inverting, positive for non-inverting); Gain Magnitude strips the sign for comparison with datasheet numbers.
- 5 Check the decibel and phase values: Use Gain in Decibels for RF budgets. Confirm the phase is 180° for inverting or 0° for non-inverting before connecting downstream stages.
A microphone pre-amp uses an inverting op-amp with Rin = 2.2 kΩ and Rf = 47 kΩ. The calculator returns about -21.4× gain, 21.4× magnitude, 26.6 dB, and 180° phase, which fits a dynamic microphone running into a line-level ADC input.
For an audio load, the rms-to-watts calculator turns the post-amp RMS voltage into continuous watts so you can match amplifier headroom to the speaker rating.
Benefits of Using This Op Amp Gain Calculator
Six practical benefits explain why this calculator saves time compared with working the formulas by hand or relying on a SPICE simulator.
- • Cuts resistor-pair mistakes: Pairs the two gain formulas on one screen so you cannot accidentally swap them.
- • Returns all four useful outputs at once: Shows signed gain, magnitude, decibels, and phase together so you can paste any into a design log.
- • Works with any resistor pair: Accepts Rin and Rf from 1 Ω up to 10 MΩ, so it covers audio, instrumentation, and RF front ends without preset menus.
- • Highlights polarity risk: Forces you to read the phase column, the most common source of polarity bugs in mixed-signal designs.
- • Supports back-of-envelope RF budgets: Converts linear gain into decibels using the same 20 log10 rule RF engineers use, so the result drops into a link budget or noise figure calculation unchanged.
- • Reinforces the dB rule: Shows the 20 log10 conversion for every result, which trains the right habit for the rest of an analog or RF design career.
For matched-impedance lines, the RF unit converter applies the same 20 log10 voltage rule to convert the post-amp voltage into dBm at the load so the link budget stays consistent end to end.
Factors That Affect Your Op Amp Gain Results
Five factors decide whether the calculator's result matches the gain you measure on the bench, and two limitations tell you when to reach for a more detailed analysis.
Resistor tolerance
1 percent resistors give a worst-case gain error of about 2 percent, while 5 percent carbon-film parts can swing the gain by 10 percent. The calculator assumes ideal values, so plan extra margin with loose-tolerance parts.
Gain-bandwidth product (GBW)
Every general-purpose op-amp has a finite GBW. As closed-loop gain rises, usable bandwidth shrinks, so a gain of 1000 on a 1 MHz device rolls off before 1 kHz. Pick a faster op-amp or a lower resistor ratio if you need both high gain and wide bandwidth.
Input bias current and offset voltage
Bias current through Rin produces an offset error, and the input offset voltage is amplified by the same factor as your signal. High-gain circuits amplify any DC offset right alongside the signal you care about.
Load impedance and output current
Heavy loads pull the output stage toward its current limit, which reduces actual gain. The calculator assumes a high-impedance load, so check the op-amp datasheet if the next stage draws significant current.
Power supply rails
Op-amps cannot swing their output past the supply rails minus headroom. A gain of 100 on a ±12 V supply clips before the input reaches 120 mV, so a high gain forces you to use higher supply voltages or a smaller input signal.
- • The closed-loop formulas assume an ideal op-amp with infinite open-loop gain and zero output impedance, so the calculator does not model finite GBW, slew rate, or output stage limits. Use SPICE for those effects.
- • The decibel output uses the 20 log10 voltage rule, which assumes a high-impedance sensor or ADC input. For matched-impedance RF stages, convert to dBm with the appropriate reference impedance.
According to All About Circuits (Introduction to the Decibel), op-amp gain in decibels equals 20 log10 of the magnitude because voltage is a field quantity and uses the 20 multiplier rather than 10.
To convert that dB figure back into a linear ratio or add two gain stages in dB, the decibel calculator applies the same 20 log10 voltage rule with dB-addition math.
Frequently Asked Questions
Q: What is op amp gain?
A: Op amp gain is the ratio of output voltage to input voltage for an operational amplifier circuit with negative feedback. For the inverting configuration it equals -Rf/Rin, and for the non-inverting configuration it equals 1 + R2/R1. Both expressions assume the op-amp itself has very high open-loop gain and that feedback forces the differential input to zero.
Q: How do you calculate inverting op amp gain?
A: Divide the feedback resistor by the input resistor and apply a negative sign: A_v = -Rf/Rin. So Rin = 1 kΩ and Rf = 10 kΩ give a gain of -10, meaning a 1 V input becomes a -10 V output. The minus sign is the 180° phase inversion that defines the inverting topology.
Q: How do you calculate non-inverting op amp gain?
A: Add one to the resistor ratio: A_v = 1 + R2/R1. With R1 = 1 kΩ and R2 = 10 kΩ the gain is 11, so a 1 V input becomes an 11 V output that stays in phase with the source. Setting R2 to 0 Ω turns the circuit into a unity-gain buffer with A_v = 1.
Q: Why is inverting op amp gain negative?
A: The negative sign reflects the 180° phase inversion between input and output that the inverting topology introduces. The op-amp tries to keep its inverting input at the same voltage as the non-inverting input, so any rise in the input pulls the output downward to compensate. The magnitude Rf/Rin is what most designers care about; the sign is what tells you the polarity flipped.
Q: How do you convert op amp gain to decibels?
A: Take 20 times the log base 10 of the gain magnitude: dB = 20 log10(|A_v|). Because voltage is a field quantity, the decibel uses a factor of 20 rather than 10. A gain of 10 becomes 20 dB, a gain of 100 becomes 40 dB, and a gain of 1 becomes 0 dB.
Q: What is a good op amp gain for audio?
A: Line-level audio pre-amps usually run from unity gain up to about 10× (20 dB), while microphone pre-amps can run from 10× to 1000× (20 dB to 60 dB) depending on the microphone and source level. Going much past 1000× invites noise, oscillation, and gain-bandwidth-product problems with most general-purpose op-amps.