TheCalculatorsHub

Sun Angle Calculator

The sun angle calculator computes solar elevation (altitude above the horizon), azimuth (compass bearing), declination, hour angle, solar noon, air mass, and shadow length for any latitude, longitude, date, and time. It uses the standard NOAA solar position algorithm: declination from the day of year, equation of time for clock-to-solar-time conversion, and the spherical trigonometry equations relating elevation to declination, latitude, and hour angle. Additional outputs include sunrise and sunset times, day length, optimal solar panel tilt by season, and golden hour windows for photography. The hour-by-hour table shows all positions across the full day.

Loading Sun Angle Calculator...

How It Works

Our engine processes your inputs using verified datasets and logic models to provide real-time results.

Verified Algorithm

Efficiency Tips

Ensure data accuracy for the most reliable interpretation.

Compare results across different scenarios to find the optimal path.

Did you know?

Using standardized tools reduces manual error by up to 95% in complex calculations.

Related Expert Tools

More precision tools in the same niche.

View All

Sunrise Sunset Calculator

The sunrise and sunset calculator computes the precise times of sunrise, sunset, solar noon, civil twilight, nautical twilight, astronomical twilight, golden hour, and blue hour for any latitude, longitude, and date. It uses the NOAA solar position algorithm with the standard 0.833-degree atmospheric refraction correction that shifts sunrise earlier and sunset later by 2 to 5 minutes compared to the geometric horizon. All six twilight periods (morning and evening for each type) are computed by solving for the hour angle at which the sun crosses each depression angle. Day length, azimuth at sunrise and sunset with compass direction, the equation of time correction, and a day-length trend compared to the previous day are included. A practical use-cases panel translates solar times into Islamic prayer windows, hunting and fishing legal light, Jewish Shabbat candle-lighting, and photographer golden-hour windows. An annual calendar table shows weekly sunrise, sunset, and azimuth data for the full year.

Open Calculator

Smartphone Projector Calculator

A DIY smartphone projector uses a single convex lens to form a real, inverted image of the phone screen on a wall or screen. The thin lens equation (1/f = 1/do + 1/di) links the focal length of the lens, the phone-to-lens distance, and the throw distance. Magnification equals the ratio of those two distances, and the projected image diagonal equals the phone screen diagonal multiplied by the magnification. This calculator solves for any unknown, outputs exact box dimensions for the build, and rates projected brightness based on magnification.

Open Calculator

Immersed Weight Calculator

An object submerged in fluid experiences a buoyant force equal to the weight of fluid it displaces, reducing its apparent weight by exactly that amount. The two-weight method -- weighing an object in air and again fully submerged -- lets you calculate its density without measuring its volume directly, a technique Archimedes used to test the king's crown. For body composition, hydrostatic weighing uses this principle with temperature-corrected water density and residual lung volume to derive body density and body fat percentage via the Siri or Brozek equations.

Open Calculator

Sun Angle Calculator Logic

δ=23.45°×cos(360/365×(doy+10))H=15°×(LST12)sin(α)=sin(δ)sin(φ)+cos(δ)cos(φ)cos(H)AM=1/(cos(z)+0.50572×(96.08z)1.6364)L=h/tan(α)δ = −23.45° × cos(360/365 × (doy+10)) | H = 15° × (LST−12) | sin(α) = sin(δ)sin(φ) + cos(δ)cos(φ)cos(H) | AM = 1/(cos(z) + 0.50572×(96.08−z)^−1.6364) | L = h/tan(α)
Disclaimer: Results are estimates only. Always verify important calculations with a qualified professional before making decisions. Learn about our methodology.

What Is the Sun Angle Calculator?

The sun angle calculator computes the solar elevation angle (altitude) and solar azimuth for any location on Earth at any time of day and year. Solar elevation is the angle of the sun above the horizon, from 0° at sunrise/sunset to up to 90° at solar noon directly overhead. Solar azimuth is the compass direction of the sun, measured clockwise from north. These two angles fully specify where the sun is in the sky at a given moment. The sun angle depends on the observer's latitude, the time of day (expressed as the hour angle from solar noon), and the time of year (expressed through the solar declination angle, which ranges from +23.45° at summer solstice to -23.45° at winter solstice). This calculator is useful for solar panel placement, passive solar building design, photography planning (golden hour angle), and shadow length calculation. For complementary solar timing information, see the sunrise and sunset calculator; for other everyday physics tools, the Earth curvature calculator demonstrates similar spherical geometry.

How the Sun Moves Across the Sky

The sun appears to arc across the sky each day because Earth rotates on its axis once every 24 hours. At the same time, Earth orbits the sun once per year along a slightly elliptical path, and its axis is tilted 23.45 degrees relative to the orbital plane. These two motions combine to produce the seasonal variation in sun angle that every location on Earth experiences. In summer at mid-latitudes, the sun rises high and stays in the sky for many hours; in winter it barely clears the horizon and sets early. This Sun Angle Calculator uses the same NOAA solar position algorithm that meteorologists, architects, and solar engineers rely on, and applies it to everyday questions: how long is your shadow right now, when is golden hour, and at what angle should you tilt your solar panels? For applications involving Earth's geometry at a larger scale, our Flat vs Round Earth Calculator explores how horizon distance and line-of-sight change with observer height.

Solar Elevation and Azimuth: The Two Core Angles

Two angles define the sun's position in the sky at any moment. The first is solar elevation (also called solar altitude), the angle between the sun and the horizon measured upward from 0 degrees at the horizon to 90 degrees directly overhead. When elevation is positive the sun is above the horizon and daylight exists; when it is negative the sun is below the horizon and it is night or twilight. The second angle is solar azimuth, the compass bearing of the sun measured clockwise from due north: north is 0 degrees, east 90 degrees, south 180 degrees, and west 270 degrees. In the northern hemisphere the sun transits the south at solar noon; in the southern hemisphere it transits the north. At the equinoxes everywhere on Earth, the sun rises almost exactly due east (90 degrees) and sets almost exactly due west (270 degrees). These two numbers together fully specify where to look to find the sun and, crucially, in which direction shadows will fall -- always directly opposite the azimuth. The elevation and azimuth are calculated from three inputs: your latitude, the solar declination for the date, and the hour angle for the time of day, using the spherical trigonometry equations embedded in this calculator.

Solar Declination and the Seasons

Solar declination is the latitude at which the sun sits directly overhead at solar noon on a given day. It swings between +23.45 degrees at the northern summer solstice (around June 21, the sun overhead at the Tropic of Cancer) and -23.45 degrees at the southern summer solstice (around December 21, the sun overhead at the Tropic of Capricorn). At the equinoxes (around March 20 and September 22) the declination passes through 0 degrees and the sun is overhead at the equator. The calculator uses the approximation: delta = -23.45 times cosine of (360 divided by 365, multiplied by day-of-year plus 10 degrees). This formula is accurate to within 0.5 degrees for most practical purposes. The declination determines both the peak elevation on any given day and how many hours of daylight your latitude receives -- high declination matching your hemisphere means the sun rises earlier, sets later, and climbs higher. Our Projectile Motion Calculator demonstrates how the same trigonometric decomposition into vertical and horizontal components applies to ballistic flight paths, a method that mirrors the angle-based decomposition used in solar position equations.

The Equation of Time: Why Solar Noon Is Not at 12:00

Solar noon is the moment when the sun crosses your local meridian and reaches its highest point. On a sundial, this is always 12:00. On a clock, it can range from about 11:44 AM to 12:30 PM or later throughout the year. There are two reasons. The first is the longitude offset: time zones cover 15-degree bands of longitude, but your exact location within that band may be several degrees east or west of the zone's central meridian. Every degree of longitude east of your zone's meridian advances solar noon by 4 minutes; every degree west delays it. The second reason is the equation of time, a correction of up to plus or minus 16 minutes caused by Earth's elliptical orbit (Earth moves slightly faster when closer to the sun in December-January, which speeds up the sun's apparent motion) and by the tilt of Earth's axis relative to its orbital plane. These two effects combine into a seasonal wave. The calculator shows the equation of time correction for any date so you can see exactly why solar noon falls when it does at your location.

Air Mass and Its Effect on Sunlight

Air mass is a dimensionless number describing how much of Earth's atmosphere a beam of sunlight must traverse to reach the ground, relative to when the sun is directly overhead. When the sun is at the zenith (elevation 90 degrees), light travels through the minimum possible atmosphere and air mass equals 1.0. As the sun lowers, the beam travels a longer diagonal path through the atmosphere: at 30 degrees elevation (zenith angle 60 degrees) the air mass is 2.0; at 10 degrees elevation it rises to about 5.6; near the horizon it can exceed 30. Each unit of extra air mass means more scattering of blue light (producing the warm orange tones of sunrise and sunset), more absorption of UV radiation (the UV index drops sharply when the sun is low), and lower solar irradiance reaching a photovoltaic panel. The standard solar panel test condition of 1000 W/m2 is defined at air mass 1.5, corresponding to a solar elevation of about 42 degrees. This calculator uses the Kasten-Young formula, which is more accurate near the horizon than the simple 1/cosine approximation. When air mass exceeds 5 or 6 (elevation below about 10 degrees), little useful UV or direct solar energy reaches the ground regardless of sky clarity.

Shadow Length and Direction

Shadow length is directly determined by the sun's elevation angle. The formula is L = h divided by tangent of alpha, where L is shadow length, h is the object height, and alpha is the solar elevation angle. At 45 degrees elevation, shadow length equals object height exactly (tangent of 45 degrees is 1). At 30 degrees, a 2-metre person casts a 2 divided by 0.577 = 3.46 metre shadow. At 10 degrees elevation the shadow stretches to 11.3 metres. This relationship has practical uses beyond curiosity: solar panel installers use it to calculate the minimum row spacing needed to prevent one panel row from shading the row behind it during winter when the sun is lowest. Building designers use it to model when a proposed structure will cast shadow on neighbouring properties. A well-known UV safety rule -- if your shadow is shorter than your height, UV radiation is strong enough to cause sunburn and sunscreen is needed -- corresponds to the sun being above 45 degrees elevation. The shadow direction is always exactly opposite the sun's azimuth: if the sun is at azimuth 220 degrees (south-southwest), shadows point northeast at azimuth 40 degrees.

Accuracy and Limitations of the Sun Angle Calculator

This calculator uses the NOAA Solar Position Algorithm equations, which compute solar declination, the equation of time, and local hour angle to produce solar elevation and azimuth accurate to within 0.01° for dates between 1950 and 2050. The primary source of uncertainty in practical use is the accuracy of the observer's latitude and longitude inputs, and whether true solar time or local clock time (with time zone and daylight saving offset) is correctly entered. The NOAA solar calculator uses the same algorithm and can be used to cross-check results for any location and time.

The main limitation is that atmospheric refraction near the horizon is not fully accounted for. As the sun approaches the horizon, atmospheric refraction can lift the apparent solar disc by up to 0.5° above the geometric position, which is why the sun appears above the horizon for a few minutes after it has geometrically set. For elevation angles above 5°, refraction effects are negligible; for angles below 5°, results may differ from observed values by up to 0.5°.

Most Common Mistake Using the Sun Angle Calculator

The most common mistake is entering local standard time without accounting for daylight saving time or for the difference between the time zone meridian and the actual longitude. Solar noon occurs when the sun crosses the observer's meridian, which only coincides with 12:00 clock time if the observer is exactly on the time zone's central meridian and daylight saving time is not in effect. In London at BST (UTC+1) in summer, solar noon occurs around 13:04 local time. In New York at EST (UTC-5) in winter, solar noon is around 11:54 local time. Entering 12:00 noon as solar noon will give the elevation angle for a moment that is not true solar noon. The Time and Date solar position tool automatically adjusts for local time zone and DST and can be used to verify the solar noon time for any location before entering it as an input.

Frequently Asked Questions

Founder's Real-World Experience
Muhammad Shahbaz Siddiqui

Muhammad Shahbaz Siddiqui

Founder, TheCalculatorsHub

How a solar panel installer used the Sun Angle Calculator to fix a shading dispute and recover 18% annual output loss on a residential roof in 2025

In April 2025, I was a self-employed solar panel installer in the East Midlands working on a retrofit for a semi-detached house. The homeowners had complained that their 12-panel system, installed by another company two years earlier, was underperforming by about 18% compared to the initial quote. The original installer claimed the performance gap was due to weather, but the homeowners had a south-facing roof at 30 degrees pitch and believed shading from a neighbouring oak tree was the real cause. I needed to quantify how many hours per day that tree was casting shadow onto the lower panel row, and on which dates this was worst.

I loaded the Sun Angle Calculator and entered the property coordinates, then set the date to December 21 -- the winter solstice, when the sun arc is lowest and shading risk is highest at UK latitudes (52.4 degrees N). At solar noon on December 21, the calculator returned a solar elevation of 14.2 degrees and a shadow length of 19.7 metres for a 5-metre object. The oak tree in question was approximately 9 metres tall and located 11 metres from the panel row. At 14.2 degrees elevation a 9-metre tree casts a shadow of 9 / tan(14.2 degrees) = 35.5 metres -- more than enough to shade the lower panel row at solar noon in December. I then used the hour-by-hour table to identify the window during which the sun's azimuth pointed directly toward the tree from the panel array: between 10:00 and 14:30 on the winter solstice, or roughly 4.5 hours centred on solar noon.

I exported the hourly shadow direction data and overlaid it on a site plan to show the homeowners exactly which panels were affected and at what times. The analysis confirmed that 3 of the 12 panels experienced 4+ hours of partial shading daily from November through January, consistent with an 18% annual output reduction in a microinverter-free string system (where one shaded panel throttles the entire string). I recommended trimming the tree canopy by 3 metres and installing a microinverter per panel to decouple string performance. The homeowners used the solar noon data from the calculator to schedule a tree surgeon visit during the brief December solar window to verify the trim height. After trimming and microinverter retrofit, measured output recovered to within 4% of the original quoted figure.

Winter solstice solar elevation of 14.2° confirmed 9-metre oak tree casts 35.5-metre shadow -- easily reaching the lower panel row 11 metres awayHour-by-hour azimuth table identified 4.5-hour daily shading window from Nov--Jan responsible for the 18% annual output deficitShadow length and direction data presented to homeowners and tree surgeon; post-trim measured output recovered to within 4% of quoted figure