Use the sliders to set the input voltage, Vp, and the gain of the op-Amp, Ao. For this example we will set R1=R2; we will change this later. Since R1 and R2 form a voltage divider, their values don't matter to us, only their ratio.

The resistors R1 and R2 form a voltage divider so $Vn = Vout \cdot \frac{R2}{R1+R2}$.
If we let R1 = R2 (for now), we get $Vn = \frac{Vout}{2}$
We also know the $Vout = Ao \cdot \left( Vp - Vn \right)$
If we substitute this expression for $Vout$ into the previous expression for $Vn$ we get
$Vn = \frac{Vp}{1+\frac{2}{Ao}}$ and $Vout = Vp \frac{Ao}{1+\frac{2}{Ao}}$

We call the ratio of the output, Vout, to the input, Vp, the gain, G, of the circuit. $G=\frac{Vo}{Vp}=\frac{Ao}{1+\frac{2}{Ao}}$.

Vin=4V

Vin=0V


R1= Ohms.       0 10
R2= Ohms.       1 10

The gain of the circuit is $G = \frac{R1+R2}{R2}$ =
The input voltage is Vp = Volts.

The calculated output voltage is $Vout = G \cdot Vp$ = Volts.