A sun position calculator answers two questions at once: how high the sun is above the horizon, and which compass direction it lies in. Those two angles — elevation and azimuth — fix the sun completely for an observer at a given place and instant, and almost everything practical about sunlight follows from them. Panel output, shadow length, glare through a window, the angle of light in a photograph, and the heat load on a wall are all determined by where the sun is, not by the time on the clock.
Arb Digital publishes free physics calculators that each own one job, and this page owns the sun's position at an arbitrary moment. The live sunrise and sunset calculator is the neighbouring tool, and it solves for fixed events: the times when the sun crosses the horizon, solar noon, day length, and the noon altitude. It does not give an elevation or an azimuth at ten past three. This page does exactly that for any time you enter, which is the case the events page cannot cover.
Never Look Directly At The Sun
This needs saying once, plainly, before anything else. The sun must never be viewed directly, and never through an unfiltered telescope, camera, binoculars, finder scope or any other optic. Doing so causes permanent retinal damage, and because the retina contains no pain receptors it happens without any sensation of pain to warn you. NASA's guidance on eclipse viewing safety states that looking at the bright sun through a camera lens, binoculars or a telescope without a special-purpose solar filter fitted over the front of the optics will instantly cause severe eye injury, and that eclipse glasses are not a substitute — the concentrated light burns straight through them. If you want to observe the sun, use a certified full-aperture solar filter, and get advice from an experienced astronomer before you do.
What This Sun Position Calculator Does
It converts a calendar date, a local clock time, a latitude, a longitude and a UTC offset into the sun's apparent position in the sky. The headline figure is the elevation angle: ninety degrees means directly overhead, zero means on the horizon, and a negative value means the sun is below the horizon and it is night or twilight. The azimuth is the compass bearing measured clockwise from true north, so ninety is due east, one hundred and eighty is due south, and two hundred and seventy is due west.
Along with those, it reports the solar declination for the date, the equation of time in minutes, the time of solar noon at your longitude, the shadow length a vertical object of the height you enter would cast, and the relative air mass the sunlight is passing through. Below the horizon it says so in words and suppresses the shadow and air mass figures rather than printing a meaningless number.
How to Use It
- Set the date and the local clock time. Use the time as a clock at the location would show it, not a converted UTC time.
- Enter the coordinates in decimal degrees. North and east are positive; south and west are negative. A location in Colorado has a longitude around minus one hundred and five.
- Set the UTC offset for that date. This is the single most common source of a wrong answer, because the offset changes when daylight saving starts and ends. An hour of error moves the sun by fifteen degrees of azimuth.
- Read the elevation and azimuth together. Neither alone locates the sun. The note under the results converts the azimuth into a compass point so the number is easier to picture.
- Use the solar noon time as a sanity check. If it is far from twelve o'clock, either your longitude is a long way from the centre of its time zone, or the offset is wrong.
The Algorithm And Its Accuracy
This page implements the solar position algorithm that NOAA publishes for its own solar calculator, which is derived from the low-precision method in Jean Meeus's Astronomical Algorithms. NOAA sets out the full sequence in its solar calculation details page. The steps run in this order.
The date and time convert to a Julian day, and from that to a Julian century T counted from J2000.0. The sun's geometric mean longitude and mean anomaly are polynomials in T. The equation of centre corrects the mean anomaly for the ellipticity of Earth's orbit, giving the true longitude, and a small nutation term gives the apparent longitude. The obliquity of the ecliptic is another polynomial in T, with its own small correction. Declination then follows from the apparent longitude and the obliquity, and the equation of time follows from the same quantities.
The equation of time converts clock time into true solar time, from which the hour angle is a direct step. Elevation and azimuth come from the standard spherical trigonometry linking declination, latitude and hour angle, and a final refraction correction accounts for the atmosphere bending light near the horizon.
On accuracy, NOAA states that its sunrise and sunset results are theoretically accurate to within about a minute for latitudes between roughly 72 degrees north and south, and within ten minutes outside that band, with observed values varying because atmospheric conditions change. The same limits apply here in spirit: the angles are good to a small fraction of a degree for ordinary latitudes and dates, and the refraction correction near the horizon is a standard-atmosphere approximation that real air will not match exactly. NOAA also notes that its own calculator is no longer actively maintained, so treat all of this as a well-established engineering-grade method rather than an ephemeris.
Why Solar Noon Is Almost Never At Twelve O'Clock
Two separate effects push the sun's highest moment away from midday on the clock, and they stack.
The first is longitude. A time zone is typically an hour wide, which is fifteen degrees of longitude, but its boundaries are political rather than astronomical. Every degree you sit east of your zone's central meridian moves solar noon four minutes earlier, and every degree west moves it four minutes later. At the western edge of a wide zone, solar noon can fall after half past twelve before daylight saving is even considered.
The second is the equation of time, which is the difference between apparent solar time and mean solar time. It arises because Earth's orbit is elliptical, so the planet moves faster near perihelion, and because the ecliptic is tilted with respect to the equator. Together these make a sundial run up to about sixteen minutes ahead of a clock in early November and about fourteen minutes behind in mid-February. The calculator reports the value for your date, and it is the reason the earliest sunset of the year does not fall on the shortest day.
Elevation, Air Mass And Why Shadows Grow So Fast
Shadow length is one over the tangent of the elevation, multiplied by the object's height, and that relation is far more nonlinear than intuition suggests. At sixty degrees elevation a person casts a shadow about six-tenths of their height. At thirty degrees it is one and three-quarter times their height. At ten degrees it is close to six times, and at two degrees it is nearly thirty. Almost all of a day's shadow variation happens in the last hour before sunset.
Air mass follows the same geometry and matters for anything involving sunlight intensity. It is the path length through the atmosphere relative to straight overhead, so it is one at the zenith, about two at thirty degrees elevation, and near thirty-eight at the horizon, where the Kasten-Young formula this page uses replaces the naive secant relation that would otherwise diverge. That rising path length is why the sun reddens and dims near the horizon, and why panel output falls off much faster in the evening than the elevation angle alone would suggest. The solar panel calculator handles the energy side once you know the geometry.
Reading The Azimuth Correctly
Azimuth here is measured clockwise from true north, which is the convention NOAA and most astronomy software use. Surveying and some navigation contexts occasionally measure from south instead, which puts every bearing one hundred and eighty degrees out. If a figure from another source disagrees with this page by exactly that amount, that is why.
True north is also not magnetic north. A compass points along the local magnetic field, and the difference between the two — magnetic declination — is more than fifteen degrees in parts of the world and changes slowly over the years. Setting out a panel array or a building study from a raw compass bearing without correcting for it will put the whole layout out by that angle. The angle converter is useful if your bearings are recorded in degrees, minutes and seconds.
Arb Digital builds free tools like this one because useful pages earn attention. If you want tools, calculators or content built for your own audience, we can help.
Browse All Free Tools Talk to Arb DigitalCommon Mistakes to Avoid
- Using the wrong UTC offset for the date — daylight saving changes it twice a year, and an hour of error is fifteen degrees of azimuth. This causes more wrong answers than everything else combined.
- Entering a western longitude as positive — east is positive here, so the Americas take negative values. A sign flip moves the sun to the other side of the sky.
- Reading a compass bearing as a true bearing — magnetic declination can exceed fifteen degrees, and it changes over time. Correct it before comparing with the azimuth here.
- Assuming solar noon is midday — longitude within the time zone and the equation of time together move it by half an hour or more, before daylight saving is added.
- Trusting the refraction correction at the horizon — it assumes a standard atmosphere. Real temperature and pressure profiles routinely shift the apparent horizon position, which is why sunrise timings vary from the prediction.
Related Free Tools From Arb Digital
For the fixed events rather than an arbitrary instant, use the sunrise and sunset calculator, which returns sunrise, sunset, solar noon and day length. The solar panel calculator turns irradiance and array size into energy. For the night sky, the moon phase calculator covers lunar illumination, the sidereal time calculator converts clock time to the star clock that telescope setting circles use, and the telescope field of view calculator covers how much sky an eyepiece shows. Growing-light work is handled by the daily light integral calculator, and bearings by the angle converter. Everything Arb Digital publishes is on the free online tools hub.
Frequently Asked Questions
Elevation is the angle of the sun above the horizon, from zero at the horizon to ninety directly overhead, with negative values meaning the sun has set. Azimuth is its compass bearing measured clockwise from true north, so ninety is east, one hundred and eighty is south and two hundred and seventy is west.
It implements the solar position algorithm NOAA publishes for its own solar calculator, derived from the low-precision method in Jean Meeus's Astronomical Algorithms. NOAA states its results are theoretically accurate to about a minute for latitudes inside roughly seventy-two degrees and to within ten minutes outside that band, with real atmospheric conditions causing further variation.
No. The sun must never be viewed directly, and never through an unfiltered telescope, camera, binoculars or finder scope. It causes permanent retinal damage without any pain to warn you. Only a certified solar filter fitted over the front of the optics makes solar observation safe.
Two reasons stack. Your longitude is usually offset from the centre of your time zone, which shifts solar noon by four minutes per degree, and the equation of time adds a seasonal swing of up to about sixteen minutes either way. Daylight saving then adds a further hour.
It is the difference between apparent solar time, which a sundial shows, and mean solar time, which a clock shows. It comes from the ellipticity of Earth's orbit and the tilt of the ecliptic, and it ranges from about sixteen minutes ahead in early November to about fourteen minutes behind in mid-February.
Because the sun is below the horizon at that time and place. Values down to about minus six degrees are civil twilight, minus twelve is nautical twilight and minus eighteen is astronomical twilight, beyond which the sky is fully dark.
Yes. A standard refraction correction is applied to the elevation, which matters most near the horizon where it lifts the apparent sun by roughly half a degree. It assumes a standard atmosphere, so real conditions will differ.
True north. A magnetic compass differs from true north by the local magnetic declination, which exceeds fifteen degrees in some regions and drifts over time, so a compass bearing must be corrected before it is compared with this figure.
This tool is provided for educational and planning use. It implements a published low-precision solar position algorithm and ignores observer altitude, local terrain and non-standard atmospheric conditions, so it is not an ephemeris and should not be relied on for navigation or for precise timing work. Never view the sun directly or through any unfiltered optical instrument.