I have started learning about op-amps and have a question. If Vout is the gain times the difference in voltage at the inputs, why is Vout not always zero if we assume the voltages at the inputs are the same due to the golden rule?

  • 1
    \$\begingroup\$ That would be open loop gain, where there is no feedback. The opamp can only work to equalise both inputs when a feedback network is applied. This feedback network changes the transfer function. \$\endgroup\$ Oct 17, 2020 at 19:48
  • \$\begingroup\$ @Unimportant Ok so that golden rule only applies for feedback \$\endgroup\$
    – Nicokofi
    Oct 17, 2020 at 19:52
  • 1
    \$\begingroup\$ Yes, think about it, without a feedback network there is nothing the opamp can do to make both inputs equal. The output needs to somehow affect an input to be able to do that. Without feedback the rule is broken and both inputs will not be equal. \$\endgroup\$ Oct 17, 2020 at 19:55
  • \$\begingroup\$ Try read this electronics.stackexchange.com/questions/441184/… \$\endgroup\$
    – G36
    Oct 18, 2020 at 5:40
  • \$\begingroup\$ Even more basic but basically the same mechanism: in a circuit with perfect conductors between components, how is it possible to have a current in the wires when there is a zero voltage drop at their ends? The answer is that the behaviour of ideal circuits should be seen as the limit behavior of nearly ideal circuits. So, if the conductor is carrying 1A it can have a resistance of .001 ohm and a voltage drop of 1mV, or a resistance of 0.000001 ohm and a voltage drop of 1uV or... etc. In the limit of zero resistance you can have a finite current with zero volts across the wire. \$\endgroup\$ Oct 18, 2020 at 9:53

8 Answers 8


I think your confusion is in thinking that the inputs are always at the same voltage. This rule only applies if the circuit has negative feedback, which means that the output voltage changes in a way that tends to make the input voltages the same.

As others have pointed out, the input voltages are never exactly the same, but if the open-loop gain of the op amp is very high then the difference between the input voltages will be very small. Assuming that the input voltages are equal is a useful approximation if you want to quickly determine the general behavior of an op amp circuit.


I think your confusion comes from the differences between a theoretical ‘ideal’ op-amp and what’s actually realizable with electronics. tl; dr: the real op-amp using negative feedback will have a residual voltage difference on its inputs due to its limited gain.

Let’s walk through this.

The ‘golden rules’ of ideal op-amps are:

  • infinite open-loop gain (implies infinite voltage and zero output impedance)
  • infinite impedance inputs

Apply a difference of zero volts to both inputs and the output will be exactly zero. Apply any difference and it will get amplified to + or - infinity.

Add negative feedback, and the feedback path from the output forces the (-) input to bring the inputs back into balance. Thus, the (-) input tracks the (+) input exactly, such that input difference will always be zero.

Real op-amps don’t have infinite gain. They do however have very high gain (some in the 120dB / 1 million range.) They also have some other deviations from ideal that creep in and influence the output. More on those below. The upshot is, our imperfect real-world op-amp will have a nonzero voltage difference at the terminals for any output other than zero volts. This can be found from the open-loop gain.

For example, that op-amp with 120dB (10^6) open-loop gain showing 1V on the output will have 1 microvolt difference on the inputs. Stated another way, a 0dB signal on the output will be showing a -120dB signal on the input. This is true regardless of the feedback. It is determined strictly by the gain.

Simulate it here: unity follower using op-amp with 10^6 gain (Tip: Try the op-amp gain slider and see the influence on the output voltage.)

With such a high gain, this residual input voltage difference is practically insignificant when compared to the other errors that bedevil op-amps in the real world. Let’s talk about those.

More about Ideal vs Real Op-Amps

Besides less-than-infinite gain, real op-amps have a number other errors that influence the output. An incomplete list of these include:

  • Input offset voltage
  • input bias current
  • common-mode rejection ratio (CMRR)
  • frequency-dependent gain / limited slew / phase offset (AC gain)
  • limited output compliance

Input offset needs to be accounted for when very high gain or low input voltages are in use.

Bias current comes into play when very high gain or resistance feedback values are used. Bipolar op-amps specifically will need this accounted for, less so JFET or MOSFET-input devices.

Common-mode rejection means that the common DC voltage on (+) and (-) can influence the output with an offset. Ideal op-amps have infinite rejection; real op-amps do not. The popular LM324 for example has a CMRR of about 80dB (a little under 10,000:1).

Real op-amps have gain that decreases with higher frequency, especially for internally-compensated general-purpose op-amps like the LM324. Some phase error is introduced as well. The higher the gain used, the more this has an effect. This is described as the gain-bandwidth product.

Finally, the output compliance range (output swing) will limit the gain that is possible. The op-amp output impedance also limits the amount of current it can push back to the feedback network.

Taken together, these non-ideal characteristics of op-amps set limits on realizable op-amp circuit performance. It’s no wonder that there are so many different kinds of op-amps to choose from.

Further Reading

Here's an MIT Open Course Ware paper with more in-depth analysis of ideal, infinite-gain vs. real, finite gain op-amps, showing the generalized equations: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-071j-introduction-to-electronics-signals-and-measurement-spring-2006/lecture-notes/22_op_amps1.pdf


The voltage differences between the inputs is not zero (even in negative feedback circuits). There can be a very small difference. The output is this small difference multiplied by the open-loop gain.

  • 1
    \$\begingroup\$ And what is the point of this? \$\endgroup\$ Oct 17, 2020 at 20:50
  • 2
    \$\begingroup\$ @Circuitfantasist What is the point of what? \$\endgroup\$
    – Hearth
    Oct 18, 2020 at 1:16
  • \$\begingroup\$ @Hearth, To have a small difference between the inputs... I just wondered what OP thinks when reading these statements... because I am still wondering about the philosophy of this arrangement... \$\endgroup\$ Oct 18, 2020 at 4:51
  • 3
    \$\begingroup\$ @Circuitfantasist It doesn't matter what the philosophy is, it's what physically happens. \$\endgroup\$
    – Hearth
    Oct 18, 2020 at 5:25
  • 1
    \$\begingroup\$ Really? I think both they are necessary... \$\endgroup\$ Oct 18, 2020 at 7:12

If Vout is the gain times the difference in voltage at the inputs how is Vout not always zero if we assume the voltages at the inputs are the same

To rework Transistor's answer, the inputs are not the same. The opamp is a component with a fixed gain, called its open loop gain. Sticking with DC circuits for simplicity, let's say the opamp has an open-loop voltage gain of 1 million (120 dB). That is its gain all the time, no matter what kinds of feedback circuits surround it. If the output is at 1 V, then the inputs are 1 uV apart. The gain of the opamp as a component is like the resistance of a resistor - for a normal part in a normal circuit, its value does not change due to circuit conditions.


Thought experiment

To see the role of the op-amp gain, you can conduct a very useful mental experiment:

  • Imagine you can change the op-amp gain from 1 to 1,000,000 (this is a specially designed variable-gain op-amp for such educational purposes).

  • Make the simplest op-amp circuit with negative feedback - an op-amp follower.

  • Apply a constant input voltage Vin.

  • Vary the op-amp gain from minimum to maximum and observe how the three voltages (Vin, Vout and Vin - Vout) change. In the beginning, Vout = Vin/2 and Vout - Vin = Vin/2 (huge error). At the end, the difference will be negligible and Vout will be almost equal to Vin.


Now let's do it with the help of CircuitLab running a DC sweep simulation with varying op-amp open loop gain OA.A_OL. To see the most interesting first part of the graphs, I have set a sequence of gains (1,2,3...10,20,30...100). As you can see, the error op-amp input voltage rapidly decreases from 500 mV (gain of 1) to 10 mV (gain of 100).


simulate this circuit – Schematic created using CircuitLab

Graph A = 1 - 100


Other answers have adequately addressed the question of why the output voltage of an op-amp is non-zero, when the difference between the inverting and non-inverting input voltages is very small, or approximately 0. In this answer, I address the question of why the output voltage of an open loop op-amp is non-zero, even when the difference between the inverting and non-inverting input voltages is "exactly" zero, i.e. the inputs are tied together.

If the inverting and non-inverting inputs of an op-amp are tied together and held at some voltage \$V_{in}\$, the output voltage is some function of \$V_{in}\$ and the power rail voltages. That function depends on the type of op-amp as well as the individual characteristics of the individual device at the temperature it has at that moment, as well as the load on the output. Finally, even in a fixed environment, the output will undergo a transient modification. Practically, one should consider this output voltage to be undefined.

CircuitLab shows \$V_{out}\$ of the following circuit as 0. However, because we can treat the actual value as "undefined", CircuitLab's result is acceptable. In reality, the voltage is almost certainly some value other than 0.


simulate this circuit – Schematic created using CircuitLab

In op-amp tutorials, one is taught that:

$$V_{out} = A_{0} \times (V_{in+}-V_{in-})$$

where \$A_0\$ is the open-loop gain, and \$V_{in+}\$ and \$V_{in-}\$ are the voltages at the non-inverting and inverting input pins respectively.

Using this equation, one can derive the behavior of the op-amp in various feedback scenarios.

For example, in a simple inverting amplifier configuration we can calculate the gain based upon the feedback network resistances.


simulate this circuit

Using the open-loop equation above, we can calculate the closed loop gain \$A_{V}\$ as follows.

We assume that the current into the inverting input is 0,

$$\frac{V_{in} - V_{in-}}{R_{in}} + \frac{V_{out}-V_{in-}}{R_f} = 0$$

$$20{V_{in} - V_{in-}} + {V_{out}-V_{in-}} = 0$$

$$20V_{in} + V_{out} = 21V_{in-}$$

$$20V_{in} + V_{out} = \frac{21}{A_0}V_{in-}$$

Since \$A_0\$ is very large, we get

$$V_{out} \approx -20V_{in}$$

$$A_V \approx -20$$

That is the usual math that is presented. However, let's see what happens when we add some arbitrary value \$x\$ to \$V_{out}\$ in the open loop formula:

$$V_{out} = A_0(V_{in+} - V_{in-}) + x$$

Letting \$V_{in+}=0\$ and solving for \$V_{in-}\$ we get

$$\frac{V_{out}-x}{A_0} = V_{in-}$$

and if we now calculate the closed loop gain of our circuit, we get

$$20V_{in} + V_{out} = \frac{21}{A_0}(V_{in-}-x)$$

which again, since \$A_0\$ is very large, gives us the approximation

$$V_{out} \approx -20V_{in}$$

$$A_V \approx -20$$

So we see that,

the arbitrary offset that the open loop output voltage has from 0V, when the inputs are at the same voltage does not affect the closed loop gain of an op-amp circuit with negative feedback.

That is why the tutorials and simulators ignore this offet, even though it can easily be observed with an oscilloscope or voltmeter.

At this point, I would like to address one futher point. Most op-amps have internal compensation. We saw before the formula

$$V_{out} = A_{0} \times (V_{in+}-V_{in-})$$

which we argued was not correct, for it didn't include an output offset term, but which was "good enough", because in op-amp circuits with negative feedback, the output offset term made negligible difference to the closed loop behavior.

The "corrected" equation we gave was:

$$V_{out} = A_0(V_{in+} - V_{in-}) + x$$

But this "corrected" equation is also incorrect. The instantaneous output of an op-amp is quite simply NOT some function of the instantaneous inputs. Rather, an op-amp is affected by the history of the inputs. Most op-amps, and nearly all of the commonly used ones, have internal compensation. This compensation makes an open loop op-amp appear as an active low pass filter, with a break frequency usually below the audible range. As a low pass filter, it acts somewhat like an PI (Proportional and Integral) controller. Thus, any input error (subject to correction by input offsets) will be integrated and the error term will become larger over time. As before

In an op-amp circuit with negative feedback, the integral term does not appear to affect the behavior of the closed loop circuit (except to reduce the bandwidth with rising gains)

Thus, this aspect of op-amp behavior is often ignored in lower level tutorials. However, it can be observed by comparing the phase of the inputs at the input pins (not the overall circuit inputs) with the phase of the output. Both in reality, and in many simulators (such as CircuitLab), one can see that the differential input voltage is approximately \$90^\circ\$ out of phase with the output.

How this aspect of op-amp behavior is relevant to our question, is that the integrating factor of op-amps tends to cause open-loop circuits to drive toward saturation. Thus, it would not be uncommon to see the output of our first circuit in saturation. Depending on the type of op-amp, the output voltage could be from a few tens of millivolts to a few volts away from one of the rails. But this saturation may not come immediately, but only after the compensation capacitor in the op-amp fully charges or discharges, i.e. after some delay.

The above point is perhaps rather minor, but knowing these minor points can help avoid confusion when observing or troubleshooting a circuit. Also, understanding these points may help one in deciphering the schematics for op-amps. If you understand these "minor" points, you may save yourself from fruitlessly trying to understand questions based upon false premises, such as "how does the op-amp with equal input voltages know how to set the output to 0V?" The answer to this question is "it doesn't".

  • \$\begingroup\$ An interesting and thorough presentation of the problem... It brings me back to Barrie Gilbert's Op amp myths and specifically the Integrator inside section. \$\endgroup\$ Mar 11 at 18:11

If Vout is the gain times the difference in voltage at the inputs

Open-loop gain* (AOL)

enter image description here

how is Vout not always zero if we assume the voltages at the inputs are the same due to the golden ratio?

I really don't know how it is related to the golden ratio. In practice, there's always a non-zero difference (or simply, error) between non-inverting (+) and inverting (-) inputs. This voltage is called Input Offset Voltage and is shown as Vos in the datasheets. Even if you ground both inputs, the output will be VOUT = Vos . AOL. If AOL is high enough then the output may hit positive or negative supply rail. This is called "saturation".

  • 2
    \$\begingroup\$ I think he meant: "If Vo = (V+ - V-)*A and, according to the golden rules, both inputs are always equal, why is Vo not always 0?". (And the answer is because the inputs only equal with feedback and he's giving the formula for open loop). \$\endgroup\$ Oct 17, 2020 at 20:04
  • \$\begingroup\$ @Unimportant with negative* feedback. \$\endgroup\$ Oct 17, 2020 at 20:07
  • \$\begingroup\$ The input offset voltage is not related to the OP's question and is even misleading here. The question is about the so-called "static error" due to the finite op-amp gain. \$\endgroup\$ Oct 17, 2020 at 20:38

Op-amps have very high gain. So if you divide the output voltage by a large gain you get a voltage difference between inputs that’s “close enough to zero”. An ideal op-amp’s limit for gain is infinity, so an ideal op-amp would actually have zero volts at the input. Real op-amps are infinitely far away from the ideal :)

It is possible to drive real-world op-amps open loop and maintain a “steady” output voltage. It is just very much impractical, since the op-amp must be kept in extremely well controlled conditions - temperature, mechanical stress on the die, and supply voltage have to be extremely stable.

It’s not a practical mode of operation, but at least not impossible, as the real op-amps have limited gain, so if the inputs (after compensating for offset) are a small voltage away from each other, the output will be just that differential voltage magnified a lot.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.