T^2=((4pi^2)/(GM_E))r^3

Substitute the period in seconds, T = 86,400 s, the gravity constant G = 6.67 multiplied by 10-11 kg-1 m3/s2, and the mass of the Earth, ME = 5.98 multiplied by 1024 kg. Solve for r.

That formula will give you the radius of a geosynch orbit. You must subtract the earth's radius to get the altitude. A sidereal day (one complete rotation of the Earth)is not quite 24 hours long, by the way.