Sun Angle (Solar Elevation) Calculator

Enter latitude, day of year and solar time to get the solar elevation angle and declination.

Result

48.83°
23.45°

How it is calculated

Inputs are latitude in degrees (−90 to 90, north positive), day of the year (1 to 366) and solar time in hours (0 to 24). The tool first estimates the sun's declination, δ = 23.45° × sin(360° × (284 + n) ÷ 365), where n is the day number. The hour angle is H = 15° × (solar hour − 12), so it is 0 at solar noon. The elevation is then asin(sin φ · sin δ + cos φ · cos δ · cos H), with φ the latitude. A negative elevation means the sun is below the horizon. Atmospheric refraction is not added. Solar time is not clock time: it differs from your watch by the time zone, daylight saving and the equation of time, so the result is an approximation.

Worked example

Take latitude 40°, day 172 (about 21 June) and solar time 15:00. Declination: 23.45° × sin(360° × 456 ÷ 365) = 23.45°. Hour angle: 15 × (15 − 12) = 45°. Then sin(40°)·sin(23.45°) = 0.2558 and cos(40°)·cos(23.45°)·cos(45°) = 0.4969. Their sum is 0.7527, and asin(0.7527) gives an elevation of 48.83°. At solar noon on the same day the sun would stand higher, at 73.45°.

Try this example →

Common mistakes

  • Entering clock time instead of solar time. Solar noon is when the sun is highest, which rarely falls at 12:00 on your watch because of time zone, daylight saving and longitude.
  • Entering the month number or the date instead of the day of the year. 21 June is day 172 in a normal year, not 21 or 6.
  • Forgetting that southern latitudes are negative. Entering 34 instead of −34 for Sydney puts the sun in the wrong half of the sky and gives a very different result.
  • Reading a negative elevation as an error. It simply means the sun is below the horizon at that time, so the place is in darkness.
  • Using the elevation as the best panel tilt. The tilt from horizontal is 90° minus the elevation only for a panel facing the sun at that exact moment, not for a fixed panel over a whole year.

About this calculator

This calculator finds the solar elevation angle — how many degrees the sun sits above the horizon — using the standard solar-position equation sin(elevation) = sin(lat)·sin(dec) + cos(lat)·cos(dec)·cos(hour angle), where declination is derived from the day of the year (the sun's apparent north-south position swings between about +23.45° at the summer solstice and −23.45° at the winter solstice) and the hour angle comes from solar time relative to solar noon.

Solar elevation, together with the solar declination it depends on, is the basis for sizing photovoltaic panel tilt angles, predicting when and how far shadows fall from buildings and trees, and planning the warm low-angle "golden hour" light photographers chase. Architects, solar installers and photographers all rely on this same geometry, just for different purposes.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Noon elevation is a handy check on panel or awning geometry: a surface square to the sun is tilted from horizontal by 90 minus the elevation. At 40 degrees north the tool gives 73.45 on day 172 and 26.55 on day 355, so the same roof needs very different angles in summer and winter. Remember the hour is solar time, not your watch. Which latitude and season do you design for?

Popular calculators

All Calculators