Saved

Press the star next to a tool's name to save it.

All my tools

Sun Angle Calculator

Use this sun angle calculator to find the Sun's elevation and azimuth for a latitude, a date and a solar time, with the declination and the elevation at solar noon.

Restored your last values ·

Enter your latitude, a date and the local solar time (12 is the moment the Sun is highest). You get the Sun's elevation and compass bearing, its declination and the elevation at solar noon.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Enter the latitude, the date and the solar time, then press Calculate.

See full result

A sun angle calculator finds how high the Sun is above the horizon, and in which direction, for a place, a date and a time. Enter your latitude, the date and the solar time. It gives the elevation, the azimuth, the declination and the elevation at solar noon.

How to use the sun angle calculator

  1. Enter your latitude, with north positive.
  2. Enter the year, month and day.
  3. Enter the local solar time in hours, where 12 is solar noon.
  4. Press Calculate.

Three steps

The page for the position of the Sun describes a calculation in three steps: ecliptic coordinates, then equatorial coordinates, then horizontal coordinates [1]. We follow that route. The date gives the Sun's declination, the time gives the hour angle, and the latitude together with these two gives the elevation and the azimuth.

The date

The first quantity is n, the number of days since J2000.0, which is the Julian date minus 2451545.0 [1]. We take the Julian date at 12:00 universal time on the date that you enter, which is our own choice. The mean longitude is L = 280.460° + 0.9856474° n and the mean anomaly is g = 357.528° + 0.9856003° n, as given on the page [1].

Declination

The ecliptic longitude is λ = L + 1.915° sin g + 0.020° sin 2g, and the obliquity is ε = 23.439° − 0.0000004° n, again from the page. The declination is δ = arcsin(sin ε sin λ) [1]. The page says that the ecliptic coordinates are accurate to about 0.01° for dates between 1950 and 2050, which is why the calculator accepts only those years.

The hour angle

The solar hour angle is an expression of time, in angular measurement, from solar noon [4]. It is zero at midday, negative in the morning and positive in the afternoon. Because the Earth turns 360 degrees in 24 hours, we use 15 degrees for each hour, so 3 pm gives 45 degrees. This is our own arithmetic, and the page's example of 10:30 am at minus 22.5 degrees is consistent with it.

Elevation

The page on the solar zenith angle gives cos θ = sin Φ sin δ + cos Φ cos δ cos h, where Φ is the latitude, δ the declination and h the hour angle [2]. The solar elevation is 90 degrees minus the zenith angle [2]. For latitude 40 degrees at noon on 21 June, the declination is 23.435 degrees and the elevation is 73.435 degrees.

Azimuth

The azimuth is measured clockwise from due north, so east is 90 degrees, south is 180 and west is 270 [3]. The page gives cos A = (sin δ − cos θ sin Φ) ÷ (sin θ cos Φ) [3]. This returns an angle from 0 to 180 degrees, so we take 360 degrees minus it after solar noon. That quadrant handling is our own, and it agrees with the convention of the page.

Solar time and clock time

The time that you enter is local solar time, when the Sun is highest at 12:00. Your clock differs from it by your time zone offset, daylight saving time, your longitude within the zone and the equation of time, which can reach about a quarter of an hour. We do not model these, so the result is for solar time. For an estimate, treat 12:00 as the moment of the highest Sun.

Solar noon elevation

At solar noon the hour angle is zero, and the formula reduces to an elevation of 90 degrees minus the difference between the latitude and the declination. This is our own simplification of the formula on the page. At 51.5 degrees north on 21 December, the declination is about minus 23.4 degrees, so the noon elevation is only about 15 degrees.

Shadows and panels

A vertical pole casts a shadow equal to its height divided by the tangent of the elevation, which the calculator shows when the Sun is up. At 73.4 degrees, the shadow is 0.297 times the height. The elevation is also what matters for the tilt of a solar panel, and for the light that enters a window, but the calculator does not model the tilt.

Limits

We do not correct for atmospheric refraction, which the page says raises the apparent elevation, for example to 10.1 degrees for a Sun at 10 [1]. The values are for a point on a smooth Earth at sea level. Near the poles and at the zenith the azimuth is not defined, and the calculator says so. Use the tool for planning, not for surveying.

Seasons and latitude

The declination follows the obliquity of the Earth's axis, which the page gives as 23.439 degrees [1]. Over a year, the Sun's declination swings between about plus and minus 23.4 degrees, so at a mid latitude the noon elevation differs by about 47 degrees between the June and December solstices. This is our own arithmetic from the formulas above. It is why the Sun is high in the summer sky and low in the winter one, and why the shadows are so different.

Checking your result

A simple test is to enter a latitude of 0 for noon on 20 March. The declination is close to zero, so the Sun is almost overhead, at about 89.96 degrees, and the azimuth is not meaningful. Another is a latitude of 40 degrees at noon on 21 June, when the Sun is at 73.4 degrees and due south. If the Sun is at the same height in the morning and the afternoon, the times are symmetric about 12:00 solar time.

Common mistakes

  • Entering clock time. The tool needs solar time.
  • Using a negative latitude for the north. North is positive.
  • Expecting refraction. It is not included.
  • Entering a year outside 1950 to 2050. The formulas are not stated there.

What next

Use this often? Add Sun Angle to your Home screen.

Frequently asked questions

What is a sun angle calculator?

A tool that finds the elevation and bearing of the Sun for a place, a date and a time.

What is the solar elevation angle?

The angle of the Sun above the horizon: 90 degrees minus the zenith angle.

How is the azimuth measured?

Clockwise from due north, so east is 90 degrees and south is 180.

Does the sun angle calculator use clock time?

No. It uses local solar time, when 12:00 is the moment of the highest Sun.

How accurate is the sun angle calculator?

The declination formulas are stated to about 0.01 degrees for 1950 to 2050; refraction and the time offset are not included.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Unit Converters