Op-Amp Calculator
Pick any of 9 classic op-amp configurations — inverting, non-inverting, follower, summing, difference, integrator, differentiator, instrumentation, comparator — adjust component values, and watch the gain formula and output waveform update in real time.
Inverting
Supply Rails
Av = −Rf / Rin
= −10.0 / 1.0 = -10.0
Vout swing (sine):
Vout(+peak) = -10.0 × (−1.0) = 10.00 V
Vout(−peak) = -10.0 × 1.0 = -10.00 V
Op-amp gain configurations
An op-amp with negative feedback enforces its two input terminals to the same voltage (virtual short). This single principle drives both inverting and non-inverting gain configurations, and makes op-amp circuit analysis predictable.
Inverting amplifier
Av = −Rf / Rin. The inverting input is held at virtual ground (0 V) by feedback. Input impedance ≈ Rin. The minus sign means the output is 180° phase-shifted from input.
Non-inverting amplifier
Av = 1 + Rf / R1. Minimum gain is 1 (unity). Input impedance is very high (op-amp input impedance). Used as a buffer stage when source impedance must not be loaded.
Gain-bandwidth product (GBW)
GBW = Av × f−3dB = constant for a given op-amp. A gain of 100 with a GBW of 1 MHz gives a −3 dB bandwidth of 10 kHz. Higher gain = narrower useful bandwidth.
Learn more → Op-Amp Configurations — Learn
Quick experiments
- Same resistors, different sign. Set Rf = 100 kΩ and Rin = 10 kΩ. Inverting gives −10; switch to non-inverting with the same pair and you get +11, not +10. The extra 1 is the input signal reaching the output directly, and it is why a non-inverting stage cannot have a gain below unity.
- Build a buffer. Choose the follower. Gain is exactly 1, and the point is impedance: a near-infinite input and a near-zero output, so a high-impedance sensor can drive a heavy load without sagging.
- Average two signals. In the summing configuration with equal input resistors, the output is the inverted sum. Make Rf half the input resistors and it becomes the negative mean — a one-op-amp mixer.
- Watch an integrator drift. Feed the integrator a square wave and you get a triangle. Feed it any real signal with a DC offset and the output ramps into the rail, which is why practical integrators put a large resistor across the capacitor to bound the DC gain.
Op-amp configurations — reference
Every formula below comes from two assumptions. First, the inputs draw no current. Second, negative feedback drives the difference between the inputs to zero — the virtual short. In an inverting stage the inverting input therefore sits at ground potential without being connected to ground, which is why it is called a virtual earth.
The core configurations
Inverting: A = −Rf / Rin. Input impedance is just Rin, which loads the source. Non-inverting: A = 1 + Rf / Rg, with input impedance set by the op-amp itself and therefore very high. Follower: the non-inverting case with Rf = 0, giving unity gain and maximum input impedance. Difference: amplifies V2 − V1, but only rejects common-mode signals as well as its resistors are matched. Instrumentation: two buffers in front of a difference stage, which fixes both the impedance and the matching problem.
Gain-bandwidth product
Closed-loop gain and bandwidth trade off against each other: their product is roughly constant. A part with a 1 MHz GBW gives 1 MHz at unity gain, 100 kHz at a gain of 10, and 10 kHz at a gain of 100. A circuit that works on the bench at 1 kHz and fails at 50 kHz has usually run out of GBW rather than developed a fault.
Slew rate is a separate limit
Slew rate caps how fast the output can move, in V/µs, regardless of bandwidth. A large fast step turns into a ramp when it exceeds the slew rate — a distinct failure from bandwidth roll-off, and one that appears as visible triangular distortion on what should be a square wave.
Practical limits the formulas ignore
Output swing stops short of the supply rails unless the part is rail-to-rail. Input offset voltage is multiplied by the same gain as your signal, so a high-gain DC stage amplifies its own error too. Input bias current develops an offset across your feedback resistors, which is why high-value networks favour FET-input parts. And a comparator, unlike every other configuration here, runs open-loop — it has no feedback, so none of the virtual-short reasoning applies to it.
Common mistakes
Expecting a non-inverting amplifier to attenuate.
Its gain is 1 + Rf/Rg, which can never be less than 1. Attenuation needs a divider on the input or an inverting configuration.
Leaving a non-inverting input without a DC path.
Bias current has to flow somewhere. With no resistor to ground the input drifts to a rail and the output saturates — a circuit that looks correct on paper but never works.
Ignoring the gain-bandwidth product.
A 1 MHz part at a gain of 100 gives roughly 10 kHz of usable bandwidth. Choosing an op-amp on gain alone leaves the signal rolled off.
Running a single-supply op-amp without a mid-rail reference.
On one supply the output cannot go below ground, so an AC signal clips on the negative half. Bias the input to half the supply first.
Assuming rail-to-rail means all the way to the rails.
Rail-to-rail parts approach the rails only when lightly loaded. Under a few milliamps of load, expect to lose a hundred millivolts or more at each end.
Frequently asked questions
What is the gain of an inverting amplifier?
Gain is minus Rf divided by Rin. With Rf = 100 kilohm and Rin = 10 kilohm the gain is minus 10, meaning ten times amplification with the output inverted.
What is the gain of a non-inverting amplifier?
Gain is 1 plus Rf divided by Rg. The same 100 kilohm and 10 kilohm pair gives a gain of 11, and a non-inverting stage can never have a gain below 1.
What is a virtual short in an op-amp circuit?
With negative feedback the op-amp drives its output until both inputs sit at the same voltage. In an inverting amplifier that holds the inverting input at ground even though it is not connected there, which is why it is called a virtual ground.
Why does my op-amp output not reach the supply rails?
Most op-amps lose one to two volts at each rail. A rail-to-rail part gets much closer but only when lightly loaded. If full swing is required, choose a rail-to-rail output stage and keep the load light.
Why does gain drop at higher frequencies?
The gain-bandwidth product is roughly constant, so the available gain falls as frequency rises. A 1 MHz part configured for a gain of 100 gives only about 10 kHz of bandwidth.
Related tools
Transistor Bias Explorer
DC bias → small-signal equivalent — hybrid-π (BJT) and FET models with Q-point coach.
Open →CE / CS Amplifier Bench
Design a common-emitter or common-source stage — bias, load line, gain, impedance.
Open →Differential Pair Playground
Sweep the differential input and watch current redistribute — gains and CMRR live.
Open →Diode Lab
I-V plotter, half-wave, full-wave (bridge / center-tapped) — one widget.
Open →Zener Regulator Playground
Live Zener regulator + 4-curve compare (Zener / LED / Schottky / photodiode).
Open →BJT Simulator
Switch (cutoff / active / saturation) + Q-point stability across β and temperature.
Open →Browse the full circuit toolkit or start a guided lesson in topics.