Working out the right feedback resistor values for an op amp circuit by hand can be tedious and leaves plenty of room for mistakes—especially if you’re changing between inverting and non-inverting setups, or need to solve for a specific gain. This calculator lets you quickly figure out voltage gain, output voltage, and key resistor values (Rf, Rg, Rin) using common variables like Vin and desired gain. These calculations are routine if you’re conditioning sensor signals, amplifying audio, or designing precision analog gear—anywhere you need steady, predictable closed-loop gain. Here, you’ll find all the main formulas, a real-world example, discussion of configuration, and answers to practical engineering questions.
What is op amp gain?
Op amp gain is simply the ratio between output and input voltages—controlled by picking two resistor values. It's a straightforward process, needing no tuning beyond resistor choice.
Simple Explanation
A good way to picture an op amp is as a volume knob set by resistor values. Change the resistor ratio, and the amp changes how much the signal gets amplified. It’s immediate and direct—resistor values in, gain out.
📐 Browse all 1000+ Interactive Calculators
Quick Navigation
Op Amp Configuration Diagrams
Op Amp Gain Calculator
How to Use This Calculator
This calculator is intended for education, concept evaluation, and preliminary design. Results are based on the equations and assumptions described on this page, but cannot account for every real-world load case, tolerance, material property, environmental condition, installation detail, safety factor, code, or regulatory requirement. Verify all inputs, assumptions, units, and results independently before selecting components or using the result in a real application. Safety-critical, structural, medical, lifting, transportation, or regulated applications must be reviewed by a qualified engineer.
- Pick your calculation mode—choose the circuit type (inverting/non-inverting) and decide what you want to solve for (gain, Rf, or Vout).
- Enter the resistor values in ohms (Rf, Rg, or Rin depending on the mode) and any voltage values you have (Vin or Vout).
- If you want to solve for Rf, give the desired gain and the other resistor value (Rg or Rin).
- Click Calculate for the result.
Op Amp Gain Interactive Visualizer
Visualize how feedback resistor ratios control op amp gain in real-time. Toggle between inverting and non-inverting configurations to see the impact on signal polarity and gain calculation.
VOLTAGE GAIN
5.7
GAIN (DB)
15.1
OUTPUT VOLT
5.7V
PHASE
0°
FIRGELLI Automations — Interactive Engineering Calculators
Op Amp Gain Equations
Here’s the standard formula if you’re dealing with a non-inverting op amp.
Non-Inverting Configuration
Where:
- AV = voltage gain (dimensionless, always ≥ 1)
- Rf = feedback resistor from output to inverting input (Ω)
- Rg = resistor from inverting input to ground (Ω)
- Vin = input voltage applied to non-inverting input (V)
- Vout = output voltage (V, same polarity as Vin)
If you’re using an inverting op amp, use the formula below.
Inverting Configuration
Where:
- AV = voltage gain (negative, indicating 180° phase inversion)
- Rf = feedback resistor from output to inverting input (Ω)
- Rin = input resistor from signal source to inverting input (Ω)
- Vin = input voltage applied through Rin (V)
- Vout = output voltage (V, inverted polarity from Vin)
To get the gain in decibels, use this equation.
Gain in Decibels
Where:
- GaindB = voltage gain expressed in decibels (dB)
- |AV| = absolute value of voltage gain (magnitude only)
Simple Example
Non-inverting configuration: Rf = 10,000 Ω, Rg = 1,000 Ω.
AV = 1 + (10,000 / 1,000) = 11
With Vin = 1 V: Vout = 1 × 11 = 11 V
Gain in dB = 20 × log10(11) = 20.83 dB
Theory & Engineering Applications
Op amps handle analog signal amplification by relying on negative feedback and good resistor selection. Closed-loop gain in practice depends entirely on your resistor values—as long as your op amp has high enough open-loop gain (usually 100,000 or above). This makes it possible to set up circuits where the gain stays consistent, regardless of manufacturing or temperature differences between individual op amps.
Non-Inverting Amplifier Configuration
In a non-inverting setup, the input signal goes directly to the non-inverting (+) input. Part of the output gets fed back to the inverting (–) input via a resistor divider. Because of negative feedback, the voltage at the inverting terminal is forced to match the non-inverting input—often called the "virtual short." The textbook result is the familiar gain formula: AV = 1 + Rf/Rg.
This approach gives you very high input impedance—often in the megohms or even higher—since the signal doesn’t see any series resistance before reaching the op amp’s input stage. The lowest gain you can get is 1 (no amplification), which happens if Rf is set to zero (making what’s called a voltage follower, or buffer).
Inverting Amplifier Configuration
In the inverting setup, the non-inverting input is grounded and the signal goes through Rin to the inverting pin. The feedback resistor Rf connects the output back to that same pin. Because the inverting input is held at virtual ground, all input current (Iin = Vin/Rin) must flow through the feedback path, producing an output voltage equal to -Vin × (Rf/Rin). The minus sign shows you get 180° phase inversion at the output.
This design sets your input impedance to Rin—typically 10kΩ to 100kΩ for most general circuits, though it can be adjusted. That means your source must be able to drive this resistance, which can load weak signal sources. However, the inverting amp often does a better job rejecting common-mode noise and is handy if you want to sum signals or handle differential conversion.
Resistor Selection and Practical Limitations
The equations for op amp gain look easy but the choices you make for resistor values have to account for trade-offs. Going too low (below 1kΩ) means the op amp pulls more current at the output—sometimes more than it can handle without distortion or excess heat. Pushing values too high (well over 1MΩ) raises noise, makes the circuit more sensitive to stray interference, and can introduce unwanted DC offsets through the op amp's input bias currents.
Input bias currents typically fall between 10nA and 10µA depending on the op amp. When those currents flow through big resistors, they induce voltage offsets (Voffset = Ibias × R) that quickly add up. If you need offset under 1mV and your op amp’s bias current is 100nA, you’ll want to keep total resistance seen by that pin below 10kΩ. As a rule of thumb, 1kΩ to 1MΩ covers almost all sensible choices, with 10kΩ to 100kΩ being the usual starting point for most circuits.
Frequency Response and Bandwidth Considerations
Op amp bandwidth gets set by the gain-bandwidth product (GBW), which is fixed by the chip itself. For example, with a 1MHz GBW, you’ll get up to 1MHz bandwidth at unity gain, but only 100kHz if you raise the gain to 10, and just 10kHz with gain of 100. Beyond those points, the frequency response drops off. Large resistor values and layout can also cause high-frequency instability. Sometimes you need to add a small capacitor (1pF–100pF) in parallel with Rf to keep the circuit stable, even though that narrows the bandwidth further. To figure out the cap size, start with Cf ≈ 1/(2πRff-3dB).
Slew Rate and Large Signal Performance
Slew rate is how quickly the op amp output can change, typically in V/µs. This kicks in if you want high-amplitude or fast-changing signals. Say you want to output a 10Vpp (5V amplitude) sine at 16kHz: you’ll need at least 0.5V/µs of slew rate or you’ll see the signal distorting even if the small signal bandwidth looks high enough. This is often overlooked—audio and sensor applications where you swing several volts at high frequency will push up against these limits.
Worked Example: Precision Sensor Signal Conditioning
Suppose you have a strain gauge bridge that gives 3.73mV at full load, but your data system needs the signal to stretch from 0V up to 5V for accurate reads. You’ll want a non-inverting amp that boosts the signal by about 1340× (5V / 0.00373V). Resistor values have to keep offset currents low and bandwidth over 10kHz, with your op amp’s bias current capped at 50nA.
Step 1: Calculate Required Gain
Required gain: AV = 5V / 0.00373V = 1340.2. Use 1340 for calculations.
Step 2: Select Resistor Values for Minimal Offset
Using AV = 1 + Rf/Rg, rearrange to get Rf = (AV - 1) × Rg = 1339 × Rg. To cut offset, keep Rg moderate—say, 100Ω. That gives Rf = 133900Ω (standard value: 133kΩ), so gain is actually 1331.
Step 3: Verify Offset Error
Total resistance at the input is about 100Ω (parallel combo), and the bias current of 50nA produces 5µV offset, which multiplies out to 6.66mV at the output—just 0.13% error on 5V, which is reasonable.
Step 4: Check Bandwidth Requirements
To maintain 10kHz bandwidth at gain of 1331, GBW should be at least 13.31MHz. A TL072 (3MHz GBW) won’t cut it—its real bandwidth here would just be 2.25kHz. An LM833 (15MHz GBW) can deliver about 11.27kHz, so it passes.
Step 5: Verify Slew Rate for Dynamic Signals
At 5V amplitude and 10kHz: minimum slew rate is 0.314V/µs. The LM833’s 7V/µs is far more than you’ll need.
Final Design: Non-inverting amp with Rg = 100Ω, Rf = 133kΩ; LM833 op amp. Gain = 1331; output up to 4.96V for full-scale sensor; bias-induced offset about 0.13% of span; bandwidth about 11.3kHz.
For more engineering tools like this, see the engineering calculator library.
Practical Applications
Scenario: Audio Microphone Preamplifier Design
An audio engineer wants to bring a 2.1mV microphone signal up to a line level of 1.5V. Using non-inverting mode, entering Rf = 680kΩ, Rg = 1kΩ, and Vin = 0.0021V, output is about 1.43V with gain 681. The calculator recommends checking if the ±15V rails have enough headroom. Tweaking Rf to 715kΩ gets output almost spot-on at 1.5V, giving a preamp that matches the signal chain and avoids clipping.
Scenario: Industrial Temperature Sensor Interface
Suppose a thermocouple buffer gives 10mV/°C and you want to cover 0°C to 850°C (so, 8.5V span out). In inverting mode, a gain of 100 (with Rin = 10kΩ) needs Rf = 1MΩ. Feedback this high raises noise—a common issue. To fix it, break the design into two gain stages (each ×10, using Rf = 100kΩ) and you’ll end up with the same overall gain but better noise and less sensitivity to board layout.
Scenario: Biomedical ECG Front-End Development
Designing an ECG preamp, you need to take tiny 0.8mV heart signals up to 2.4V for an ADC. Non-inverting gain with Rf = 299kΩ, Rg = 100Ω gives about ×2991, a little off the target gain of 3000. Switching the calculator to solve for Rf, you get 299.9kΩ, which isn't a standard value—closest is 301kΩ (1% tolerance), which means a 0.3% error that’s usually fine. This setup outputs 2.41V on full-scale input, and with low Rg keeps input bias offset low (below 10µV), crucial for accurate bio-signal reads.
Frequently Asked Questions
Free Engineering Calculators
Explore our complete library of free engineering and physics calculators.
Browse All Calculators →🔗 Explore More Free Engineering Calculators
About the Author
Robbie Dickson — Chief Engineer & Founder, FIRGELLI Automations
Robbie Dickson brings over two decades of engineering expertise to FIRGELLI Automations. With a distinguished career at Rolls-Royce, BMW, and Ford, he has deep expertise in mechanical systems, actuator technology, and precision engineering.
📹 Video Walkthrough — How to Use This Calculator
📹 Video Walkthrough — How to Use This Calculator
Need to implement these calculations?
Explore the precision-engineered motion control solutions used by top engineers.
