Sollux

How long is your shadow? The math of sun angle

Shadow length is object height divided by the tangent of the sun's altitude. A multiplier table, worked examples, and why direction follows azimuth.

Quick answer: On flat ground, a shadow’s length equals the object’s height divided by the tangent of the sun’s altitude. At 45 degrees the shadow matches the object’s height, at 30 degrees it is 1.73 times the height, and at 10 degrees it is 5.67 times the height. The shadow points exactly away from the sun, so its direction is the sun’s azimuth plus 180 degrees.

The angle is the whole story. A 1.7 meter person casts a shadow under one meter long at noon in summer and well over three meters long at noon in winter, at the same spot, without moving. The difference is not the time on the clock. It is how high the sun sits above the horizon at that moment. Once you know that angle, you can work out the length directly, and you can work backwards from a shadow to the height of whatever cast it.

The formula

A vertical object, its shadow, and the ray of sunlight that just clears the top form a right triangle. The object is the vertical side, the shadow is the horizontal side, and the angle at the tip of the shadow is the sun’s altitude above the horizon.

That makes the tangent of the altitude equal to the object’s height divided by the shadow’s length:

shadow length = height ÷ tan(sun altitude)

Or, if you prefer multiplication, shadow length equals height times the cotangent of the altitude. Both are the same number.

The formula assumes flat ground, a vertical object, and a clear line to the sun. It also assumes the sun is above the horizon, since a sun below the horizon casts no shadow on the ground. Everything else in this article is a consequence of that one ratio.

Shadow multiplier by sun altitude

The multiplier is the number you multiply an object’s height by. It is 1 ÷ tan(altitude), so a smaller altitude gives a larger multiplier. The last column shows what that works out to for a person 1.7 meters tall.

Sun altitude Multiplier Shadow of a 1.7 m person
5° 11.43 19.4 m
10° 5.67 9.64 m
15° 3.73 6.34 m
20° 2.75 4.67 m
25° 2.14 3.65 m
30° 1.73 2.94 m
35° 1.43 2.43 m
40° 1.19 2.03 m
45° 1.00 1.70 m
50° 0.84 1.43 m
55° 0.70 1.19 m
60° 0.58 0.98 m
65° 0.47 0.79 m
70° 0.36 0.62 m
75° 0.27 0.46 m
80° 0.18 0.30 m

Two things stand out from the table. The multiplier passes through 1 at 45 degrees, which is why a 45 degree sun is the easy one to remember. And the numbers change far more quickly at low altitudes than at high ones.

Why the numbers grow so fast near the horizon

Tangent rises steeply as the angle approaches 90 degrees, which means the multiplier falls steeply as the sun climbs. Around the horizon it is the other way round: tangent is nearly flat near zero, so the multiplier is huge and very sensitive to small changes.

Going from 10 degrees to 5 degrees roughly doubles the shadow, even though the sun only moved five degrees. Going from 80 degrees to 75 degrees changes it by about 50 percent of a length that is already shorter than the object. Close to sunrise and sunset, a small error in the angle translates into a large error in the length. That is also where terrain, buildings, and the atmosphere bend the light enough to matter, which is covered further down.

Direction comes from azimuth, not the clock

Length is only half of a shadow. The other half is where it points. Sun position is usually described with two angles: altitude above the horizon, and azimuth around it. Azimuth is measured clockwise from true north, so east is 90 degrees, south is 180, and west is 270.

A shadow falls on the opposite side of the object from the sun, so its direction is simply the sun’s azimuth plus 180 degrees, wrapped back into the 0 to 360 range.

  • Sun in the east at 90 degrees: shadow points west at 270.
  • Sun due south at 180: shadow points due north at 0.
  • Late summer sun in the northwest at 300: shadow points southeast at 120.

That last case catches people out. A lot of descriptions of sun position assume morning sun in the east and afternoon sun in the west, but in summer at mid northern latitudes the evening sun can sit well north of west, so the shadow runs south of east. The compass names follow the numbers, not the other way round.

Clock time is a poor stand-in for sun angle

The same clock time can give very different altitudes, and the same altitude can happen at very different clock times. Several ordinary things cause this.

Solar noon is not clock noon. The sun reaches its highest point at solar noon, which is tied to the sun’s position over your longitude, not to the time zone you happen to live in.

Time zones are wide. A time zone spans 15 degrees of longitude at one hour offset, and some zones are much wider in practice. If you are on the western edge of a wide zone, solar noon can arrive well after 12:00. Daylight saving time shifts the clock again without moving the sun.

The equation of time. Earth’s orbit is slightly elliptical and its axis is tilted, so the interval between solar noons varies through the year. The effect is small, up to roughly a quarter of an hour, but it is one more reason clock time drifts from sun angle.

Latitude and season change the peak altitude. Two places at the same clock time can have the sun at completely different heights.

The practical consequence is simple. If you want a shadow length for a specific place and date, calculate from the sun’s altitude at that place and date. Do not estimate the altitude from the clock and hope the two agree.

The same latitude, summer and winter

At solar noon, the sun’s maximum altitude is approximately:

noon altitude = 90° − |latitude − solar declination|

Solar declination is the sun’s angle north or south of the celestial equator. It runs from about 23.44 degrees north at the June solstice to about 23.44 degrees south at the December solstice, because of Earth’s axial tilt.

Take a latitude of 40 degrees north. At the June solstice the noon altitude is about 73.4 degrees, giving a multiplier of 0.30. At the December solstice it is about 26.6 degrees, giving a multiplier of 2.00. A 1.7 meter person casts a shadow of roughly 0.5 meters in June and 3.4 meters in December at the same spot. The winter shadow is close to seven times longer.

The same arithmetic works in the southern hemisphere, with the declination sign reversed. The summer sun is high and the winter sun is low in both hemispheres, but the dates are swapped.

Working backwards: height from a shadow

Because the ratio runs both ways, you can estimate the height of something you cannot reach:

height = shadow length × tan(sun altitude)

A tree casts a 12 meter shadow when the sun is 35 degrees above the horizon. The tangent of 35 degrees is 0.70, so the tree is about 8.4 meters tall.

This is a rough measurement, not a survey. It gets worse when the ground slopes, when the shadow crosses a change in level, when the top of the object is rounded or slanted rather than a defined point, and when the object is far enough away that the sun’s angle differs noticeably across the site. For a building or a tree, treat the result as a sanity check rather than a fact.

A stick check with no app at all

You can confirm the whole model with a straight stick, a tape measure, and level ground.

  1. Push a stick into the ground so it stands vertical, and measure the height above the surface with a tape.
  2. Measure the length of its shadow at the same moment you care about.
  3. Divide the stick’s height by its shadow length. That is the tangent of the sun’s altitude.
  4. Apply the same ratio to anything else on level ground at the same time: object height = stick height × object shadow ÷ stick shadow.

The ratio method avoids ever computing an angle, and it cancels out a lot of small measurement errors because both shadows are affected the same way. It only holds while the sun is in the same position, so measure everything within a few minutes, and make sure the stick is actually vertical in both directions rather than just leaning one way.

Where the number earns its keep

Shadow length is not an abstract exercise. It answers ordinary planning questions.

Photography and video. If you are scouting a location for late afternoon, the useful question is whether a building or a ridge will shade the spot at that hour. A two meter wall with the sun at 30 degrees throws a shadow about 3.5 meters long. At 60 degrees it is about 1.2 meters. The same wall is a different obstacle depending on the season and the hour.

Gardening. A fence, hedge, or house edge decides how much of a bed gets direct sun. Calculate the shadow length at the hours that matter, then compare it with the distance to the plants. A bed one meter from a two meter fence is in shade whenever the sun is below about 63 degrees, which is much of the day outside midsummer.

Solar panels, patios, washing lines, and parking. Anything that depends on direct sun benefits from the same calculation, especially when you are choosing between two spots or checking whether a winter shadow will reach something you care about.

Site visits. Estimating the height of a tree or building from its shadow is often the fastest measurement available when you cannot get close or cannot climb.

What the estimate leaves out

The formula is exact for a point sun, a vertical object, and a level plane. Real sites are messier.

  • Sloped ground. A slope changes the geometry, and a shadow running downhill is longer than the same shadow on the flat.
  • Terrain and obstructions. A distant hill, a neighboring roof, or a treeline can block the sun before its geometric altitude says it should be visible.
  • Atmospheric refraction. Near the horizon the atmosphere lifts the sun’s apparent position by a small amount, so the sun you see is slightly higher than the geometric one. This matters most exactly where shadows are longest.
  • The sun is not a point. It has a visible disc, so shadow edges are soft and the darkest part is slightly shorter than the geometric tip. For most planning that difference is small, but for a precise measurement it is not zero.
  • Object shape. A sphere, a pitched roof, and a flagpole do not cast the clean triangle the formula assumes. Use the height of the highest point that actually blocks light.

Treat the result as a good estimate for planning and a poor substitute for a survey. When a decision depends on centimeters, measure on site.

Where Sollux fits

Sollux calculates sun position, daylight, golden hour, and shadow length and direction for your current location or a place you save, using the standard solar position equations on the device. It is useful for exactly the questions above: checking a spot before you drive there, comparing two places, or seeing how the shadow at a fence line changes between seasons. Saved places stay on your iPhone, and the app does not need an account. The overview is at Sollux.

Frequently asked questions

What is the shadow length formula?

shadow length = height ÷ tan(sun altitude), on flat ground with a vertical object. The multiplier is 1 ÷ tan(altitude).

How long is a shadow at 45, 30 and 10 degrees?

At 45 degrees the shadow equals the object’s height. At 30 degrees it is 1.73 times the height, and at 10 degrees it is 5.67 times the height.

Which way does a shadow point?

Directly away from the sun. Its direction is the sun’s azimuth plus 180 degrees, wrapped into 0 to 360, with azimuth measured clockwise from true north.

Why is clock time a poor guide to sun angle?

Solar noon is not clock noon, time zones are wide, daylight saving shifts the clock without moving the sun, the equation of time drifts by up to roughly a quarter hour, and latitude and season change the peak altitude.

How different are summer and winter shadows?

At 40 degrees north, a 1.7 meter person casts a noon shadow of roughly 0.5 meters at the June solstice and 3.4 meters at the December solstice, about seven times longer.

How do I find an object’s height from its shadow?

height = shadow length × tan(sun altitude). A tree with a 12 meter shadow at 35 degrees altitude is about 8.4 meters tall. Treat it as a rough estimate, since sloped ground and rounded tops add error.

Sollux

Shows the live sun position, daylight and golden hour, and shadow length and direction for your location and saved places.

See Sollux