☀️

Sun Position & Shadow Length Calculator

Calculate the approximate solar elevation angle and the resulting shadow length for any vertical object at a given latitude, day of year, and solar hour.

Height of the vertical object in metres.
Your latitude in degrees. Negative for the Southern Hemisphere.
Day of the year (1 = Jan 1, 172 = ~Jun 21 summer solstice, 355 = ~Dec 21 winter solstice).
Solar time hour (12 = solar noon, when the sun is highest).

Results

Shadow Length0.12 m shadow length
Approximate Solar Elevation90.0° approximate solar elevation

📖What is it?

The sun's position in the sky changes with latitude, time of year (solar declination), and time of day (hour angle). Solar elevation — how high the sun sits above the horizon — directly determines the length of shadows cast by vertical objects.

🎯How to use

Enter the object's height, your latitude, the day of the year, and the solar hour. The calculator uses the standard astronomical formula to compute sin(solar elevation) and derives the shadow length from trigonometry. A value of 999 m means the sun is at or below the horizon.

💡Example scenario

A 10 m flagpole at latitude 40°N on the summer solstice (day 172) at solar noon: solar declination ≈ 23.45°, hour angle = 0°. sin(elevation) ≈ sin(40°)×sin(23.45°) + cos(40°)×cos(23.45°) ≈ 0.959. Shadow length ≈ 10 × sqrt(1 − 0.959²) / 0.959 ≈ 2.94 m.

🏆Pro tip

Solar noon is not always 12:00 clock time — it varies with your longitude within your time zone and the equation of time. Shadow length is shortest at solar noon and infinitely long at sunrise/sunset. This calculation is invaluable for positioning solar panels (optimize tilt), designing sundials, or planning architectural shading features.