Calculate the sun's position in the sky for any location and time
The solar elevation angle (also called solar altitude) is the angle between the sun's rays and the horizontal plane at a specific location on Earth. It ranges from 0° (sun on the horizon) to 90° (sun directly overhead).
This calculator uses standard astronomical algorithms to compute the sun's position based on your geographic coordinates and the date/time.
Calculate the day number in the year (1-365):
The declination angle is the angle between the sun's rays and the equatorial plane:
δ = Declination angle (degrees)N = Day of year (1-365)23.45° = Earth's axial tiltCorrects for the difference between solar time and clock time due to Earth's elliptical orbit and axial tilt:
EoT = Equation of time (minutes)B = Intermediate angle (degrees)Convert local time to solar time:
LST = Local Solar Time (hours)Local Meridian = Timezone × 15°The angular displacement of the sun east or west of the local meridian:
H = Hour angle (degrees)LST = Local Solar Time (hours)15° = Earth's rotation per hourThe final calculation of the sun's height above the horizon:
α = Solar elevation angle (degrees)δ = Declination angle (degrees)φ = Latitude (degrees)H = Hour angle (degrees)The compass direction from which the sunlight is coming:
A = Solar azimuth angle (degrees)α = Solar elevation angle (degrees)This calculator implements the standard solar position calculation method used in renewable energy systems, architecture, and astronomy. The algorithms are based on the Cooper (1969) and NOAA solar position calculations.