# LTspice giving incorrect voltage value for simple first order low pass RC filter

I drew this low pass filter circuit to have a output voltage of 5v across capacitor at a frequency of 100Hz sine wave of amplitude 10v. But I am only getting 4.5 volt as output in steady state. I am doing simulation in LTspice on Ubuntu. What mistake I am making?

R = sqrt(3)/(2*pi*fC) - This is how I calculated R for a given C to have a half voltage drop across C • The $\sqrt 3$ term is not part of the calculation for this type of circuit. – Peter Smith May 22 '16 at 14:03
• How did you read this 4.5V ?? I get 4.9956V in my LTspice. – G36 May 22 '16 at 14:05
• @G36 - My LTSpice gives somewhere around 4.60 volt. Don't know why? I did a transient analysis for 8 second. – InQusitive May 22 '16 at 15:12
• @G36:- When I put exactly 200ms as you did in transient, I am getting the correct value. I think I am making something related to transient timing? Can't I use a large value for stop time in transient analysis, like 10 seconds? – InQusitive May 22 '16 at 15:16
• @InQusitive try set Maximum Timestep at around 10us in transient analysis window. – G36 May 22 '16 at 15:34

To get 5V peak from a 10V peak supply across $1 \mu F$ capacitor at 100Hz we need current equal to I = 5V/Xc = 5V/1.592kOhm = 3.1407mA and the voltage drop across resistor is $$V_R = \sqrt{(10V^2 - 5V^2)} = 8.66V peak$$
therefore $$R = \frac{8.66V}{3.1407mA} =2.757k\Omega$$ So yes, your calculations are correct.
And the simulation result look like this 