Skip to content

Reference guide · Sun, shadow and Moon calculator

Sun position and shadow length: declination, noon elevation and shadow

By the Mirage Interactive team · Last checked

A shadow is as long as the object is tall divided by the tangent of the sun's elevation above the horizon. All the work is in finding that elevation, which depends on the latitude, the date and the time of day.

The date enters through the sun's declination, the latitude on the celestial sphere where the sun stands overhead that day. It runs from about 23.4 degrees north at the June solstice to 23.4 degrees south at the December solstice. At solar noon the elevation follows from the declination and your latitude in one subtraction.

The short answer

Noon elevation = 90 degrees - |latitude - declination|. Shadow length = object height / tan(elevation). At other times, sin(elevation) = sin(lat) sin(dec) + cos(lat) cos(dec) cos(hour angle), with the hour angle 15 degrees for each hour from solar noon.

At 40 degrees north on 21 June 2026 the declination is 23.4 degrees, the noon elevation is 73.4 degrees and the noon shadow of a 2 m pole is 0.59 m.

Tables

The first table gives the sun's declination and the equation of time on the 21st of each month of 2026 at 12:00 UTC, and the noon elevation and noon shadow at 40 degrees north. The second gives the noon shadow length, as a multiple of the object height, for six northern latitudes on the same dates. Use your browser's print command to print this page: the tables print without the navigation.

Shadow length s = h / tan e. At solar noon the elevation is 90° minus the difference between the latitude and the sun's declination.
Solar declination and equation of time on the 21st of each month of 2026 (12:00 UTC), with noon elevation and noon shadow at 40 N
DateDeclination (deg)Equation of time (min)Noon elevation at 40 N (deg)Noon shadow at 40 N (x height)
21 January-19.8-11.330.21.72
21 February-10.5-13.639.51.21
21 March0.4-7.150.40.83
21 April12.01.362.00.53
21 May20.23.470.20.36
21 June23.4-1.873.40.30
21 July20.4-6.570.40.36
21 August12.0-3.262.00.53
21 September0.66.950.60.82
21 October-10.815.439.21.23
21 November-20.014.230.01.73
21 December-23.41.926.62.00

Source: computed by the site build from the formulas below.

Noon shadow length as a multiple of the object height, by date in 2026 and northern latitude (flat ground)
Date0 N20 N30 N40 N50 N60 N
21 January0.360.831.181.722.725.58
21 February0.180.590.851.211.762.82
21 March0.010.360.570.831.181.71
21 April0.210.140.330.530.781.11
21 May0.370.000.170.360.570.83
21 June0.430.060.120.300.500.74
21 July0.370.010.170.360.570.83
21 August0.210.140.320.530.781.11
21 September0.010.350.560.821.171.69
21 October0.190.600.861.231.792.87
21 November0.360.841.191.732.745.66
21 December0.430.951.352.003.368.69

Source: computed by the site build from the formulas below.

Formulas

Declination
T = (JD - 2451545) / 36525 L0 = 280.46646 + 36000.76983 T M = 357.52911 + 35999.05029 T C = (1.914602 - 0.004817 T) sin M + 0.019993 sin 2M + 0.000289 sin 3M lambda = L0 + C - 0.00569 - 0.00478 sin(125.04 - 1934.136 T) eps = 23.4393 - 0.013 T + 0.00256 cos(125.04 - 1934.136 T) declination = arcsin( sin(eps) sin(lambda) )
JD is the Julian day, T the time in Julian centuries from the year 2000. This is the low-accuracy series in Meeus, Astronomical Algorithms, chapter 25, used by the NOAA solar calculator: good to about 0.01 degree for the years 1800 to 2100. Angles are in degrees.
Equation of time
y = tan^2(eps / 2) e = 0.016709 - 0.000042 T EoT (minutes) = 4 x degrees of ( y sin 2L0 - 2e sin M + 4 e y sin M cos 2L0 - 0.5 y^2 sin 4L0 - 1.25 e^2 sin 2M )
The difference between solar time and clock time, which comes from the Earth's orbit and tilt. Solar time = clock time + 4 minutes x (longitude - time zone meridian) + EoT.
Elevation
sin(elevation) = sin(lat) sin(dec) + cos(lat) cos(dec) cos(H) H = 15 degrees x (solar time - 12 h)
No refraction and no parallax. Near the horizon the real sun appears slightly higher because of refraction.
Noon elevation
elevation = 90 degrees - |latitude - declination|
This is the elevation formula at H = 0.
Shadow length
shadow = height / tan(elevation)
On flat ground. On a slope the shadow is longer or shorter depending on the direction.

Worked example

A 2 m pole at 40 degrees north on 21 June 2026, at noon and at 15:00 solar time

  1. 12:00 UTC on 21 June 2026 is Julian day 2461213.0, so T = 0.264695. The series gives a declination of 23.44 degrees and an equation of time of -1.8 minutes.
  2. Noon: elevation = 90 - |40 - 23.44| = 73.44 degrees. The shadow is 2 / tan 73.44 = 0.595 m.
  3. At 15:00 solar time H = 45 degrees. sin(elevation) = sin 40 sin 23.44 + cos 40 cos 23.44 cos 45, so the elevation is 48.82 degrees and the shadow is 2 / tan 48.82 = 1.750 m, about 2.9 times as long as at noon.
  4. For comparison, on 21 December 2026 the declination is -23.44 degrees, the noon elevation at 40 degrees north is 26.56 degrees and the noon shadow of the same pole is 4.00 m.

Things to watch

  • Solar noon is when the sun is highest, which is not 12:00 on the clock. Correct for your longitude within the time zone and for the equation of time, and for daylight saving time where it applies.
  • The declination changes by up to 0.4 degree in a day near the equinoxes, so a noon value at another longitude than the 12:00 UTC of the tables differs a little, and the table dates shift slightly from year to year.
  • The shadow points away from the sun. At 40 degrees north the sun is south of overhead at noon all year, so the noon shadow points north.
  • The tables stop at 60 degrees north; nearer the pole the noon elevation is low and the shadow very long. Obstructions, terrain and the sun's size are not included.
  • A planning aid for sun position, daylight and shadow geometry. Verify for design, survey or permit work.

Related guide: Sun angle by latitude and shadow length table

More from this family: Shadow length on a slope: how the ground tilt stretches or shortens a shadow · Solar panel row spacing calculator: pitch between rows for no shading

Skip the arithmetic

Sun Position & Shadow Length

Sun Position & Shadow Length gives the sun's azimuth and elevation and the shadow length and direction through the day, on flat ground or a slope, and lists the intermediate values of each result, such as declination, equation of time, hour angle and refraction. It never uses your location unless you type it. One-time purchase · No subscription · Price shown in your store. Works offline, no ads, no account.

Questions

How do you calculate shadow length from the sun's position?

Divide the object's height by the tangent of the sun's elevation above the horizon.

What is solar declination?

The angle of the sun north or south of the celestial equator. It sets which latitude has the sun overhead at noon on a given day.

How high is the sun at noon?

It is 90 degrees minus the difference between your latitude and the sun's declination that day.