DEV Community

Cover image for Op-Amp Circuits: Designing Gain You Can Actually Trust
NovaSolver
NovaSolver

Posted on • Originally published at novasolver.jp

Op-Amp Circuits: Designing Gain You Can Actually Trust

A raw operational amplifier is almost useless on its own. Its open-loop gain is enormous — often a hundred thousand or more — and wildly unpredictable from one chip to the next and one temperature to the next. Hand a designer a part whose gain might be 80,000 today and 200,000 tomorrow, and you have not handed them a tool. Yet the op-amp is one of the most dependable building blocks in all of analog electronics. The reason is feedback.

This article explains how negative feedback turns an unruly amplifier into a precise one, works through a non-inverting amplifier example, and shows why you cannot have both very high gain and very wide bandwidth from the same part.

Why this calculation matters

Op-amps sit in the signal path of almost everything that measures the physical world. A thermocouple produces microvolts; a strain gauge bridge produces millivolts; a photodiode produces a tiny current. Before an analog-to-digital converter can read any of them, the signal must be amplified by a known, stable factor. If that factor drifts, every downstream measurement drifts with it.

The calculation matters because the gain you design for is set almost entirely by two resistors, not by the amplifier itself. That is the quiet genius of feedback: it trades away raw gain — which you have in absurd excess — in exchange for predictability, lower distortion, and a flatter response. Knowing how to size those resistors, and knowing what bandwidth the choice costs you, is the core skill of practical op-amp design.

The core formula

Two idealizations carry most analog op-amp analysis. First, the input terminals draw no current. Second, when negative feedback is present, the amplifier drives its output until the two input voltages are equal — the "virtual short". These two rules let you solve most circuits with nothing more than Ohm's law.

For a non-inverting amplifier, the input signal goes straight to the non-inverting input, and a divider made of a feedback resistor R_f and a ground resistor R_in sets the closed-loop gain:

A_v = 1 + R_f / R_in
Enter fullscreen mode Exit fullscreen mode

The output is whatever it takes to make the divider's tap equal the input. Notice the gain can never fall below 1 in this configuration — a non-inverting amplifier cannot attenuate.

Gain is only half the story. Every op-amp has a roughly constant gain-bandwidth product, GBW. The bandwidth available at your chosen gain is:

f_bandwidth = GBW / A_v
Enter fullscreen mode Exit fullscreen mode

This is the central trade-off of op-amp design. Push the gain up and the usable bandwidth comes down in exact proportion. The product of the two stays fixed by the silicon.

A worked example

Design a non-inverting amplifier with a feedback resistor R_f = 90 kohm and a ground resistor R_in = 10 kohm. The op-amp has a gain-bandwidth product GBW = 1 MHz.

Step 1 — closed-loop gain.

A_v = 1 + R_f / R_in
A_v = 1 + 90 / 10
A_v = 1 + 9 = 10
Enter fullscreen mode Exit fullscreen mode

The amplifier multiplies its input by 10, and that figure depends only on the ratio of two resistors — not on the op-amp's open-loop gain, supply voltage, or temperature.

Step 2 — output for a given input.

V_out = A_v * V_in = 10 * 0.20 V = 2.0 V
Enter fullscreen mode Exit fullscreen mode

An input of 0.20 V produces an output of 2.0 V, cleanly and repeatably.

Step 3 — closed-loop bandwidth.

f_bandwidth = GBW / A_v = 1e6 / 10 = 100 kHz
Enter fullscreen mode Exit fullscreen mode

So this amplifier delivers a gain of 10 with a bandwidth of 100 kHz. Redesign it for a gain of 100 from the same part and the bandwidth collapses to just 10 kHz — higher gain buys less bandwidth. If your signal contains frequencies above that limit, the gain of 100 will not actually be there where you need it.

Common mistakes

Forgetting that bandwidth shrinks with gain. A gain of 1000 from a 1 MHz part leaves only 1 kHz of bandwidth. Designers sometimes set a large gain on paper, then are puzzled when the circuit cannot follow a 50 kHz signal. Cascade two moderate-gain stages instead of forcing one stage to do everything.

Ignoring the supply rails. The output cannot swing beyond the supply voltage — and many op-amps stop short of it. A gain of 10 with a 2 V input demands a 20 V output, which is impossible on a 15 V supply. The result is clipping, a flat-topped waveform full of harmonics.

Choosing resistor values without thinking about scale. Very large feedback resistors raise thermal noise and interact with the input bias current to create offset voltages. Very small ones load the output heavily. Values in the kilohm-to-hundreds-of-kilohm range are a sensible default.

Assuming the virtual short always holds. The equal-input-voltage rule depends on negative feedback being intact and the amplifier not being saturated. Once the output clips, the feedback loop is effectively open and the simple gain formula no longer applies.

Confusing inverting and non-inverting gain. The inverting amplifier has gain -R_f/R_in; the non-inverting one has 1 + R_f/R_in. The same two resistors give different magnitudes and opposite signs depending on which input the signal enters.

Try the interactive NovaSolver calculator

Op-amp behaviour clicks faster when you can watch the waveform respond. The Op-Amp Circuit Simulator on NovaSolver lets you pick a configuration — inverting, non-inverting, voltage follower, summing, integrator, or differentiator — set R_in, R_f, the supply voltage, and the input signal, and then see the gain in decibels, the output peak, and the phase shift update live. It also shows the output waveform clipping the moment you ask for more swing than the supply rails allow, which makes the supply-limit mistake hard to forget.

Related calculators

Browse the full collection in the electromagnetics tools hub.

Closing note

The op-amp's lesson is that you do not need a precise amplifier to build a precise circuit — you need negative feedback and two well-chosen resistors. Closed-loop gain is set by a ratio, the gain-bandwidth product is fixed by the part, and the two trade off against each other in a way you cannot cheat. Decide the gain you need, check the bandwidth it leaves you, confirm the output fits inside the supply rails, and the rest of analog signal conditioning becomes a series of small, honest calculations.

Top comments (0)