Skip to content

Celestial Position Calculator: Altitude and Azimuth

Calculate the altitude and azimuth of the Sun, Moon, planets, and bright stars for any location, date, and time. Shows right ascension, declination, and a sky chart.

Celestial Position Calculator

Find where a star, planet, the Sun or the Moon sits in the sky from any place on Earth at any date and time. Results are given as altitude above the horizon and azimuth measured from north.

°
°

Decimal degrees. Latitude is positive north, longitude is positive east.

Altitude
61.96°
Azimuth
179.06°
Above the horizon: look S, 61.96° up from the horizon.

Where to look

NESW
Direction
S
Altitude in degrees, minutes, seconds
61° 57′ 25″
Right ascension
6h 2m 38s
Declination
23° 26′ 14″
Altitude with refraction
61.97°
Distance
1.0163 au (152,032,419 km)

Method

Positions come from the standard algorithms in Meeus, Astronomical Algorithms. The date converts to Julian Day 2460483.00000, which gives the body's right ascension and declination; the observer's longitude and sidereal time then give the altitude and azimuth.

Loading calculator...
📚

Documentation

This calculator works out where a celestial body appears in the sky from a given place at a given moment. It reports two numbers: altitude, the angle above the horizon, and azimuth, the compass direction measured from north.

Altitude and azimuth

Altitude is measured in degrees from the horizon. It is 0° on the horizon and 90° straight overhead, at the point called the zenith. A negative altitude means the body is below the horizon and cannot be seen.

Azimuth is measured in degrees clockwise from north. North is 0°, east is 90°, south is 180°, and west is 270°. Together the two angles point at one spot in the sky, the way a street address points at one building.

This pair is called the horizontal coordinate system. It depends on where the observer stands and on the time, because the Earth turns.

How the calculation works

  1. The date and time are converted to a Julian Day, a running count of days used in astronomy.
  2. The body's right ascension and declination are computed. These are fixed coordinates on the sky, like longitude and latitude projected outward onto the celestial sphere.
  3. Greenwich sidereal time is computed and combined with the observer's longitude to give local sidereal time.
  4. The hour angle is local sidereal time minus the right ascension. It says how far the body is from the observer's meridian.
  5. Altitude and azimuth follow from the hour angle, the declination, and the observer's latitude:

sin(altitude) = sin(latitude) × sin(declination) + cos(latitude) × cos(declination) × cos(hour angle)

Where the positions come from

Different bodies need different models.

  • The Sun uses the low-precision solar theory in Meeus, chapter 25, good to about 0.01°.
  • The Moon uses the largest periodic terms of the lunar theory in Meeus, chapter 47, good to about 0.05°.
  • The planets use the Keplerian elements published by JPL for approximate positions of the major planets. They are valid from 1800 to 2050 and accurate to a few arcminutes.
  • The stars use catalogue positions for epoch J2000.0, precessed to the date of the calculation.

Refraction

Air bends light, so a body low in the sky looks higher than it geometrically is. The effect is about 0.5° at the horizon and falls quickly with height, to roughly 0.03° at 45°. The calculator shows the geometric altitude and the altitude after refraction is added.

Example

From the Royal Observatory at Greenwich, latitude 51.4778° north and longitude 0.0015° west, on 21 June 2024 at 12:00 UTC, the Sun stands about 62° above the horizon and almost due south. That is close to the highest the Sun ever reaches from that latitude, because the June solstice is when the Sun's declination is at its most northerly, about +23.44°.

Frequently asked questions

What is the difference between altitude and declination?

Declination is fixed to the sky and does not depend on the observer. Altitude depends on where the observer stands and on the time of day, because the Earth's rotation carries the sky past.

Why is the time asked for in UTC?

UTC removes any ambiguity from time zones and daylight saving. Convert local clock time to UTC before entering it.

Why can a star be below the horizon all day?

A star with a declination far from the observer's hemisphere never rises there. Canopus, at declination −52.7°, never appears from 60° north.

How accurate is this?

Sun and stars are accurate to a small fraction of a degree, the Moon to roughly 0.05°, and the planets to a few arcminutes within 1800 to 2050. That is far finer than the eye can judge and enough to point a telescope with a wide field.

Why does Polaris sit at an altitude close to my latitude?

Polaris is very near the north celestial pole, and the pole's altitude equals the observer's latitude. That relationship is how sailors found their latitude for centuries.