Free solar and battery calculators

Solar Position Calculator (Sun Elevation and Azimuth)

Enter a place, a date and a clock time to see where the sun is: its angle above the horizon and its compass direction.

The solar position calculator shows where the sun is in the sky for a chosen place, date and time. Enter latitude, longitude, the date, the clock time and the UTC offset, and it returns the sun’s elevation above the horizon and its azimuth, the compass direction measured clockwise from true north. It also gives solar noon, sunrise, sunset, day length, solar declination and the equation of time. The tool runs in your browser, is free and needs no sign-up. Nothing you enter is uploaded. It works as a solar azimuth angle calculator and an angle of the sun calculator, because the elevation and the azimuth appear in the same result. Use it to check shade, plan where a solar panel should face, or compare the sun’s path in two cities.
Solar position calculator example

How to use the Solar Position Calculator

  1. Enter the Latitude (°) of the place. Use a positive number for north of the equator and a negative number for south, from -90 to 90.
  2. Enter the Longitude (°). Use a positive number for east of Greenwich and a negative number for west, from -180 to 180. For example, Boulder, Colorado is about 40 and -105.
  3. Choose the Month from the drop-down list.
  4. Type the Day of month. The calendar assumes a 365-day year.
  5. Enter the Clock time (24 h, HH:MM) shown on a wall clock at that place, such as 14:30. Include daylight saving time if it is in force.
  6. Enter the UTC offset of the clock (hours), such as -6 for Mountain Daylight Time or 1 for London summer time.
  7. Read the results: sun elevation, sun azimuth, compass direction, zenith angle, solar noon, elevation at solar noon, sunrise, sunset, day length, solar declination and equation of time. If a warning appears, read it before you use the numbers.
  8. Scroll to the table below the result to see the sun’s elevation and azimuth at each whole clock hour between sunrise and sunset.

The example buttons above the form fill in preset cases, such as 40° N on 21 June at noon. Copy result copies the result lines with a link. Copy link stores every input in the page address, so the same calculation reopens later. Print / save as PDF produces a copy with the inputs, results, steps and date. Reset restores the starting example.

How do you calculate the position of the sun?

The calculator uses the NOAA Global Monitoring Laboratory’s General Solar Position Calculations. It first finds a fractional-year angle for the date, which gives the equation of time and the solar declination. True solar time is then clock time + equation of time + 4 × longitude − 60 × UTC offset, in minutes. The hour angle is true solar time ÷ 4 − 180 degrees. The zenith angle comes from cos(zenith) = sin(latitude) sin(declination) + cos(latitude) cos(declination) cos(hour angle), and the elevation is 90 degrees minus the zenith angle.

What is solar elevation (sun altitude)?

Solar elevation is the angle of the sun above the horizon. It is 0 degrees at the horizon and 90 degrees when the sun is straight overhead. The zenith angle is 90 degrees minus the elevation, so an elevation of 69 degrees gives a zenith angle of 21 degrees. A negative elevation means the sun is below the horizon. The elevation shown is geometric, without atmospheric refraction, so it does not include the effect of the air on the sun’s apparent position.

What is solar azimuth?

Solar azimuth is the compass direction of the sun, measured clockwise from true north. North is 0 degrees, east is 90, south is 180 and west is 270. The compass label next to the number translates the angle into words. For example, 137 degrees is labelled SE, which means the sun is south-east of the observer.

What is solar noon and why is it not 12:00?

Solar noon is the moment the sun crosses the north-south line and is at its highest for that day. It is not 12:00 on the clock because clock time depends on where you are inside a time zone. Longitude shifts solar noon, daylight saving time moves it by an hour, and the equation of time adds a few minutes, up to about 16 minutes through the year. For 40° N, 105° W on 21 June with a UTC-6 clock, the calculator gives solar noon at 13:01.

How high is the sun at noon?

At solar noon the elevation is 90 degrees minus the difference between latitude and declination. At 40 degrees N the noon sun is about 73.45 degrees high on 21 June, when the declination is about 23.45 degrees. On 21 December it is about 26.6 degrees high.

Worked examples

InputResult
40°, -105°, Jun 21, 12:00elevation 69°, azimuth 137.4° (SE)
40°, -105°, Dec 21, 12:00elevation 25.2°, azimuth 165.3° (SSE)
51.5°, -0.1°, Jun 21, 15:00elevation 53.9°, azimuth 230.2° (SW)
-33.9°, 151.2°, Dec 21, 09:00elevation 50.9°, azimuth 86.09° (E)

Calculated by the tool above with these values.

Frequently asked questions

What time zone offset and clock time do I enter?

Enter the clock time shown on a wall clock at that place, including daylight saving time if it is in force. Enter the UTC offset that applies at that moment: -7 for U.S. Mountain Standard Time, -6 for Mountain Daylight Time, 0 for London winter time, 1 for London summer time and 10 for Sydney winter time.

How accurate is the solar position calculator?

The NOAA equations are good to about a degree for the sun’s position and a few minutes for sunrise and sunset. When checked against a more precise algorithm for several places and dates, this calculator agreed within 0.3 degrees in position and 1 to 2 minutes in times.

Why does the calculator not show a sunrise time?

Beyond the polar circles, at about 66.5 degrees latitude, the sun can stay up all day or stay below the horizon all day on a given date. In those cases the tool says so instead of showing a sunrise or sunset time.

Does the calculator account for buildings, trees or hills?

No. The tool does not model buildings, trees, hills or weather. The hourly table of elevation and azimuth can help with shade checks, but any nearby obstacles must be assessed separately.

Sources