Calculate The Sun's Position on A Date
This calculator determines the sun's position (azimuth and altitude) for any given date, time, and location on Earth. Understanding the sun's position is essential for solar energy applications, astronomy, and outdoor activities.
How to Use This Calculator
To calculate the sun's position:
- Enter the date and time you're interested in
- Specify your location by entering latitude and longitude
- Click "Calculate" to get the sun's azimuth and altitude
- Review the results and chart visualization
The calculator uses precise algorithms to account for Earth's elliptical orbit, axial tilt, and other astronomical factors.
Formula Used
The sun's position is calculated using the following formulas:
Solar Declination (δ):
δ = -23.45° × cos(360/365 × (n + 10))
where n is the day of the year (1-365)
Equation of Time (EOT):
EOT = 9.87 × sin(2B) - 7.53 × cos(B) - 1.5 × sin(B)
where B = (360/365) × (n - 81)
Solar Time (ST):
ST = LT + (4 × (longitude - standard meridian)) + EOT
where LT is local time
Hour Angle (H):
H = 15° × (ST - 12)
Sun Altitude (α):
α = arcsin(sin(δ) × sin(φ) + cos(δ) × cos(φ) × cos(H))
where φ is latitude
Sun Azimuth (A):
A = arctan2(sin(H), cos(H) × sin(φ) - tan(δ) × cos(φ))
These formulas account for Earth's axial tilt (23.45°), orbital eccentricity, and the observer's location.
Worked Example
Let's calculate the sun's position on June 21 (summer solstice) at 12:00 PM for New York City (40.71° N, 74.01° W):
- Day of year (n) = 172
- Solar declination (δ) = -23.45° × cos(360/365 × (172 + 10)) ≈ 23.45°
- Equation of time (EOT) ≈ -0.16 minutes
- Solar time (ST) ≈ 12:00 PM
- Hour angle (H) = 0°
- Sun altitude (α) ≈ 71.57°
- Sun azimuth (A) ≈ 180° (south)
On the summer solstice, the sun reaches its highest point in the sky at noon, directly overhead for locations at the Tropic of Cancer (23.45° N).
Interpreting Results
The calculator provides two key measurements:
- Azimuth: The compass direction the sun is coming from (0° = north, 90° = east, 180° = south, 270° = west)
- Altitude: The angle above the horizon (0° = on horizon, 90° = directly overhead)
During the day, the sun's azimuth moves from east to west while its altitude rises and falls. The exact position depends on your location, date, and time of day.
Note: The calculator assumes a clear sky with no atmospheric refraction. Actual sun position may vary slightly due to weather conditions.