Looking for the Wndsn store? This way, please.

Wndsn Sun Calculator

Companion to Wndsn Quadrant Telemeters: Low tech, high utility graphical distance computers from the Wndsn applied science lab.

By way of using a Wndsn Quadrant to measure local latitude and calculate declination for a given date, a number of values can be derived through further Quadrant computations.

The celestial sphere with all relevant variables showing the relationship between the equatorial and azimuthal coordinate system.

Input

Enter latitude φ, longitude λ, and solar declination δ to compute a variety of Sun data.
Reset

Results [JSON] [XML] [CSV]

Input

  • Latitude φ: 52.5°
  • Longitude λ: 13.3°
  • Time zone: (GMT +1:00) Berlin, Copenhagen, Paris, Zagreb
  • Date: 2020-12-21
  • Daylight Saving Time (DST): No
  • Instantaneous Sun altitude h: 10°

General calculations for latitude

  • Maximum solar altitude H for latitude given
    • on equinoxes: 37.5°
    • on June solstice: 60.94°
    • on December solstice: 14.06°
  • Sunrise αsr and sunset αss azimuth
    • on equinoxes: 90° and 270°
    • on June solstice: 49.2° and 310.8°
    • on December solstice: 130.8° and 229.2°

Diurnal calculations for latitude and declination

  • Day #: 356
  • Declination δ: −23.44°
  • Sunrise azimuth αsr: 130.8°
  • Sunset azimuth αss: 229.2°
  • Hour angle at sunrise τsr: 57.39°
  • Noon altitude H: 14.06°
  • Solar midnight depression: −60.94°
  • Sun hours: 07:39
  • Length of unequal Sun hour: 00:38:16
  • Equation of time: +01:42

Diurnal calculations for longitude

  • 06:50: Start of nautical dawn
  • 07:34: Start of civil dawn
  • 08:16: Sunrise
  • 12:05: Solar noon
  • 15:55: Sunset
  • 16:36: End of civil dusk
  • 17:21: End of nautical dusk

Instantaneous calculations for solar altitude

  • Sun altitude h: 10°
  • Hour angle τ: 28.85°
  • Unequal hour from sunrise (rounded to quarters): 3 or 9 (from the data, we cannot discern AM or PM)
  • Time to or from noon: 01:55
  • Time: 10:10 or 14:01 (from the data, we cannot discern AM or PM)
  • Sun azimuth αs (from South, towards West in the afternoon or East in the morning): 26.72°
  • Shadow length (of a stick with a height of 1 unit): 5.67

The equations are proof-of-concept formulas based on ancient formulas of spherical trigonometry. The calculated results are FOR EDUCATIONAL PURPOSES ONLY; some are exact, some are approximate, and some are simplified. Actual Sun data may vary significantly.

The display precision set is .2. To change that, edit the variable &digits=x in the URL where 0 <= x <= 9.

Formulas

[Load sample values (JSON) (XML) (CSV).]

H(φ, δ)
Sun altitude at noon H from latitude:
H = (90° − φ) + δ
αsr(φ, δ)
Azimuth αsr of rising/setting Sun:
cos(αsr) = sin(δ) / cos(φ)
τsr(φ, δ)
Hour angle τsr of rising/setting Sun (from noon):
cos(τsr) = −tan(φ) · tan(δ) [This is the geometric sunrise/set. For the true sunrise/set, Tycho uses the formula for τ(h, φ, δ) below with h = −0.833°, which allows for refraction and the radius of the Sun.]
τ(h, φ, δ)
Hour angle τ from instantaneous Sun altitude h:
cos(τ) = (sin(h) − sin(δ) · sin(φ)) / (cos(δ) · cos(φ))
αs(τ, φ, δ)
Sun azimuth αs for a given hour:
tan(αs) = sin(τ) / (sin(φ) · cos(τ) − cos(φ) · tan(δ)) [measured from South; the quadrant follows from the signs of numerator and denominator.]

where H = Sun altitude at noon, h = instantaneous Sun altitude, τ = hour angle, φ = latitude, and δ = declination.

Using the sphere

The sphere shows the Sun's day at the latitude given. The Sun travels on its daily circle, drawn solid above the horizon and dashed below it, and the two dots on the horizon mark where it crosses. The red arcs are the coordinates of the formulas: the latitude φ along the meridian, the declination δ along the hour circle, the hour angle τ along the equator, and the altitude h with the azimuth α from the south point in the horizon system.

Drag the red Sun along its circle to set the instantaneous altitude h, or the north pole to set the latitude. The declination comes from the date or from the declination field. But an altitude alone does not say whether it is morning or afternoon, so the sphere keeps the Sun on the side of noon where it was put. Drag anywhere else to turn the sphere, and Reset view brings it back. The Triangle button shows the navigational triangle that connects the Sun with the pole and the zenith. And every move fills in the form, so the results and the address follow along.


Notes

  • Times are clock times for the time zone you choose, worked out from the true longitude. Places far from their zone's meridian, such as Sevilla in Spain (6°W, in CET, UTC+1), therefore see solar noon well after 12:00.

URL and API parameters

latitude
latitude in degrees, -90 to 90, north positive
longitude
longitude in degrees, -180 to 180, east positive; with tz it gives the clock times
tz
the time zone in hours from UTC, -12 to 14
dst
daylight saving time: 0 (the default) or 1
date
the date, such as 2026-11-03
declination
a known declination in degrees, -23.44 to 23.44; it wins over the date's
sun_altitude
a Sun altitude in degrees, -90 to 90, for the instantaneous values
calc=yes
calculate; without it the page shows the sample values for today's date
digits
display precision, 0 to 9 (default 2)
side
where the sphere shows the Sun for the altitude given: pm, after noon (the default), or am
layer
what the sphere shows: coordinates (the default) or triangle
view
the direction the sphere is seen from, as azimuth and elevation in whole degrees (95,17); without it the sphere faces the Sun
format
json, xml or csv for the API; leave it out for this page. In JSON and XML, input holds what was given, and output holds the rest in four groups: latitudinal, diurnal, longitudinal, and instantaneous. Numbers are numbers, times are text, and a value that does not exist is null (empty in XML), such as a sunrise during the polar day. The CSV has the same columns for every query, and its input column names the values given. Invalid input gives notes instead of a result.

See also