# In this voltage follower circuit why isn't the output voltage equal to the input voltage?

The image below shows the circuit and the plot of vin/vout in function of time. The green curve is the voltage source that is connect to the non inverting input of the op amp (so the 10V) and the blue curve is the output of the op amp.

Why is the output 1.5V far apart from the input voltage? I used a LM324 op amp.

Supposedly the LM324 should have a linear output swing from something around 0.05V to 9.95V in this configuration but clearly it's not.

You got that result because LTspice is replicating the non-ideal behaviour of the LM324.

The output of the LM324 can't get any closer to its power rails than about 2V:

Getting 10V out of an LM324 would mean you need at least 12V from the power supply.

If you want (or need) 10V out of the op-amp from a 10V power supply, then you will need to find a rail to rail op-amp - that is, one that can drive its output to the power supply rails.

Even then there will be a small range close to the rails that the output can't reach - rail to rail op-amps just get lots closer than standard op-amps.

Everybody else has mentioned that the output of the LM324 cannot reach the positive power supply potential, but I'll add that neither can the inputs. The datasheet has this entry:

That tells you that you this opamp's behaviour is undefined, and unpredictable if the inputs are taken to within 1.5V of the positive supply potential.

For your circuit this limit is $$\10V - 1.5V = 8.5V\$$, which you have definitely exceeded.

The LM324 is not a rail to rail op-amp. Meaning, it can not output a voltage that is the same (or nearly the same) as the voltage supply. If you increase the V1 supply to 15V, you'll see what you are expecting.

From the datasheet, look at the Output Voltage Swing Voh, with a 30V supply, the max output voltage is 28V. That's a 2V difference. Similar to your graph.

I've just tried simulating the circuit and as you said the output is lower than the input. That is due to the supply voltage that need to be higher than the input, you could find the specification on the datasheet