Sun Position Calculator (Azimuth & Elevation)

Calculate the sun's azimuth and elevation for any latitude, longitude, date, and time using the NOAA solar position algorithm. Runs in your browser.

Sun position
72.72° elevation
above horizon
Azimuth
181.63° S
Elevation (altitude)
72.72°
Solar declination
23.44°

Computed with the NOAA solar position algorithm. Azimuth is degrees clockwise from true north (90° = due east, 180° = due south, 270° = due west); elevation is the angle above the horizon (negative = below, i.e. night), with an approximate atmospheric-refraction correction applied near the horizon. Accurate to about ±0.1°. Enter the location’s UTC offset for the date (account for DST yourself). Everything runs in your browser.

About this tool

The sun's position in the sky at any moment is described by two angles: azimuth, the compass direction to the sun measured in degrees clockwise from true north (90° is due east, 180° due south, 270° due west), and elevation (or altitude), the angle of the sun above the horizon (0° at the horizon, 90° straight overhead, negative when the sun is down). This calculator computes both for any place and time on Earth using the NOAA (National Oceanic and Atmospheric Administration) solar position algorithm, the same well-tested set of equations used by observatories and solar engineers, accurate to roughly a tenth of a degree. You provide the latitude and longitude, the date, the local clock time, and the location's offset from UTC, and it returns the azimuth (with a compass bearing), the elevation, and the sun's declination for that date. Knowing the sun's position has many practical uses: aiming and tilting solar panels for maximum yield, planning the lighting and shadows of a photograph (the 'golden hour' is when elevation is low), designing buildings and gardens for sun exposure, predicting glare, and understanding seasons — the declination, which ranges from −23.4° at the December solstice to +23.4° in June, is what drives the sun's changing height through the year. The tool applies a standard atmospheric-refraction correction near the horizon, where the bending of light makes the sun appear slightly higher than its true geometric position (which is also why the sun is still visible for a few minutes after it has geometrically set). One thing to handle yourself: enter the correct UTC offset for that date, accounting for daylight saving if it applies, since the calculation works from the absolute instant in time. Everything runs in your browser; nothing is uploaded.

How to use it

  • Enter the latitude (north positive) and longitude (east positive) of the location.
  • Enter the date and the local clock time.
  • Enter the location's UTC offset in hours (include DST if in effect).
  • Read the sun's azimuth (compass direction), elevation above the horizon, and declination.

Frequently asked questions

What are azimuth and elevation?
Azimuth is the sun's compass direction in degrees clockwise from true north (180° = due south). Elevation (altitude) is its angle above the horizon: 0° at the horizon, 90° overhead, negative when below (night).
How accurate is this calculator?
It uses the NOAA solar position algorithm, accurate to about ±0.1°, with an atmospheric-refraction correction near the horizon. That is more than enough for solar panels, photography, and shadow planning.
What is solar declination?
The latitude at which the sun is directly overhead on a given date. It ranges from about −23.4° (December solstice) to +23.4° (June solstice) and is what makes the sun ride higher in summer and lower in winter.
How do I handle daylight saving time?
Enter the UTC offset that applies on that date — for example, US Eastern is −5 in winter (EST) and −4 in summer (EDT). The calculation works from the absolute instant, so the offset must be correct.
Why does the sun appear above the horizon when it has "set"?
Atmospheric refraction bends sunlight, lifting the sun's apparent position by roughly half a degree near the horizon — so the sun is visible for a few minutes after it geometrically sets. The tool applies this refraction correction.
Is anything uploaded?
No. The full NOAA computation runs entirely in your browser.

Related tools