Key numbers
- Elevation: sin(el) = sin φ sin δ + cos φ cos δ cos h
- Hour angle: 15° per hour from solar noon
- Declination: ±23.45° at the solstices, 0° at the equinoxes
- Accuracy: about ±1°, enough for shading and panel planning
On this page
How to use the Solar Position Calculator
- 1Enter your numbersFill in location, latitude (if other) (°), month, day of month and solar time (12 = solar noon) (h). Every field starts with a typical value you can overwrite.
- 2Check the assumptionsUses solar time, not clock time: solar noon is when the sun is highest, often 30–90 minutes after 12:00 on the clock under daylight saving. Accuracy about ±1°, fine for shading and panel planning.
- 3Read the resultsThe calculator shows sun elevation (altitude), sun azimuth (from north, clockwise), zenith angle, day length and solar declination, and updates as you type.
- 4Use the resultCompare it with your bill, a quote or a product spec sheet before you buy or install anything.
Results update as you type. Back to the calculator ↑
This solar position calculator shows where the sun is in the sky for any latitude, date and solar time. It returns the sun’s elevation (altitude), azimuth, zenith angle, the day length and the solar declination. Use it as a sun angle calculator for shading checks, panel layout, garden planning or photography.
How the sun position is calculated
The calculator uses three angles: your latitude φ, the solar declination δ for the date, and the hour angle h for the time of day.
- Declination δ = 23.45° × sin(360/365 × (284 + day of year)), from Cooper (1969)
- Hour angle h = (solar hour − 12) × 15°. The sun moves 15° per hour, negative in the morning.
- Elevation: sin(el) = sin φ × sin δ + cos φ × cos δ × cos h
- Azimuth: cos(az) = (sin δ − sin(el) × sin φ) ÷ (cos(el) × cos φ), mirrored to the west after noon
- Day length = 2 × arccos(−tan φ × tan δ) ÷ 15 hours
Solar declination is the latitude at which the sun is directly overhead at noon on a given day.
Worked example with the default inputs
The default is New York City (latitude 40.7°) on June 21 at 15:00 solar time.
- June 21 is day 172, so δ = 23.45 × sin(360/365 × 456) = 23.45°, the summer solstice.
- Hour angle = (15 − 12) × 15 = 45° (afternoon).
- Elevation = 48.7°, so the zenith angle is 90 − 48.7 = 41.3°.
- Azimuth = 259.4°, a little south of due west.
- Day length = 14.9 hours.
Sun position table for New York
These values come from the same formula for latitude 40.7°. Morning and afternoon are mirror images around solar noon.
| Date | Solar time | Elevation | Azimuth |
|---|---|---|---|
| June 21 | 06:00 | 15.0° | 71.8° |
| June 21 | 08:00 | 37.4° | 89.8° |
| June 21 | 10:00 | 59.5° | 115.3° |
| June 21 | 12:00 | 72.7° | 180.0° |
| June 21 | 14:00 | 59.5° | 244.7° |
| June 21 | 16:00 | 37.4° | 270.2° |
| June 21 | 18:00 | 15.0° | 288.2° |
| December 21 | 09:00 | 13.4° | 138.2° |
| December 21 | 12:00 | 25.9° | 180.0° |
| December 21 | 15:00 | 13.4° | 221.8° |
The December noon sun in New York is about 47° lower than the June noon sun, and the day is 9.1 hours long instead of 14.9. Twice the declination swing (2 × 23.45°) explains that gap.
What affects the result
Latitude. The closer you are to the poles, the lower the sun and the bigger the swing between summer and winter day length.
Solar time versus clock time. Enter solar time, where 12 is solar noon. Daylight saving time and your position within the time zone shift clock time away from solar time, often by 30 to 90 minutes.
Formula precision. The Cooper declination equation and the omission of the equation of time and atmospheric refraction keep the error near ±1°. That is fine for planning but not for telescope or tracker control; NOAA’s solar calculator is more precise.
Hemisphere. South of the equator, enter a negative latitude. The noon sun then sits due north, at an azimuth of 0°.
History of solar position algorithms
Predicting the sun’s place in the sky is one of astronomy’s oldest problems, but the formulas used in solar engineering are recent. The simple declination equation here was published by P. I. Cooper in 1969 in Solar Energy (Cooper, 1969). It is easy to compute by hand and good to about a degree.
For higher accuracy, NOAA’s solar calculator implements equations from Jean Meeus’s textbook Astronomical Algorithms (Willmann-Bell, 1991), adding the equation of time and atmospheric refraction (NOAA calculation details). In 2004 Ibrahim Reda and Afshin Andreas at NREL published the Solar Position Algorithm (SPA), which gives the sun’s zenith and azimuth to within ±0.0003° for the years −2000 to 6000 (Reda & Andreas, 2004; SPA code). SPA is now a common reference for tracker control and solar radiation measurement.
| Year | Milestone | Source |
|---|---|---|
| 1969 | Cooper declination equation | Solar Energy 12:333 |
| 1991 | Meeus, Astronomical Algorithms (basis of NOAA’s calculator) | NOAA |
| 2004 | NREL Solar Position Algorithm, ±0.0003° | Solar Energy 76:577 |
Elevation, azimuth and zenith explained
Three angles describe where the sun is. Elevation (or altitude) is the height of the sun above the horizon, from 0° at sunrise or sunset to 90° directly overhead. Zenith angle is measured from straight up instead, so it equals 90° minus the elevation. Azimuth is the compass bearing of the sun, measured clockwise from true north: 90° is east, 180° south and 270° west. Together, elevation and azimuth let you point at the sun from any spot, which is all you need to check whether a tree, chimney or neighboring building will cast a shadow on a panel or window.
How to use sun angles for solar panels
- Shading check: look at the December 9:00 and 15:00 positions. Obstacles that rise above about 13° toward the southeast or southwest will shade a New York array on winter mornings and afternoons.
- Tilt: a panel is square to the sun when its tilt equals the zenith angle at noon. The solar panel angle calculator turns this into monthly and year-round tilts.
- Sizing: once you know the site is clear, estimate panel count with the solar panel calculator.
References
- Cooper, P. I. (1969). “The absorption of radiation in solar stills.” Solar Energy, 12(3), 333–346. doi:10.1016/0038-092X(69)90047-4
- Meeus, J. (1991). Astronomical Algorithms. Richmond, VA: Willmann-Bell. Implemented in NOAA’s solar calculator.
- Reda, I., & Andreas, A. (2004). “Solar position algorithm for solar radiation applications.” Solar Energy, 76(5), 577–589. doi:10.1016/j.solener.2003.12.003
To understand why sun angle drives output, see the solar energy guide, and explore other sources on our renewable energy home page.
FAQ
Frequently asked questions
What is the sun's elevation angle?
Solar elevation, also called altitude, is the angle of the sun above the horizon. 0° means the sun is on the horizon and 90° means directly overhead. The zenith angle is the complement, 90° minus the elevation, measured from straight up.
What is solar azimuth?
Azimuth is the sun's compass direction, measured clockwise from true north. 90° is east, 180° is south and 270° is west. In the northern hemisphere the sun sits at 180°, due south, at solar noon.
What is solar time and how is it different from clock time?
Solar time is set so that 12:00 is the moment the sun is highest in the sky. Clock time follows time zones and daylight saving, so solar noon often falls between about 12:30 and 1:30 pm on the clock in summer, depending on where you are within your time zone.
How accurate is this sun position calculator?
It uses the Cooper declination equation and standard spherical trigonometry, which is accurate to about one degree. That is good enough for shading studies, solar panel layout and photography. For astronomy or tracking hardware, use NOAA's solar calculator, which models the equation of time and refraction.
When is the sun highest in the sky?
The sun is highest at solar noon each day and reaches its highest noon of the year at the June solstice in the northern hemisphere. In New York on June 21 the noon sun reaches about 72.7°; on December 21 it reaches only about 25.9°.
How do I use the sun position to check shading?
Find the sun's elevation and azimuth for the worst case, usually around 9 am and 3 pm solar time in December. Any tree or building taller than that angle when viewed from that compass direction will shade your panels at that time.
Is a solar angle calculator the same as a sun position calculator?
Yes, in practice. Both give the sun's angles in the sky: elevation (altitude above the horizon), azimuth (compass direction) and zenith angle (90° minus elevation). This page returns all three for any latitude, date and solar time. If you want the tilt to set a fixed solar panel at, use the solar panel angle calculator instead.
5 Sources
Last updated October 25, 2026. Part of our renewable energy toolkit. Found an error? Tell us.