Sun Angle Calculator
Enter your latitude, longitude, date and local time to instantly calculate the sun's elevation angle above the horizon, its compass azimuth, solar declination, hour angle, air mass, and the shadow length cast by any object. You also get today's sunrise, solar noon, sunset and day length. Swap between metric and imperial shadow units with one click.
What is the solar elevation angle?
The solar elevation angle (also called solar altitude) is the angle between the sun and the local horizon, measured in degrees. An elevation of 0° means the sun sits exactly on the horizon at sunrise or sunset. 90° means the sun is directly overhead (possible only in the tropics). Negative values indicate the sun is below the horizon during night and twilight. The elevation changes every minute throughout the day and varies by season because of the tilt of Earth's rotational axis. At solar noon, the sun reaches its highest point of the day, equal to 90° minus your latitude plus (or minus) the solar declination.
Solar azimuth and compass direction
The solar azimuth is the horizontal compass bearing of the sun, measured clockwise from true north in degrees (not magnetic north). An azimuth of 0° or 360° is due north, 90° is east, 180° is due south and 270° is west. In the northern hemisphere the sun always swings through the southern half of the sky (azimuths roughly 90° to 270°) and is due south at solar noon. In the southern hemisphere it transits through the northern sky. Near the equator at certain times of year the sun passes directly overhead, making azimuth values near the zenith unstable. Builders, solar installers and photographers all rely on azimuth to plan sun angles at specific times of day.
Hour angle, declination and the equation of time
Three intermediate quantities drive the calculation. Solar declination (δ) is the latitude on Earth where the sun is directly overhead - it ranges from +23.45° on the June solstice to -23.45° on the December solstice. The hour angle (H) is how far the sun has moved from the meridian at 15° per hour: negative in the morning, zero at solar noon, positive in the afternoon. The equation of time corrects for the slight irregularity in the length of the solar day caused by Earth's elliptical orbit and axial tilt; it swings between about -16 and +14 minutes across the year. Together these three quantities feed into the trigonometric formulas that give elevation and azimuth.
Shadow length and air mass for practical applications
Shadow length equals object height divided by the tangent of the solar elevation. At 45° elevation a 2-metre person casts a 2-metre shadow; at 30° they cast a 3.46-metre shadow; near the horizon a short person casts an enormously long shadow. Air mass is the ratio of the path length sunlight travels through the atmosphere relative to the overhead path. At the zenith, air mass is 1.0. At 30° elevation it rises to about 2.0, and at 10° elevation it exceeds 5.5, scattering much of the light and turning the sun red. Air mass is critical for photovoltaic efficiency modelling and UV exposure estimates. Sunrise and sunset use an air mass of roughly 38, which is why the horizon sun is always orange-red.
Solar elevation guide
| Elevation (°) | Air mass | Shadow / height ratio | Typical time of day | Solar energy quality |
|---|---|---|---|---|
| 90 | 1.00 | 0.00 | Overhead (tropics only) | Maximum |
| 60 | 1.15 | 0.58 | Midmorning / early afternoon | Excellent |
| 45 | 1.41 | 1.00 | Mid-morning (summer) | Very good |
| 30 | 2.00 | 1.73 | Morning / afternoon | Good |
| 20 | 2.90 | 2.75 | Early morning / late afternoon | Moderate |
| 10 | 5.60 | 5.67 | Near sunrise / sunset | Low |
| 5 | 10.4 | 11.4 | Twilight zone | Very low |
| 0 | -- | -- | Sunrise / sunset | Negligible |
How solar elevation angle affects shadow length, air mass and practical applications.
Frequently asked questions
What is the highest solar elevation angle possible?
90° - directly overhead - is theoretically the maximum, but it only occurs at latitudes between the Tropic of Cancer (23.45° N) and Tropic of Capricorn (23.45° S) on specific dates. Outside the tropics, the maximum noon elevation angle is 90° minus your latitude plus 23.45° on the summer solstice. At 40° N, for example, the highest possible noon sun is about 73.45°.
What is solar noon and why does it not match 12:00 PM on the clock?
Solar noon is the moment the sun crosses your local meridian and reaches its maximum elevation. It rarely coincides exactly with 12:00 PM on the clock for two reasons: time zones span 15° of longitude, so the exact meridian crossing depends on where in the zone you stand, and the equation of time adds an additional offset of up to 16 minutes depending on the time of year. Solar noon can range from roughly 11:40 AM to 12:20 PM depending on both factors.
How is the sun angle used in solar panel installation?
Panel tilt is typically set close to the site latitude for year-round optimization, with steeper tilts favouring winter production. The noon elevation angle determines the minimum roof pitch needed to avoid self-shading. Row spacing between panel arrays uses the winter solstice noon angle (the lowest sun) as the worst case: required spacing equals panel height along the slope divided by the tangent of the noon elevation angle on December 21 (in the northern hemisphere).
Why does the sun move at about 15 degrees per hour?
Earth completes one full rotation of 360° in approximately 24 hours, so it turns 360° / 24 h = 15° per hour. The sun appears to sweep across the sky at the same rate. The hour angle captures this directly: it equals 15° times (solar time minus 12), so the sun moves exactly 15° of hour angle every hour.
What is the equation of time?
The equation of time is the difference in minutes between solar time (when the sun crosses the meridian) and mean solar time (what a perfectly uniform clock would show). Two effects create the variation: Earth's slightly elliptical orbit means it moves faster near perihelion (January) and slower near aphelion (July), and the ecliptic is tilted 23.45° relative to the equator. The two effects combine to produce a figure-eight pattern (analemma) that ranges from about -16 minutes in early November to +14 minutes in mid-February.
What does air mass mean for solar panels?
Air mass (AM) describes how much atmosphere sunlight passes through relative to a direct overhead beam. AM 1.0 means the sun is straight overhead. Standard solar panel ratings use AM 1.5 (elevation about 41.8°), which is a realistic mid-latitude reference. At low elevation angles the air mass rises rapidly, scattering more blue light and infrared, reducing both total irradiance and the efficiency of silicon cells. In practice, most useful solar energy is generated when the sun is above about 15° (AM roughly 3.7 or less).