Sun Angle Calculator

Enter a date, latitude, and local solar time to find the sun's elevation, zenith, declination, and azimuth angles using standard solar-position formulas.

Quick Facts

Declination
δ = 23.45° × sin[360°(284+N)/365]
Cooper's equation; N is the day of year. Declination swings between +23.45° and −23.45° with the seasons.
Elevation angle
sin(α) = sinφ sinδ + cosφ cosδ cosH
φ = latitude, H = hour angle (15° per hour measured from solar noon).
Solar noon
H = 0°
The sun crosses the local meridian and reaches its highest elevation of the day.

Your Results

Calculated
Solar Elevation Angle
-
Altitude above the horizon
Solar Zenith Angle
-
Angle from directly overhead (90° − elevation)
Solar Declination
-
Sun's angle relative to the equatorial plane
Solar Azimuth Angle
-
Compass bearing, clockwise from north

Ready

Enter a date, latitude, and local solar time, then press Calculate.

Formula and Method for Sun Angle

The sun's position in the sky at any moment is described by two angles: the elevation angle (how high the sun sits above the horizon) and the azimuth angle (its compass direction). Both depend on the date (which sets the sun's declination), the observer's latitude, and the local solar time. This calculator applies the standard solar-position equations used in solar engineering and astronomy to compute elevation, zenith, declination, and azimuth from those three inputs.

How the calculation works

First, the calculator finds the day of year N from the date and computes the solar declination with Cooper's equation, δ = 23.45° × sin[360°(284+N)/365] — this tracks the 23.45° tilt of Earth's rotational axis, which is why declination is near +23.45° at the June solstice, near −23.45° at the December solstice, and 0° at the equinoxes. Next it converts local solar time to an hour angle, H = 15°×(t − 12), since Earth rotates 15° per hour and H = 0° at solar noon. The elevation angle α then follows from sin(α) = sinφ·sinδ + cosφ·cosδ·cosH, where φ is latitude. The zenith angle is simply 90° − α, and the azimuth angle (compass bearing from north) is recovered from cos(γ) = (sinδ − sinα·sinφ) / (cosα·cosφ), mirrored into the 180°–360° range for the afternoon (H > 0).

Local solar time vs. clock time

This calculator uses local solar time, where solar noon (the sun's highest point of the day) is always 12:00 — not the clock time on your phone or watch. Clock time differs from solar time because of time zones, daylight saving offsets, your exact longitude within the time zone, and the "equation of time" (a roughly ±16-minute wobble caused by Earth's elliptical orbit and axial tilt). For a rough estimate, solar noon typically falls near 12:00–13:00 local clock time; for precise sun-position work, apply a longitude and equation-of-time correction before entering a solar time here.

Frequently Asked Questions

What is the solar elevation angle?
The solar elevation angle (also called solar altitude) is how high the sun sits above the horizon, measured in degrees from 0° (on the horizon, at sunrise/sunset) to 90° (directly overhead). A negative elevation means the sun is below the horizon — it's nighttime or twilight.
How is solar declination calculated?
Solar declination (δ) is the angle between the sun's rays and Earth's equatorial plane. This calculator uses Cooper's equation, δ = 23.45° × sin[360°(284+N)/365], where N is the day of the year. It ranges from +23.45° at the June solstice to −23.45° at the December solstice and crosses 0° at the equinoxes.
What's the difference between local solar time and clock time?
Local solar time is defined so that solar noon (12:00) is always when the sun crosses your local meridian and reaches its highest point of the day. Clock time is offset from this by your time zone, longitude within that zone, daylight saving time, and the equation of time, so true solar noon can land anywhere from about 11:45 to 12:15 before further time-zone adjustments.
What does the solar azimuth angle tell me?
Solar azimuth is the sun's compass direction, measured clockwise from true north: 0° is north, 90° is east, 180° is south, and 270° is west. It tells you where on the horizon to look for the sun, which is useful for photography, solar panel orientation, and shadow-direction planning.