Op Amp Differential Amplifier

Enter the following: Vs, Vcm and R1 - R4. Then click on "Get Gains, Vo".

The Differential Signal Gain (Kdiff) should be R2/R1 if R4/R3=R2/R1.

Ideally, Vo due to the Common Mode Level should be 0V (Kcm=0).
But it's difficult to acheive with resistor tolerances.
Try setting R1=10100 (1% error), R3=10000, R2=R4=20000, vs=0 and vcm=5.
How much unwanted common-mode signal gets through to Vo?

diff amp

Vs Signal (vs = Vp-Vn)
Vcm Common Mode (Signal Offset)
R1 Gain Resistors
Kp=Vo/Vp Pos Gain: Kp=R4/(R3+R4)*(R2+R1)/R2
Kn=Vo/Vn Neg Gain: Kn=-R2/R1
Kdiff Differential Gain: Kdiff = Vo/Vs = Kp/2 - Kn/2
Kcm Common Mode Gain: Kcm = Vo/Vcm = Kp + Kn
Vp (V) Vp = Vcm + Vs/2
Vn (V) Vn = Vcm - Vs/2
Vo (V) Vo = Kp*Vp + Kn*Vn