Skip to content
Our official iOS app is live on the App StoreDownload free

Sun Angle Calculator

Sun position and shadow length for any place and time, sunrise and sunset included, or work back from a shadow in a photo to the latitudes it fits.

1×

Tap the map, or paste coordinates such as 41.0082, 28.9784 into either box.

Sun elevation— 
Sun azimuth— 
Shadow length— 
Shadow direction— 
Sunrise
—
Solar noon
—
Sunset
—
Daylight
—

NESW30°60°

The sky over your place, seen from above with north up: the centre is overhead, the edge is the horizon. The orange line is the sun’s path today; the dark line is the shadow of a stick at the centre.

Short answer

The sun’s angle depends on three things: the place, the date and the time. This sun angle calculator uses NOAA’s solar position equations to give the sun’s elevation above the horizon and its compass bearing, the length and direction of shadows, and sunrise, solar noon and sunset. It runs entirely in your browser.

How do you calculate the sun’s angle?

Latitude, the date and the time fix it. The date sets the sun’s declination, the time sets the hour angle, and NOAA’s equations turn them into the elevation above the horizon and the azimuth from true north, with the bending of light near the horizon added.

Elevation (also called altitude) is how high the sun stands above the horizon: 0° at sunrise and sunset, 90° straight overhead. Azimuth is its compass bearing, measured clockwise from true north: 90° is east, 180° south, 270° west. Pick a place on the map or type its coordinates, set the date, the time and that place’s time zone, and both values follow, along with the shadow they cast.

The equations are the ones in NOAA’s Solar Calculator, from Jean Meeus’s Astronomical Algorithms. NOAA describes them as very good for the years 1800 to 2100 and puts its sunrise and sunset times within about a minute between 72° north and 72° south, and within about ten minutes nearer the poles. The tests behind this page compare it with NOAA’s own figures for ten places, from the equator to Svalbard and Antarctica.

Near the horizon the atmosphere lifts the sun’s image by about half a degree, so the elevation shown is the apparent one, refraction included, which is what a shadow responds to. The azimuth is relative to true north: a magnetic compass can differ from it by several degrees, by an amount that depends on where you are.

How long is a shadow at a given sun angle?

On level ground a vertical object casts a shadow 1 ÷ tan(elevation) times its height: as long as the object itself at 45°, about 1.7 times at 30° and almost 6 times at 10°. The shadow points directly away from the sun, so its bearing is the azimuth plus 180°.

Sun elevationShadow length
5°11.43 × the height
10°5.67 × the height
15°3.73 × the height
20°2.75 × the height
30°1.73 × the height
45°1.00 × the height
60°0.58 × the height
75°0.27 × the height
90°none (straight down)
Shadow length of a vertical object on level ground

Shadows lengthen fast as the sun gets low: between 10° and 5° a shadow doubles. That is why the calculator shows the ratio rather than a length in metres or feet: it holds for any object, whether a 1.8 m person or a 30 m tower.

Can a shadow tell you where a photo was taken?

Partly. With the photo’s date and clock time, a shadow’s length limits the latitude to a band, a few degrees wide at best. It cannot say which country in that band, and without the clock’s time zone it gives no longitude at all.

Switch the calculator to Shadow → latitude, enter the date and the time the photo was taken, the height of something vertical in it and the length of its shadow in the same unit. The page shows every latitude where the sun stands at that height at that clock time, shaded on the map. If the clock’s offset from UTC is known (many phones record it in the photo’s metadata), the time of day is fixed, and the map also shows the ring of places where the sun had exactly that height, and the stretch of longitudes where such a clock keeps time.

What makes the latitude band wider or narrower?

Two things: how precisely the shadow is measured, and how far the photo’s clock can be from the sun’s own time. A 10 % error in the shadow moves the sun’s elevation by up to about 3°; a clock that can be two hours off the sun widens the band far more.

  • Clock time is not sun time. Time zones are wide and summer time adds an hour, so at the same clock time the sun stands at different heights. Spain in summer runs more than two hours ahead of its sun; western China, on Beijing time, about three. The calculator lets you choose how far the clock may be off.
  • Noon is the sharpest moment. Around solar noon the sun’s height barely changes, so a shadow measured then gives the narrowest band. In mid-morning or mid-afternoon the sun climbs or sinks quickly and the band widens.
  • Two bands can fit. A high sun at noon can stand south of one latitude and north of another, so the result can be two separate bands. The shadow’s direction, if you know which way is north in the photo, tells you which one.
  • No band means a mistake. If no latitude fits, the sun never stands that high at that clock time on that date: check the date, a 12-hour clock read as 24-hour, or the measurement.

Measuring a shadow in a photo

  1. Step 1Pick a vertical object on flat groundA pole, a post, a wall edge or a standing person whose foot and shadow tip are both visible. A slope under the shadow stretches or shortens it.
  2. Step 2Prefer objects seen side-onMeasure where the object and its shadow both run across the picture rather than towards the camera: perspective shortens whatever points at the lens, so a ratio taken there is unreliable.
  3. Step 3Measure both in the same unitPixels are fine. The height runs from the base to the top, the shadow from the base to the tip of the shadow of the top.
  4. Step 4Choose an honest errorFor a clean, side-on shadow ±10 % is fair; for a soft or foreshortened one choose ±20 % or ±30 %. The band follows that choice, and a very short shadow is never taken as measured more finely than 2 % of the height.

Sunrise, sunset and solar noon

Sunrise and sunset are the moments the top of the sun’s disc meets a level horizon, with the standard allowance for refraction (the sun’s centre 0.833° below the horizon), as NOAA computes them. Solar noon is the moment the sun crosses the meridian and stands highest; the calculator gives its elevation too. Near the poles the sun can stay up or down all day, and the page says so instead of inventing a time; just inside the polar circles a sunset can fall after midnight, and the page marks it as the next day.

Times are shown in the time zone you pick, with summer time as your browser’s time zone database has it for that date. Everything is calculated on your device: nothing you enter is sent anywhere, and the map is drawn from a file on this site rather than from a map service.

For a walk-through of shadow clues in a real investigation, see how to find location from shadows, and for the date a picture was taken, how to find out when a picture was taken. The photo geolocation workflow shows where the sun fits among other clues.

Frequently asked questions

What is the difference between sun elevation and azimuth?
Elevation is the sun’s height above the horizon, from 0° at sunrise to 90° overhead. Azimuth is its compass bearing, clockwise from true north: 90° east, 180° south, 270° west. Together they say exactly where to look.
Does the calculator use true north or magnetic north?
True north. A magnetic compass points to magnetic north, which can be several degrees east or west of true north depending on where you are, so correct for it before lining up a compass with the azimuth shown.
Which time zone should I choose?
The time zone of the place, not your own. Choosing a point on the map suggests the zone whose main city is nearest; check it, because a border can lie in between. A fixed UTC offset is there for clocks that ignore summer time.
Why can my weather app’s sunrise differ by a minute?
Apps round differently, some allow for the observer’s height or a different refraction, and real refraction changes with the weather. NOAA puts these calculations within about a minute between 72° N and 72° S.
Is anything I enter sent to a server?
No. The sun’s position, the times and the latitude bands are calculated in your browser, and the world map is drawn from a map file served by this site. Nothing you type or pick on the map leaves your device.
How precise is the shadow-to-latitude result?
As precise as its inputs. The band already includes the measurement error and the clock spread you choose. Near solar noon, with a careful ±5 % measurement and a clock known to keep within half an hour of the sun, it can be under 2° wide; in mid-morning with an unknown clock it can span 60° or more.

Sources

  1. NOAA Solar Calculator — NOAA Global Monitoring LaboratoryThe equations this calculator follows, and the figures its tests compare with.
  2. Solar Calculation Details — NOAA Global Monitoring LaboratoryAccuracy of the sunrise and sunset times, the years covered, and the refraction model.
  3. Time Zone Database — IANAThe time zones and summer-time rules browsers use, and the zone cities behind the time-zone suggestion.
  4. Natural Earth — Natural EarthPublic-domain coastlines and borders of the world map (1:110 million).

Çerez bildirimi

Bu site; oturum, dil ve güvenlik için gereken zorunlu çerezlerin yanında, trafiği ve reklam performansını ölçmek için Google Analytics ve Meta Pixel çerezlerini kullanır. Bunları tarayıcı ayarlarınızdan engelleyebilirsiniz; ayrıntılar Çerez Politikası'nda.

Cookie notice

Alongside the strictly necessary cookies for sign-in, language and security, this site uses Google Analytics and Meta Pixel cookies to measure traffic and advertising performance. You can block them in your browser settings; details are in the Cookie Policy.