Sun Position Calculator (Solar Azimuth & Altitude)
Calculate the Sun's exact position in the sky (elevation angle and azimuth bearing) for any coordinate, date, and time. Features live shadow ratio calculations and solar noon tracking.
Sun Azimuth: 241.8° (WSW) · Elevation: 13.6°
Austin, TX · Solar Zenith: 76.4° · Subsolar Point: -16.20°, -160.85°
13.6°
Above local horizon (Daylight)
61.8° ENE
Direction cast by vertical gnomon
-16.20°, -160.85°
Location with sun directly overhead
Click anywhere to calculate real-time sun angle for that coordinate.Jean Meeus Astronomical Solar Geometry
How to use the sun position calculator
- 1Pick a place, date and time
Search a location and set the date and time you care about.
- 2Compute the Sun's position
Solar azimuth and elevation are calculated with standard astronomical algorithms (Meeus).
- 3Read angles and shadows
See the Sun's azimuth and elevation, the shadow length ratio and the time of solar noon.
Where is the sun right now? Altitude and azimuth explained
Determining the precise position of the Sun from any vantage point on Earth requires two independent spherical coordinate angles measured relative to the observer's local horizon:
- Solar Altitude (Elevation Angle, α): The vertical angle between the center of the solar disk and the observer's local horizontal plane. An altitude of 0° marks geometric sunrise or sunset; 90° represents the absolute celestial zenith directly overhead; and negative values indicate the Sun is positioned beneath the horizon during night.
- Solar Zenith Angle (θ_z): The complement of solar altitude (θ_z = 90° - α), representing the angular distance between the Sun and the vertical zenith vector.
- Solar Azimuth Angle (A): The horizontal compass bearing of the Sun along the horizon, measured in degrees clockwise from True North (000°). Due East is 090°, due South is 180°, and due West is 270°.
Accurate knowledge of these two angles is essential across multiple technical fields: civil engineering (building orientation and passive solar heating), agriculture (crop canopy radiation), photovoltaic energy (optimizing solar panel tilt and dual-axis tracking), and cinema/photography (golden hour planning).
Why solar noon isn’t at 12:00 (equation of time)
A common assumption is that the Sun is always due south at 12:00 PM on clock time. In reality, mechanical clocks measure mean solar time, whereas actual sundials measure apparent solar time. The discrepancy between the two is known as the Equation of Time (EoT):
The Equation of Time oscillates between -14.2 minutes (in mid-February) and +16.4 minutes (in early November) due to two combined astronomical mechanics:
Orbital Eccentricity (Kepler's 2nd Law)
Earth's orbit is elliptical (e = 0.0167). When closest to the Sun at perihelion (early January), Earth travels fastest in its orbit, causing the apparent solar day to stretch longer than 24 hours. At aphelion (July), Earth travels slowest.
Axial Obliquity (23.44° Tilt)
The Sun moves along the tilted ecliptic rather than the celestial equator. When projected onto the equator, the Sun's eastward apparent motion varies throughout the year, being fastest at the solstices and slowest at the equinoxes.
If you photograph the Sun from the exact same location at the exact same clock minute every few days for a full year, the Sun traces a graceful figure-8 curve across the sky known as the analemma.
How the sun position calculator works
Search for a place or click anywhere on the map, and the calculator returns the sun's current altitude and azimuth for that coordinate. Under the hood it uses the Jean Meeus / NOAA solar position equations, the first of the two standard approaches below, which are accurate to about a hundredth of a degree for everyday use:
- Jean Meeus “Astronomical Algorithms” (1991): The classic computational framework used by astronomers. It models Earth's mean anomaly, the center equation, ecliptic coordinates, and nutation using Fourier series expansions, achieving an angular accuracy of roughly 0.01 degrees.
- NREL Solar Position Algorithm (SPA, not used here): Developed by Ibrahim Reda and Afshin Andreas at the National Renewable Energy Laboratory (NREL) in 2004. Based on the VSOP87 planetary theory, SPA computes solar coordinates with an unprecedented uncertainty of ±0.0003 degrees across the years -2000 to +6000, factoring in topocentric parallax, nutation, aberration, and Earth-Moon barycenter motion.
Sun altitude formula, step by step
Given observer latitude φ, solar declination δ, and the local solar hour angle H, solar altitude α and azimuth A are calculated via spherical trigonometry:
\sin\alpha = \sin\phi \sin\delta + \cos\phi \cos\delta \cos H, \quad \cos A = \frac{\sin\delta - \sin\phi \sin\alpha}{\cos\phi \cos\alpha}- sin(α) = sin(39.7392°) * sin(23.4358°) + cos(39.7392°) * cos(23.4358°) * 1.0
- sin(α) = (0.6393 * 0.3977) + (0.7690 * 0.9175) = 0.2542 + 0.7056 = 0.9598
- Altitude α = arcsin(0.9598) = 73.70° above the southern horizon
- Alternative noon shortcut: α_noon = 90° - |φ - δ| = 90° - |39.7392° - 23.4358°| = 73.70°
- Azimuth at noon in Northern Hemisphere: A = 180.0° (Due South)
At midday on June 21 in Denver, the Sun climbs to 73.7° above the southern horizon, casting shadows that are only 29% as long as the vertical objects casting them.
Midday sun angle in major cities
Reference this benchmark table documenting peak solar elevations across representative global latitudes at the solstices and equinoxes:
Global Midday Solar Altitude Benchmarks Across Cardinal Astronomical Dates
Calculated at local astronomical solar noon without atmospheric refraction correction.
| Metropolitan Center | Latitude | Equinox Noon Altitude | June Solstice Altitude | Dec Solstice Altitude | Annual Altitude Range |
|---|---|---|---|---|---|
| Singapore (Equatorial) | 01°17' N (1.29° N) | 88.7° (nearly vertical) | 65.3° (North) | 65.3° (South) | 23.4° shift north and south |
| Miami, Florida (Subtropical) | 25°46' N (25.77° N) | 64.2° (South) | 87.7° (near zenith) | 40.8° (South) | 46.9° annual swing |
| Denver, Colorado (Mid-Latitude) | 39°44' N (39.74° N) | 50.3° (South) | 73.7° (South) | 26.8° (South) | 46.9° annual swing |
| London, England (Maritime) | 51°30' N (51.50° N) | 38.5° (South) | 61.9° (South) | 15.1° (South) | 46.9° annual swing |
| Oslo, Norway (Subpolar) | 59°55' N (59.91° N) | 30.1° (South) | 53.5° (South) | 6.7° (South) | 46.9° annual swing |
| Sydney, Australia (Southern Mid) | 33°52' S (-33.87° S) | 56.1° (North) | 79.6° (Dec Solstice) | 32.7° (Jun Solstice) | 46.9° annual swing |
How accurate is the sun position near the horizon?
When applying solar calculations to real-world sensors, telescopes, and solar energy installations, two physical corrections must be accounted for:
- Atmospheric Refraction: When the Sun is near the horizon (α ≤ 10°), terrestrial refraction bends incoming rays downward, making the Sun appear higher than its geometric position. Exactly on the horizon, refraction lifts the solar disk by approximately 34 arcminutes (0.57°)—more than the entire diameter of the Sun itself. At temperatures below -20°C, arctic refraction can exceed 1 degree.
- Topocentric Parallax: The Sun is located approximately 149.6 million kilometers away. Because the observer sits on Earth's surface rather than at the geocentric center of the planet, topocentric parallax introduces a minor angular shift of up to 8.79 arcseconds. High-precision algorithms (NREL SPA) correct for parallax, whereas simple educational formulas omit it.
- Solar azimuth angles output by this tool reference True Geodetic North; if orienting solar arrays with a magnetic compass, adjust for local magnetic declination.
- Standard solar panel tilt for fixed-tilt systems in the continental U.S. typically equals the site latitude (φ) facing due South (azimuth 180°), optimizing year-round kilowatt-hour generation.
Related Solar & Celestial Calculation Tools
Explore sunrise timing, day-night boundaries, and moon tracking:
Quick facts about the sun position calculator
| Fact | Value | Notes |
|---|---|---|
| Primary Metrics | Solar Elevation (Altitude) & Azimuth | Degrees above horizon & compass heading |
| Solar Noon Point | Maximum Daily Solar Altitude | Sun directly south (or north) at meridian |
| Use Cases | Solar Panels, Shading, Photography | Architectural and energy planning |
Edge cases and exceptions
Equation of Time Drift
Because Earth's orbit is elliptical and tilted, solar noon rarely matches 12:00 PM clock time, differing by up to ±16 minutes throughout the year.
The sun position calculator: worked examples
Rooftop Solar Panel Tilt Optimization
Scenario: Calculating peak solar altitude at noon in Phoenix, AZ in March.
Outcome: Elevation reaches 56.5° above horizon, determining optimal year-round panel tilt angle.
Frequently asked questions about the sun position calculator
What is solar azimuth?
Solar azimuth is the compass direction from which the sunlight comes, measured clockwise from North (0° = North, 90° = East, 180° = South, 270° = West).
What is the difference between azimuth and elevation of the Sun?
Azimuth is the compass bearing toward the Sun from north (0°) clockwise. Elevation, or altitude, is its angle above the horizon.
How do I calculate shadow length?
Shadow length = object height ÷ tan(solar elevation). A 2 m pole with the Sun at 45° casts a 2 m shadow.
What angle should I tilt solar panels?
A common rule is about equal to your latitude for year-round use, adjusted a bit lower in summer and higher in winter.
Where is the Sun directly overhead?
Only between the Tropic of Cancer and the Tropic of Capricorn, on certain dates. Elsewhere the Sun never reaches the zenith.
Which direction should a house face for sun?
In the Northern Hemisphere, south-facing windows get the most winter sun; in the Southern Hemisphere, north-facing.
Why is the Sun lower in winter?
Earth's axial tilt of 23.44° makes the Sun's noon height lower in winter and higher in summer.
What is the equation of time?
The difference between apparent solar time and mean clock time, up to about 16 minutes, caused by Earth's tilt and elliptical orbit.
How accurate are the results?
The calculation is accurate to a fraction of a degree, adequate for design and planning. Atmospheric refraction near the horizon adds uncertainty.
Is it useful for photographers?
Yes. Plan where the Sun will be for landscape shots, shadows and sunbeams at a location and time.
Keep exploring
What to do with this result
- Sunrise and Sunset Times CalculatorUse this to check sunrise and sunset times.
- Live World Day and Night Map (Solar Terminator)Use this to see the live day and night map.
- Moon Position Map & Sub-Lunar PointUse this to track the moon position.
- Moon Phase Calendar (30-Day Lunar Cycle)Use this to check moon phases by date.
- Horizon Distance Calculator — Distance to the HorizonUse this to calculate horizon distance.
- Bearing Calculator — Forward Azimuth & Compass HeadingUse this to calculate a compass bearing.