What this calculator does
The sun angle, or solar elevation angle, is how high the sun sits above the horizon at a given moment, measured in degrees from zero at the horizon to 90 at directly overhead. It depends on three things: how far the observer is from the equator (latitude), the time of year (which sets the sun's declination, its angle relative to the equator), and the time of day (which sets how far the sun has moved across the sky from solar noon).
This sun angle calculator uses the standard spherical-trigonometry formula that combines those three inputs: latitude, day of year and local solar time. It is built for quick estimates rather than survey-grade precision, since it uses solar time directly and does not correct for the equation of time or a specific timezone offset, but it gets close enough to check shadow lengths, panel tilt angles or roughly when the sun will be highest in the sky.
The formula
Solar declination, the sun's angle relative to the equator, follows a roughly sinusoidal pattern across the year, swinging between about +23.45 degrees at the northern summer solstice and -23.45 degrees at the northern winter solstice. The hour angle measures how far the sun has moved from solar noon, at 15 degrees per hour. Combining these with latitude through sin(elevation) = sin(lat)·sin(declination) + cos(lat)·cos(declination)·cos(hour angle) gives the elevation angle above the horizon.
| Term | Meaning |
|---|---|
| Elevation angle | Height of the sun above the horizon, in degrees, 0 at the horizon and 90 directly overhead. |
| Declination | The sun's angle relative to the equator on a given day, which drives the seasons. |
| Hour angle | How far the sun has moved from solar noon, in degrees, at 15 degrees per hour. |
| Solar time | Time measured by the sun's actual position, where 12:00 is solar noon, not necessarily the same as the clock time on a watch. |
The inputs explained
| Field | What to enter |
|---|---|
| Latitude (negative for southern hemisphere) (°) | Latitude of the location, positive for the northern hemisphere and negative for the southern hemisphere. |
| Day of year (1-365) | Day of the year, from 1 (1 January) to 365, which sets the sun's declination. |
| Local solar time (24-hour, e.g. 12 = solar noon) (h) | Local solar time on the 24-hour clock, where 12 is solar noon, the sun's highest point that day. |
When to use it
Estimating shadow length at a given time
A taller sun angle produces shorter shadows: an object's shadow length is roughly its height divided by the tangent of the elevation angle, so checking the angle first shows whether shadows will be short or long at a chosen time.
Rough solar panel tilt guidance
Fixed solar panels are often angled close to the local latitude for a reasonable year-round average, and checking the sun's elevation at solar noon on different days shows how much that ideal angle actually shifts between summer and winter.
Working out roughly when the sun will be highest
Solar noon, when the sun reaches its maximum elevation for the day at hour angle zero, is a useful reference point for photography, sundial checks or simply understanding why "noon" on a clock rarely matches the sun's actual highest point.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How the midday sun angle changes through the year at latitude -33.87°
The same latitude and time of day, checked across different days of the year.
| Day of year | Sun elevation angle | Solar declination |
|---|---|---|
| day 1 | 79.14° | -23.01° |
| day 80 | 56.53° | -0.40° |
| day 172 | 32.68° | 23.45° |
| day 265 | 56.74° | -0.61° |
| day 355 | 79.58° | -23.45° |
Questions
Why does the calculator ask for solar time rather than clock time?
Clock time is fixed by timezone boundaries and daylight saving, which can shift solar noon by an hour or more from 12:00 on the clock. Solar time, where 12:00 is defined as the sun's actual highest point, keeps the hour angle calculation simple, at the cost of needing a small manual adjustment to match a specific clock and location exactly.
What happens if the result shows the sun below the horizon?
A negative elevation angle means the sun has not risen yet or has already set at that latitude, day and time, which is expected near sunrise, sunset, or in the depths of winter at high latitudes.
How accurate is this compared to a full solar position algorithm?
This uses the standard simplified declination and hour angle formulas, accurate to roughly a degree for most dates and latitudes, which is fine for planning and estimation. Applications like precise solar tracking or surveying use more elaborate algorithms that correct for the equation of time and atmospheric refraction.
Does this work for any location on Earth, including the southern hemisphere?
Yes, enter a negative latitude for the southern hemisphere. The formula and the sign convention for declination stay the same either way; only the resulting seasonal pattern flips, as shown in the table above.
For the underlying idea of measuring angles and distances by trigonometry, see the hypotenuse calculator. For a location's day length rather than the sun's angle, check the site's date and time tools.