Sun Position & Shadow Calculator

Where the sun is in the sky for any place and moment, how long and which way shadows fall, and, from a shadow measured in a photo, the times of day it could have been taken.

Last updated

Paste from Google Maps (right-click a spot → the coordinates) or any map; a Google Maps link with @lat,lon works too.

How to find the sun’s position

  1. Enter a place as latitude and longitude, a date, a time and the time zone.
  2. Read the sun’s direction (azimuth) and height (elevation), and the shadow length.
  3. To date a photo, enter an object’s height and its shadow’s length to see the times that fit.

How it works

The sun's position is worked out with the equations used by the US National Oceanic and Atmospheric Administration's solar calculator (good to about a hundredth of a degree for dates between 1800 and 2100), including the bending of light near the horizon. Azimuth is the compass direction of the sun, measured clockwise from true north (90° is east, 180° south). Elevation is its angle above the horizon. A vertical object's shadow points the opposite way, and its length is the object's height divided by the tangent of the elevation: at 45° shadows are as long as the object, at 20° nearly three times as long.

Dating a photo (chronolocation): measure something vertical in the picture and its shadow on flat ground in the same units (a person, a lamp post, a door frame), enter the place and date, and the tool lists the times when the sun was at that height. There are usually two, one in the morning and one in the afternoon; the shadow's direction tells you which. Uneven or sloping ground, and objects that aren't vertical, throw the result off, so treat it as an estimate. The shadow direction is relative to true north, not magnetic north.

Times use the time zone you choose, including daylight saving on that date. Sunrise and sunset are when the top of the sun meets a flat horizon. Everything is calculated in your browser.

Questions about the sun’s position

What are azimuth and elevation?

Azimuth is the sun’s compass direction, clockwise from north (90° east, 180° south). Elevation is its angle above the horizon.

How long is a shadow?

The object’s height divided by the tangent of the sun’s elevation: at 45° it equals the height, and at 20° it’s almost three times as long.

How can a shadow show when a photo was taken?

The ratio of an object’s height to its shadow fixes the sun’s elevation, which happens at only a couple of times each day. This is called chronolocation.

How accurate is it?

It uses the same equations as NOAA’s solar calculator, accurate to about a hundredth of a degree for dates from 1800 to 2100.

☕ Support toolcrate