Shadow calculator

How long will a shadow be? Divide the object's height by the tangent of the sun's height above the horizon. Sundial does the sun part for any address and minute, and draws the real shadows of the buildings around it.

Open the shadow calculator

Free, no sign-up. Works on phones and desktops.

The shadow length formula

shadow length = object height ÷ tan(sun height)

Sun height is the angle of the sun above the horizon, also called solar elevation. The formula assumes flat, level ground and measures to the tip of the shadow from the base of the object. If you'd rather skip the trigonometry, multiply the height by the figure in this table:

Sun heightShadow per 1 m of height
5°11.43 m
10°5.67 m
15°3.73 m
20°2.75 m
30°1.73 m
40°1.19 m
45°1.00 m
50°0.84 m
60°0.58 m
70°0.36 m

The curve is steep at the bottom. Between 20° and 10° the shadow doubles, and between 10° and 5° it doubles again. That's why late afternoon shadows in winter seem to stretch across a whole street.

Which way the shadow points

A shadow points directly away from the sun. Take the sun's compass bearing and add or subtract 180°. With the sun at 221° (south-west), shadows point to 41° (north-east). At solar noon in the UK the sun is due south, so shadows point due north. In the southern hemisphere the noon sun is in the north and noon shadows point south.

Worked example: a fence and a tree in London

Take a 1.8 m garden fence and a 10 m tree. Here is how long their shadows are at solar noon, the shortest point of each day, using London's noon sun heights:

DateSun height at noon1.8 m fence10 m tree
21 June61.9°0.95 m5.3 m
20 March38.3°2.3 m12.7 m
21 December15.1°6.7 m37.2 m

In June the fence shades a strip under a metre wide along its north side. In December the same fence shades nearly 7 m of lawn even at midday, which in many town gardens is the whole thing. By 3 pm on 21 December the sun is only 5.2° up at a bearing of 221°. The fence's shadow is then about 20 m long and the tree's about 110 m, both pointing north-east.

Further north the numbers grow. In Edinburgh the December noon sun is 10.6°, so each metre of height casts 5.34 m of shadow. In New York it's 25.8°, giving 2.06 m.

Seeing real shadows on the map

A formula works for one fence on flat ground. Real streets have houses of different heights, extensions and trees, and their shadows overlap. Sundial handles that part:

  1. Search your address on the sun path map.
  2. Set the date and drag the time. Every building within 300 m casts its shadow from the sun's real position.
  3. Read Sun height and Sun bearing in the panel if you want to apply the formula to something that isn't on the map, like a new fence or shed.
  4. Switch to Sun hours to see the total hours of direct sun each patch of ground gets that day, which sums up a day's worth of shadows in one picture.

The link above opens a residential street in Hackney at noon on the winter solstice. Drag the date towards June and watch the back gardens come out of shadow.

Limits. Building heights come from OpenStreetMap, and where none is mapped a typical height is assumed. Fences, sheds and unmapped trees aren't shown, and mapped trees are always in full leaf. Ground is treated as flat, so slopes change real shadow lengths, and cloud isn't modelled. Buildings more than 300 m away aren't loaded.