I have a photo where objects and their shadows (e.g. trees, people) are visible, the Sun is not visible directly, but it is clearly neither dusk nor dawn.

Let's assume that coordinates of this place are known more or less precisely so that I can find it on google maps.

I also know the date when this photo was taken but don't know the time of day. Is it possible to estimate it from the photo?

I have a debate with a friend of mine about this. My friend states that a reasonable enough estimate is to calculate the Sun's elevation above the horizon by

$$ \text{elevation} = \arctan \frac{\text{object's height}}{\text{shadow's length}} $$

and then use one the myriad websites on the internets to look up the time for that date and location.

I doubt it because

  1. The length of a shadow on the photograph depends on the relative position of the Sun, the object and the camera.

  2. Most importantly, the slope of the ground can't be estimated neither from the photo, nor from google maps. This picture is a good example.

Who's right? Am I missing something?

Also, it would be interesting to understand the role of uncertainties in this calculation. Assuming that the surface is reasonably smooth and the slope is close to zero, what uncertainties (location, object's height, shadow's length, the slope, camera position) would play the major role? Does it depend on the time of year?

  • $\begingroup$ The part that You missed is the fact that; and referring to Your example photo: there is no day and night, Only Day. So the "time" of day would only be relevant to the astronauts clock. $\endgroup$ Dec 7, 2016 at 4:34
  • 1
    $\begingroup$ I use this photo from the Moon only to illustrate my point about the role of the surface. Actual photo I'm talking about is taken on the Earth. $\endgroup$
    – xaxa
    Dec 7, 2016 at 13:10
  • $\begingroup$ Your comment is irrelevant - nobody claimed an attempt to achieve a 24-hour clock. $\endgroup$ Dec 7, 2016 at 13:12
  • 1
    $\begingroup$ For 1, the answers to my photo.stackexchange.com/questions/6111/… may be helpful. Yes, the shadow's length in pixels depends on where the camera is, but you can determine relative lengths of two objects despite that (you don't need the actual height of the object or length of the shadow, just the ratio between the two). $\endgroup$
    – user21
    Dec 7, 2016 at 19:39

2 Answers 2


I know that it's an old post, but there is an app available online which might help in similar situations:


It calculates and visualizes sun light and shadows in a 3D sense anywhere on the globe.

Screenshot of app from the site mentioned above.


In short: If you know length of shadow and object height (assuming vertical object casting shadow of an horizontal surface), you can tell time if you know date and you can tell date if you know time. Additionally, if you know direction of shadow (e.g. relative to north) you can tell date and time without knowing any of them.

The most tricky part is to measure objects and shadows from a photograph - because you need their real length and perspective distorts object and shadow lengths -. To do this you need to make some assumptions about the geometry of the objects in the photograph. In fact, if you know the geometry of the settings, after some geometrical calculation you can find the Sun position and therefore date and time.

For example, with an image like this one and a detailed map, you can find date, time, position of camera and even focal length of lens - with a lot of measurement and geometry calculation, of course.

However, if the only objects casting shadows in your image are trees and people, measuring their exact position and size would be impossible and date and time estimations will be quite rough, specially if the image doesn't show any other identifiable and measurable features - and even worse if you can't tell the north from features in the photo. In general, finding date and time from shadows works better with buildings, specially with sharp shaped buildings with known orientation.

  • $\begingroup$ A look at the algorithm for computing a sundial of arbitrary orientation and tilt might be helpful. Both parameters affect the location of the point where the shadow of the gnomon hits the sundial in addition to the ones like date, time and gnonom height for a horizontal sundial. Therefore: slope and orientation of the slope of the ground must be known as well. $\endgroup$
    – laune
    Dec 25, 2017 at 18:22
  • $\begingroup$ “If you know direction of shadow”: I suppose you mean in addition to length of shadow and height of object, right? $\endgroup$
    – jcaron
    Sep 4, 2022 at 14:24
  • $\begingroup$ I guess that six years ago I assumed that that was obvious, but I edited the answer to make it clearer just in case. $\endgroup$
    – Pere
    Sep 4, 2022 at 23:09
  • $\begingroup$ I'm right now looking for formula to calculate time of day from shadow direction on Earth and latitude. Do you know it? My Q: astronomy.stackexchange.com/questions/54711/… $\endgroup$ Sep 14, 2023 at 16:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .