Sun Position Calculator
Where exactly is the sun right now? This tool computes the sun\u2019s azimuth (compass direction) and elevation (angle above the horizon) for any location and any moment — past, present, or future. With a compass rose, a sky dome showing today\u2019s arc, photography phase classification (golden hour, blue hour, harsh midday), and the subsolar point on a world map.
Sun position vs sunrise / sunset — different questions
A sunrise / sunset calculator answers "what time does the sun rise and set today?". A sun position calculator answers "where in the sky is the sun right now (or at some other specific moment)?" — its compass direction (azimuth) and angle above the horizon (elevation). The two questions complement each other: sunrise/sunset is a scheduling tool; sun position is a geometric / directional tool.
Both are computed from the same underlying solar-position algorithm. SimpleMapLab implements the math via the open-source SunCalc library, originally written by Vladimir Agafonkin and based on Jean Meeus\u2019s astronomical algorithms. Across all latitudes from 80° N to 80° S the library matches NOAA\u2019s Solar Position Algorithm reference within roughly 0.01°.
For full sunrise / sunset windows including civil, nautical, and astronomical twilight plus a year-graph view, see the sister tool — Sunrise & Sunset Calculator.
How to find the sun\u2019s position
Six steps from blank input to a full directional + temporal sun read-out.
- Pick a location. Search for a city, address, or landmark; tap "Use My Location" to use device GPS; or click anywhere on the world map. The marker pin updates instantly and the location’s IANA time zone is resolved automatically via geo-tz.
- Pick a moment in time. Leave the "Live" toggle on for the sun’s current position (auto-refreshing every 30 seconds), or set a custom date and time. The time slider lets you drag through any 24-hour day to watch the sun arc across the sky.
- Read the headline numbers. Solar azimuth is the sun’s compass direction (0° = north, 90° = east, 180° = south, 270° = west). Solar elevation is the angle above the horizon (0° = horizon, 90° = directly overhead). The photo phase tags the moment as Night, Twilight, Blue Hour, Golden Hour, Day, or Harsh Midday based on elevation thresholds.
- Inspect the compass rose. The compass rose plots the sun on a circular dial with cardinal labels. The yellow disc is the sun, the dashed grey line points in the shadow direction (180° opposite), and the faint orange dots trace today’s full sun path through the rose. When the sun is below the horizon the disc is greyed and labelled.
- Inspect the sky dome. The sky dome shows today’s sun arc as a curve on a half-sphere — east on the left, west on the right, zenith at the top. The orange dot is the sun’s current position; sunrise and sunset times appear at the horizon edges; solar noon is annotated at the peak of the arc.
- Read the solar events. Below the visualisations, a table lists every transition for that day: sunrise, solar noon, sunset, civil-twilight windows on either side, both golden-hour windows (AM and PM), and total day length — all in the location’s local time zone.
What people use a sun position calculator for
Seven recurring patterns we see — each one needs more than just a time. They need the sun\u2019s direction.
Photography — golden hour planning with a directional twist
Photographers chasing golden hour need more than the start time — they need to know which way the sun will be coming from. The compass rose answers exactly that: at 18:42 in Sydney on June 21, the sun is sitting at azimuth 297° (WNW) at 4° elevation. Combine that with a satellite map of the shoot location and you can predict whether the light will rim-light your subject, side-light a building, or back-light a forest. PhotoPills charges for the same answer; this tool is free.
Solar panel orientation and tilt optimisation
Fixed-tilt PV panels in the northern hemisphere are typically aimed roughly south, with a tilt angle close to local latitude. The exact azimuth-of-noon and noon altitude across the year tell you whether to bias east (morning load) or west (afternoon peak load), and how much winter tilt boost you need. The sun position tool lets you sweep through the year date-by-date and read the noon azimuth + altitude directly. For commercial-scale tracking arrays, the live sun position is the input that drives the tracker control loop.
Architectural shadow analysis and daylighting design
Architects model shadow patterns to assess overshadowing of neighbouring properties (a planning-permission requirement in many jurisdictions), to size sun-shading and overhangs, and to optimise window placement for daylighting without glare or overheating. The sun azimuth + elevation at the worst-case dates (typically winter solstice noon for shadow length and summer solstice for solar gain) feeds directly into the shadow geometry: shadow length = building height ÷ tan(elevation), shadow direction = azimuth + 180°.
Sundial design and gnomon angle calculation
Sundials are millennia-old physical sun-position calculators. Designing one requires the gnomon (the shadow-casting blade) to be tilted at an angle equal to the local latitude and aligned to true geographic north — not magnetic north. The sun’s azimuth at each hour, projected onto the dial face, gives the hour-line geometry. Use this tool to verify the dial reading for your latitude and any specific date — useful both for makers and for archaeoastronomers reading ancient dials.
Cinematography — matching sun positions across shooting days
On a multi-day film shoot, continuity demands that consecutive scenes set "at the same time of day" actually look like the same time of day. If today’s wide shot was taken at 14:30 with the sun at 41° elevation and 235° azimuth, tomorrow’s reverse-angle close-up needs the sun within ~2° of that position to cut cleanly. The tool lets the DP plan the exact wall-clock time for matching frames the next day, accounting for the few-minutes-per-day drift in the sun’s annual cycle.
Gardening — sun-exposure mapping for plant placement
Vegetable beds, fruit trees, and ornamental plants have different sun requirements. Tomatoes want 6+ hours of direct sun; ferns want shade. By logging the sun azimuth at each hour over the day at your garden location, you can predict when each square metre is in sun vs shadow given the surrounding buildings and trees, and place plants accordingly. The tool’s 96-sample daily path is exactly the data you need for that mapping.
Aviation and maritime celestial navigation cross-check
Pilots and sailors using sextants for celestial fixes compute the expected sun azimuth and altitude at their dead-reckoning position and time, then compare to the measured sextant reading to derive a line of position. The tool gives the expected azimuth/altitude as a sanity check against the more precise NOAA SPA or Almanac calculation. For VFR pilots, the sun’s azimuth at landing time tells you which runway approach will face into the sun (visibility hazard) — a useful planning input even if not formally required.
The math behind the result
Computing the sun\u2019s position at an arbitrary location and time is a classic problem of astronomical mechanics. The full pipeline involves four stages.
Stage 1 — Time and date to Julian Day
Convert UTC time to a Julian Day number (a continuous count of days since 4713 BC). This single scalar is the input to every subsequent astronomical calculation and avoids calendar-edge bugs (leap years, century rules).
Stage 2 — Sun\u2019s ecliptic position
From the Julian Day, compute the sun\u2019s mean longitude, mean anomaly, equation of centre (correction for elliptical orbit), and ecliptic longitude. Add the obliquity of the ecliptic (~23.44°, varying slowly via nutation).
Stage 3 — Equatorial coordinates
Project ecliptic longitude onto the celestial equator to get the sun\u2019s right ascension (RA) and declination (δ). Combined with the local sidereal time (which depends on UTC + the observer\u2019s longitude), compute the local hour angle (H) of the sun.
Stage 4 — Horizontal coordinates
Convert (RA, δ, H) plus the observer\u2019s latitude φ into horizontal coordinates: azimuth (A) and elevation (a). The standard formulas are:
sin(a) = sin(φ) · sin(δ) + cos(φ) · cos(δ) · cos(H)tan(A) = -sin(H) / (cos(φ) · tan(δ) - sin(φ) · cos(H))
SunCalc\u2019s azimuth is measured from south (the meridian convention common in astronomy); we convert to the compass convention (0° = north, +east) by adding 180° and normalising to [0°, 360°).
Subsolar point
The subsolar point — the latitude / longitude on Earth where the sun is directly overhead — is computed from solar declination (latitude) and the equation of time (longitude offset from the sub-Greenwich meridian at solar noon). Solar declination follows a sinusoidal annual cycle with amplitude ±23.44°; the equation of time has a more complex shape from the combination of axial tilt and orbital eccentricity, ranging up to ±16 minutes.
Photography light phases — defined by elevation
We classify the sun\u2019s "photo phase" by its elevation angle, not by clock-time-relative- to-sunrise. This works at any latitude — including extreme ones where the standard "30 min after sunrise" rule of thumb breaks down. The seven phases:
| Phase | Elevation | Description | Common uses |
|---|---|---|---|
| Astronomical Night | below -18° | Fully dark sky; Milky Way visible. | Deep-sky astrophotography, low-light astronomy. |
| Astronomical Twilight | -18° to -12° | Dark sky, faint stars, residual sky glow. | Astrophotography prep, dark-sky measurements. |
| Nautical Twilight | -12° to -6° | Horizon visible, brightest stars out. | Marine sextant fixes, late blue hour. |
| Civil Twilight & Blue Hour | -6° to 0° | Deep blue overhead, bright enough to read. | Cityscape photography, "balanced light" shots. |
| Golden Hour | 0° to 6° | Warm, soft, directional light. | Portraits, landscapes, weddings. |
| Daytime | 6° to 60° | Standard daylight; harder shadows as sun rises. | General outdoor photography, work. |
| Harsh Midday | above 60° | Sun nearly overhead, shortest shadows, harshest light. | Mapping, aerial photography. |
Golden-hour duration depends on latitude. At the equator the sun rises and sets nearly perpendicular to the horizon, so it sweeps through 0–6° in roughly 24 minutes. In mid- latitudes (London, NYC) it lingers in golden hour for 30–60 minutes either side of sunrise / sunset. Near the polar circles in summer the sun can sit between 0° and 6° elevation for many hours, producing extended low-angle warm-light windows that landscape photographers plan entire trips around.
SimpleMapLab vs other sun position tools
Honest comparison against the alternatives. Each wins different scenarios.
| Feature | SimpleMapLab | PhotoPills (paid app) | SunCalc.org | Sun Surveyor (paid) | SunEarthTools.com |
|---|---|---|---|---|---|
| Free, no sign-up | ✓ | ✓ (paid app) | ✓ | ✓ (paid app) | Limited |
| Solar azimuth + elevation | ✓ | ✓ | ✓ | ✓ | ✓ |
| Compass rose visualisation | ✓ | ✓ | ✗ | ✓ | ✗ |
| Sky dome / sun arc visualisation | ✓ | ✓ | ✗ | ✓ | ✗ |
| Photo phase classification (golden / blue) | ✓ | ✓ | Limited | ✓ | ✗ |
| Subsolar point on world map | ✓ | ✗ | ✗ | ✗ | ✗ |
| Time slider — drag through 24 h | ✓ | ✓ (paid) | ✗ | ✓ (paid) | ✗ |
| Live auto-update | ✓ | ✓ | ✗ | ✓ | ✓ |
| No watermark, no ads, no API key | ✓ | Paid tier | Some ads | Paid tier | — |
| Mobile-first design | ✓ | ✓ | Partial | ✓ | Partial |
PhotoPills (paid mobile, ~$10) and Sun Surveyor (paid Android, ~$10) excel at in-field augmented-reality overlays during a shoot. SunCalc.org is the closest free sibling — built by the author of the underlying library — without the compass rose, sky dome, or subsolar point. SunEarthTools.com is exhaustive but ad-heavy and slow on mobile. SimpleMapLab targets the "browser-first, decision in 5 seconds" sweet spot.
Related tools and resources
For sunrise / sunset / twilight times across the day and year, see the sister Sunrise & Sunset Calculator. For elevation above sea level, which affects the geometric horizon at high altitude, see Elevation Finder. To resolve the time zone of any location (the same internal lookup this tool uses), see Time Zone Finder. For precise coordinates of any location, see Latitude & Longitude Finder. For directional bearings between two points, see Bearing & Compass Calculator. For a fun geographic counterpart, find the exact opposite point on Earth with the Antipode Finder.
Frequently asked questions
Solar-position math: SunCalc (Vladimir Agafonkin, BSD-2-Clause) implementing Jean Meeus\u2019s astronomical algorithms. Reference standard: NOAA / NREL Solar Position Algorithm. Subsolar point: solar declination + equation of time approximation. Time zones: geo-tz npm package (offline IANA timezone polygon database). Map basemap: OpenFreeMap Liberty vector tiles, free and unlimited. Geocoding for the location search: Photon (typo-tolerant) and Nominatim (OpenStreetMap). All calculations run client-side in your browser; no data leaves your device.
More SimpleMapLab tools
Sunrise, sunset, twilight, golden hour, and day length for any location worldwide.
Find altitude above sea level for any point on Earth. 30m Copernicus DEM.
Find the IANA time zone of any location with current local time and DST status.
Initial, final, rhumb-line, and magnetic bearings between any two points.