Need to calculate beam deflection under gravity using theoritical formula

Hi all,

WRT below image the length of the beam is 20" and the beam section is a square of side 1". The beam is subjected to gravitational load only.

Material used is Plain carbon steel of E=30457924.91 psi, Density=0.281793 ib^in3 and Mass= 5.64 pounds.

From SW simulation I'm getting a maximum deflection of 0.002 in (both solid and beam elements).

In SolidWorks SImulation tutorials the formula given to calculate the maximum deflection under gravitation load is UY = ( 3 * w * L4) / (24 * E * I ).

Unfortunately I'm not getting the same results using the theoretical approach.

Please help me what values I should consider in the formula so that I can achieve the goal?

Thanks and Regards,

Eesh D

SolidworksSimulation