Calculates on this device. File exports run online.
Sun Azimuth Calculator
Type a town or the latitude and longitude, a date and a time. You get the Sun’s azimuth (its compass direction) and its altitude above the horizon, and, if you give the height of an object, the length and direction of its shadow. You can also list the Sun’s position through a whole day.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose Calculate.
Your result
How it was worked out
How to use the sun azimuth calculator
- Type a town in Place, or the latitude and longitude (51.4779, -0.0015).
- Leave Time zone empty to use the clock of the place, with daylight saving time.
- Choose the date and the time on that clock. Leave both empty for now.
- To see a shadow, type the height of a pole, a person or a building.
- For the path of the Sun, choose The Sun’s path over a day and how often a row is listed.
What the angles mean
- Azimuth: the direction of the Sun in degrees clockwise from true north: 90° is east, 180° south, 270° west. A magnetic compass points to magnetic north, which can be several degrees away.
- Altitude: how high the Sun is above a level horizon. The true altitude leaves out the bending of light by the air; the altitude as seen adds it (about half a degree at the horizon, almost nothing high up).
- Zenith angle: 90° minus the altitude, the angle from straight overhead.
- Hour angle and declination: where the Sun is on the sky’s own grid: west of the meridian by 15° an hour, and north or south of the celestial equator.
- Shadow: an object of height h on level ground casts a shadow h ÷ tan(altitude) long, pointing away from the Sun.
Worked example
Pune, India, on 28 October 2026 at 15:30 India Standard Time: the Sun is at azimuth 239.6° (west-south-west) and 33.1° high. A pole 2 m high casts a shadow about 3.06 m long towards 59.6° (east-north-east).
Where the data comes from
- Towns and time zones: Place data © GeoNames (geonames.org), CC BY 4.0. Clocks and daylight saving time: the IANA time zone database, 1970 to 2050.
- Positions: Jean Meeus, Astronomical Algorithms (2nd edition): VSOP87 for the Sun (about 1″), nutation, aberration and the parallax of the place; refraction by NOAA’s formula for a standard atmosphere.
- The server check uses the JPL DE440s ephemeris with Skyfield; they agree to about 0.001°.
Limits you should know
- Dates from 1900 to 2100; daylight saving rules for 1970 to 2050 (for other years type a UTC offset such as UTC+1).
- The bending of light near the horizon changes with the weather; at the horizon the altitude as seen can be off by a few tenths of a degree.
- Shadows are for level ground and a sharp-edged object; the Sun’s own size blurs the end of a long shadow.