Sun Angle Calculator
Calculate the sun's angle by latitude, date, and time. Free solar altitude, zenith, and azimuth calculator with declination, shadow length, and panel tilt.
https://hexacalculator.com/calculators/physics/engineering/sun-angle-calculator
Physics
Engineering
Sun Angle Calculator
Calculate the sun's angle by latitude, date, and time. Free solar altitude, zenith, and azimuth calculator with declination, shadow length, and panel tilt.
Sun Angle Calculator
Location, date and time
Enter your latitude to find the sun's angle. Use a positive value north of the equator and a negative value south of it.
- Zenith angle
- deg (°)
- Solar declination
- deg (°)
- Day of the year
Explore the sun's path
Show the sun-path charts
Plot the sun's altitude through the day and its noon height across the year.
Show the hour-by-hour table
Altitude and azimuth at two-hour steps of solar time on this date.
The sun's angle is the only factor that determines where shadows fall, how much energy solar panels can generate and whether winter sun will shine through a window. In summer, the sun rises high in the sky; in winter it stays low. It also varies with latitude and time of day.
This calculator converts place, date and time into the position of the sun. It shows how high the sun is above the horizon (altitude), zenith angle and direction in the sky. Because it relies on solar time, you only need latitude and date; longitude, time zone and clock time are not needed.
What is the solar angle?
The solar angle usually refers to the sun's altitude or elevation angle. This is the angle between the horizon and the sun which varies from about 0 degrees at sunrise and sunset to a maximum value at noon when the sun is directly overhead, giving an altitude of 90 degrees. This only happens in tropical zones.
The zenith angle measures the angle from directly above us to the sun and is thus equal to 90 degrees minus the solar elevation. The azimuth is the direction of the sun on the horizon plane. It is measured clockwise starting at north: east is 90 degrees, south is 180 degrees, and west is 270 degrees.
Here's how to use this calculator.
You can choose whether you want to see the solar elevation that occurs at local noon (the time when the sun is highest in the sky), or the elevation for a particular solar time. Enter your latitude in degrees. Values north of the equator are positive, values south of the equator are negative. Select month and day.
In the specific time mode, solar time is given in hours. 24 represents noon of solar time, 13.5 stands for 2 p.m., and 1:30 indicates a specific afternoon hour. The calculation tool provides values for the elevation angle, zenith angle, azimuth, declination for that day, length of shadow cast by a vertical object, as well as an approximate value for tilt angle of solar panels.
Formula for calculating solar angle:
The altitude is determined by the latitude, declination of the sun for that day and the hour angle. The hour angle tells how far away from the meridian the sun is.
In this formula, alpha is the elevation angle, phi is the geographic latitude, delta is the declination of the sun and H is the hour angle. The hour angle is zero at local noon and changes by 15 degrees per hour before and after noon. This is because it takes Earth 24 hours to rotate 360 degrees.
Declination is the angle between the sun's rays and the equatorial plane. It depends only on the day of the year, and is denoted here by n. It varies seasonally between positive and negative 23.45 degrees.
The solar altitude at noon is found by subtracting the absolute value of the difference between latitude and declination from 90 degrees.
Example calculation:
For example, New York City is at latitude of 40 degrees north. During the summer solstice, the declination is +23.45 degrees, so the solar altitude angle at noon will be 73.45 degrees (calculated as 90 minus 16.55), almost directly overhead. At the spring or fall equinoxes, the declination is zero, so the solar altitude angle at noon will be 50 degrees. During the December winter solstice, the declination is -23.45 degrees, resulting in a solar altitude angle of only 26.55 degrees.
This explains why the sun is low in December and shadows are very long. When the altitude is 26.55 degrees, the length of the shadow cast by a vertical stick is twice its own height. This is because the length of the shadow equals the reciprocal of the tangent of the altitude angle. If the altitude at noon in summer is 73.45 degrees, then the same stick's shadow will be only one-third its own height.
Symbol | Meaning | Example |
|---|---|---|
phi | Latitude in degrees | 40 |
delta | Solar declination | +23.45 degrees (June solstice) |
H | Hour angle | 0 at solar noon |
alpha | Sun altitude | 73.45 degrees |
Determine the day of the year.
If you are used to using standard dates this calculator will convert the month and day into a day number. This important information helps when reading the annual calendar and determining what season it is.
Date | Day of year | What happens |
|---|---|---|
January 1 | 1 | Near the December solstice, low sun in the north |
March 20 | 80 | Spring equinox, declination near zero |
June 21 | 172 | Summer solstice, highest northern sun |
September 22 | 266 | Autumn equinox, declination near zero |
December 21 | 355 | Winter solstice, lowest northern sun |
The difference between solar time and clock time
This calculator uses local solar time. Noon is the moment when the sun crosses your meridian and reaches its highest position in the sky. There are three reasons why clock time and solar time differ: longitude within a time zone, the offset of the time zone itself, and the equation of time. The equation of time is an annual variation caused by the tilt of Earth's axis and elliptical orbit that can be as much as 16 minutes in either direction.
To calculate it, add four minutes to the solar time for each degree west of your time zone's prime meridian and subtract four minutes for each degree east. Then apply the average difference according to the date, and account for daylight saving time adjustments. When dealing with shadows, solar panels or planning sun exposure, the solar time is usually relevant.
Important applications of solar angles
Photovoltaic installers determine the tilt angle of solar panels and the spacing between rows based on this. If the tilt angle of fixed solar panels is approximately equal to latitude, then maximum energy will be produced per year. In winter, the sun is lower in the sky which also determines how much space needs to be between each row to avoid shading each other.
Architects design overhangs and windows to take advantage of seasonal changes in order to capture the low winter sun while blocking out the high summer sun. Gardeners use this angle to determine which flower beds will get enough light during the winter, while photographers track the low winter sun during golden hour to capture long warm shadows.
Season | Rule-of-thumb panel tilt | Why |
|---|---|---|
Year-round fixed | About your latitude | Best annual average |
Winter | Latitude plus about 15 degrees | Faces the low winter sun |
Summer | Latitude minus about 15 degrees | Faces the high summer sun |
Special cases that you should know about:
Between the Tropic of Cancer and the Tropic of Capricorn, it is possible for the Sun to be directly overhead at noon, giving an elevation angle of 90 degrees and almost no shadow. When the declination is greater than your latitude, the Sun will not be in the south at noon but instead in the north, giving an azimuth close to zero. In the polar regions there are midnight suns during summer when the Sun never sets for a whole day, and polar nights during winter when the Sun does not rise at all, so that the elevation angle can even become negative at noon.
This calculator uses a standard textbook model for declination. It does not take into account atmospheric effects, so it will not include the refraction of the atmosphere that causes the Sun to appear about half a degree higher near the horizon. Also, equation-of-time is not taken into account. For most data, accuracy is within fractions of a degree and thus suitable for planning and educational purposes but not for precise navigation.
Frequently asked questions
- What is the sun's altitude?
It indicates how high the sun is above the horizon and is measured in degrees. At sunrise and sunset, when the sun is on the horizon, it has a value of zero. It reaches its maximum at noon. Ninety degrees means that the sun is directly overhead, which only happens in the tropics.
- What are the differences between elevation angle, zenith angle and azimuth?
The elevation angle is the angle from the horizon line to the sun. The zenith angle is measured in the opposite direction and measures the distance of the sun from the point directly above the observer; it is found by subtracting the elevation angle from 90 degrees. Azimuth is the compass direction of the sun along the horizon, and is measured clockwise relative to north.
- How high is the sun at noon on the solstice?
The altitude at noon is obtained by subtracting the absolute value of the difference between latitude and solar declination from 90 degrees. At the June solstice, when the declination is +23.45 degrees, the sun will be about 73.5 degrees high in midday sky at a northern latitude of 40 degrees. At the December solstice, it will only reach about 26.5 degrees.
- What is the best angle for solar panels?
A common rule of thumb is that the tilt angle of fixed solar panels with respect to the horizontal plane should be approximately equal to the local geographic latitude for maximizing annual power generation. If winter is preferred then increase the tilt by about 15 degrees, and if summer is preferred then decrease it by about 15 degrees. This calculator shows both the sun's altitude as well as the tilt angle based on the geographic latitude.
- Why can the sun angle be negative?
A negative elevation indicates that the Sun is below the horizon; this occurs at night or just before sunrise and after sunset. In polar regions, even in midday during winter, the elevation can be negative; this is called polar night, meaning that the Sun does not rise at all.
- How to convert a time to solar time?
The true noon time when the sun is at its highest point almost never coincides with 12:00 on a regular clock. Please take into account the longitude within the timezone (four minutes per degree), daily difference between true and mean time (maximum about 16 minutes) and effects of daylight savings time. This tool uses true solar time directly, making these conversions unnecessary.
- Why is the sun sometimes in the north at noon?
If the Sun's declination is greater than the latitude, then it passes above the meridian and thus north of due south at noon. Thus, at true noon, it will be in the northern part of the sky, with an azimuth close to zero rather than 180 degrees. This happens frequently in tropical regions and during the entire summer in the Southern Hemisphere.
Related calculators






Disclaimer: This calculator is provided for general informational and educational purposes only. Our calculators are under active development, and results may be inaccurate, incomplete, or unsuitable for your situation. Always verify the figures independently and seek advice from a qualified professional before relying on them. We make no warranties and accept no liability for any loss or decision arising from use of this tool.
References
- NOAA Global Monitoring Laboratory: Solar Position Calculator
Reference implementation of solar altitude, azimuth, and zenith math.
- Sustainable By Design: SunAngle
Classic architecture tool for solar altitude and azimuth by date, time, and location.
- Wikipedia: Solar zenith angle and solar azimuth angle
Standard derivations of the altitude, zenith, and azimuth equations.