Analog Circuit Design

Op-Amp Gain Calculator

Calculate ideal closed-loop gain and output voltage for common inverting, non-inverting, and differential amplifier configurations.

Equation

Vout = (1 + Rf / Rg) x Vin

Single-ended input at the non-inverting terminal

Closed-Loop Gain

5.70000 V/V

Output Voltage

1.42500 V

Feedback Ratio

4.70000

Operational Amplifier Gain in Practical Analog Design

An operational amplifier is most useful when negative feedback forces the circuit around the amplifier to set a predictable closed-loop gain. The open-loop gain of a real op-amp is very large, varies with frequency, and is not directly used as the design value. Instead, external resistors route a portion of the output back to the input so the amplifier settles at the voltage that makes its two input terminals nearly equal. This calculator focuses on the three gain structures used constantly in analog front ends: inverting, non-inverting, and differential gain.

In an inverting amplifier, the input signal enters through an input resistor into the inverting node. The non-inverting terminal is usually tied to ground or a reference voltage. Because the op-amp drives its output until the inverting node is held close to the non-inverting node, that junction behaves like a virtual ground for small-signal analysis. The input current is approximately Vin / Rin, and the same current must flow through the feedback resistor because the op-amp input current is ideally zero. The result is Vout = -(Rf / Rin) x Vin. The negative sign is important because the output polarity is inverted.

In a non-inverting amplifier, the signal drives the non-inverting input directly. The feedback network is a divider from output to ground, with its midpoint connected to the inverting input. The op-amp output rises until the divided output equals the input voltage. The closed-loop gain is 1 + Rf / Rg, where Rg is the resistor from the inverting input to ground or reference. This topology has very high input impedance because the source does not need to drive the feedback network directly, making it useful for sensor buffers and ADC drivers.

Manual Calculation Steps

To calculate gain manually, identify the topology first. For an inverting amplifier with Rin = 10 kOhm and Rf = 47 kOhm, the gain is -47 kOhm / 10 kOhm = -4.7. A 250 mV input produces -1.175 V at the output in the ideal model. For a non-inverting amplifier with the same resistor values, the gain is 1 + 47 kOhm / 10 kOhm = 5.7, so a 250 mV input produces 1.425 V. The same two resistors produce different gains because the feedback geometry is different.

For a basic differential amplifier with matched resistor ratios, the output is (Rf / Rin) x (Vin+ - Vin-). If Rin = 10 kOhm, Rf = 47 kOhm, Vin+ = 250 mV, and Vin- = 100 mV, the differential input is 150 mV and the output is 705 mV. This form assumes that both sides of the differential amplifier use matched ratios. If the ratios are not matched, common-mode rejection degrades and the circuit no longer rejects voltage that appears equally on both inputs.

What the Ideal Formula Does Not Include

The ideal equations assume infinite open-loop gain, infinite input impedance, zero input offset voltage, zero bias current, unlimited output swing, and unlimited bandwidth. Real parts are not ideal. Output swing may stop a few millivolts or several volts away from the rails depending on the op-amp architecture and load current. Input common-mode voltage must stay within the data sheet range. Gain bandwidth product limits how much gain is available at frequency. Slew rate limits how quickly the output can move, so a high-gain circuit that works at DC can distort large high-frequency signals.

Resistor values also matter beyond the ratio. Very low resistor values increase output loading and power consumption. Very high values increase thermal noise, bias-current error, leakage sensitivity, and parasitic capacitance effects. A 10 kOhm to 100 kOhm range is common for many low-frequency signal paths, but precision instrumentation, low-noise audio, photodiode circuits, and high-speed interfaces often need more deliberate choices.

Engineering Applications

Op-amp gain stages appear in sensor conditioning, active filters, current shunts, bridge amplifiers, audio preamps, ADC input scaling, DAC output conditioning, and control loops. A load cell may need a differential amplifier or instrumentation amplifier to reject common-mode excitation voltage. A microcontroller ADC may need a non-inverting stage to scale a small sensor voltage into the converter range. An inverting summing amplifier may combine currents from multiple sources while preserving a fixed virtual-ground node.

After calculating gain, engineers should check headroom, expected output range, input common-mode range, resistor tolerance, offset error, noise, and bandwidth. The closed-loop equation is the starting point, not the complete design review. A correct gain value on paper still fails if the output saturates, if the op-amp cannot drive the load, or if the selected part is unstable with the feedback network and capacitive load used on the PCB.