☀️ Solar Elevation Angle Calculator

Calculate the sun's position in the sky for any location and time

Solar Elevation Angle
--
Solar Azimuth: --
Declination: --
Hour Angle: --
Equation of Time: --
Day of Year: --

📐 Overview

The solar elevation angle (also called solar altitude) is the angle between the sun's rays and the horizontal plane at a specific location on Earth. It ranges from 0° (sun on the horizon) to 90° (sun directly overhead).

This calculator uses standard astronomical algorithms to compute the sun's position based on your geographic coordinates and the date/time.

🔢 Calculation Method

Step 1: Day of Year

Calculate the day number in the year (1-365):

N = day of year

Step 2: Declination Angle (δ)

The declination angle is the angle between the sun's rays and the equatorial plane:

δ = 23.45° × sin(360/365 × (N + 284))

Variables:

  • δ = Declination angle (degrees)
  • N = Day of year (1-365)
  • 23.45° = Earth's axial tilt

Step 3: Equation of Time (EoT)

Corrects for the difference between solar time and clock time due to Earth's elliptical orbit and axial tilt:

B = 360/365 × (N - 81)
EoT = 9.87 × sin(2B) - 7.53 × cos(B) - 1.5 × sin(B)

Variables:

  • EoT = Equation of time (minutes)
  • B = Intermediate angle (degrees)

Step 4: Local Solar Time (LST)

Convert local time to solar time:

LST = Local Time + EoT/60 + (Longitude - Local Meridian)/15

Variables:

  • LST = Local Solar Time (hours)
  • Local Meridian = Timezone × 15°

Step 5: Hour Angle (H)

The angular displacement of the sun east or west of the local meridian:

H = 15° × (LST - 12)

Variables:

  • H = Hour angle (degrees)
  • LST = Local Solar Time (hours)
  • 15° = Earth's rotation per hour

Step 6: Solar Elevation Angle (α)

The final calculation of the sun's height above the horizon:

sin(α) = sin(δ) × sin(φ) + cos(δ) × cos(φ) × cos(H)
α = arcsin(sin(δ) × sin(φ) + cos(δ) × cos(φ) × cos(H))

Variables:

  • α = Solar elevation angle (degrees)
  • δ = Declination angle (degrees)
  • φ = Latitude (degrees)
  • H = Hour angle (degrees)

Step 7: Solar Azimuth Angle (A)

The compass direction from which the sunlight is coming:

cos(A) = (sin(δ) × cos(φ) - cos(δ) × sin(φ) × cos(H)) / sin(90° - α)

Variables:

  • A = Solar azimuth angle (degrees)
  • α = Solar elevation angle (degrees)

📝 Notes

Accuracy: This method provides results accurate to within 0.5-1 degree for most applications. For precise scientific applications, more complex algorithms may be required.
Limitations: This calculation assumes standard atmospheric conditions and does not account for atmospheric refraction, which can slightly affect the apparent sun position near the horizon.
Time Zones: Ensure you use the correct UTC offset for your location. Some regions have daylight saving time, which may require manual adjustment.

🔍 References

This calculator implements the standard solar position calculation method used in renewable energy systems, architecture, and astronomy. The algorithms are based on the Cooper (1969) and NOAA solar position calculations.