How to calculate the ascendant: the formula and Python code

The ascendant is the degree of the zodiac rising on the eastern horizon at a given moment and place. It takes four numbers to compute: the Julian day, the local sidereal time, the obliquity of the ecliptic and the latitude. This guide gives the formula, a complete Python function with no dependencies, and a check against AstroMansion's engine.

What the formula computes

The ecliptic, the Sun's yearly path along which the zodiac runs, is tilted to the celestial equator by about 23.44 degrees. As the Earth turns, a new part of the ecliptic rises in the east every moment. The ascendant is the point where the ecliptic crosses the eastern horizon. Which point that is depends on how far the sky has turned, measured by sidereal time, and on where you stand, measured by latitude.

The five steps

  1. Turn the local time into Universal Time. Subtract the time zone offset and any daylight saving in force on that date.
  2. Find the Julian day. It counts days continuously, so the formulas need no calendar arithmetic.
  3. Compute the sidereal time. Greenwich mean sidereal time plus the east longitude gives the local sidereal time. In degrees it is the right ascension of the Midheaven, often written RAMC.
  4. Compute the obliquity of the ecliptic. It changes slowly, about 47 arcseconds a century.
  5. Apply the formula with RAMC, the obliquity and the latitude.

The formula

With θ for RAMC, ε for the obliquity and φ for the latitude, the ascendant's ecliptic longitude λ is:

λ = atan2(cos θ, −(sin θ × cos ε + tan φ × sin ε))

The two-argument arctangent places the angle in the right quadrant by itself, so no sign checks are needed. The result runs from 0 to 360 degrees, where 0 is 0° Aries and every 30 degrees is the next sign.

The Python function

The function below needs only Python's standard library. The sidereal time follows the IAU 1982 expression and the obliquity the IAU 2006 one, cut to the terms that matter for a birth chart.

import math

SIGNS = ("Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo",
         "Libra", "Scorpio", "Sagittarius", "Capricorn", "Aquarius", "Pisces")


def julian_day(year, month, day, hour=0.0):
    """Julian day of a Gregorian date, the hour in Universal Time."""
    if month <= 2:
        year, month = year - 1, month + 12
    a = year // 100
    b = 2 - a + a // 4
    return int(365.25 * (year + 4716)) + int(30.6001 * (month + 1)) + day + hour / 24 + b - 1524.5


def ascendant(jd_ut, lat, lon):
    """Ecliptic longitude of the ascendant in degrees, east longitude positive."""
    d = jd_ut - 2451545.0
    t = d / 36525
    gmst = 280.46061837 + 360.98564736629 * d + 0.000387933 * t * t - t ** 3 / 38710000
    ramc = math.radians((gmst + lon) % 360)
    eps = math.radians(23.439291111 - 0.0130041667 * t)
    phi = math.radians(lat)
    asc = math.atan2(math.cos(ramc), -(math.sin(ramc) * math.cos(eps) + math.tan(phi) * math.sin(eps)))
    return math.degrees(asc) % 360


lon = ascendant(julian_day(2000, 1, 1, 12.0), 51.4779, 0.0)
print(SIGNS[int(lon // 30)], round(lon % 30, 2))  # Aries 24.28

For Greenwich on 1 January 2000 at 12:00 UT the function gives 24.28° Aries.

How close it comes

AstroMansion's engine gives 24.27° Aries for the same moment and place, so the two agree to about 0.01 degree. The engine also applies nutation, the small nodding of the Earth's axis, to the sidereal time and the obliquity, which the short formulas leave out. For the Midheaven the difference is smaller still, about 0.003 degree.

A hundredth of a degree is 36 arcseconds. The ascendant moves about one degree every four minutes, so the difference equals about two seconds of birth time, far below the accuracy of any birth record.

Where it goes wrong

  • The birth time. Four minutes of error moves the ascendant by about a degree, and an hour by about fifteen. Most wrong ascendants come from the time, not from the formula.
  • The time zone and daylight saving. A birth time must first become Universal Time with the rules in force on that date and in that place. Historic daylight saving rules are the most common trap.
  • The sign of the longitude. The function takes east longitude as positive, so New York is −74.
  • Polar latitudes. Above about 66 degrees north or south, parts of the ecliptic never rise, and the ascendant can jump. Most house systems break down there too.
  • No birth time. Without a time the ascendant cannot be computed at all. What can still be known is in the guide to charts without a birth time.

The same result in one call

If you build an app, the time zone history, the nutation and the house cusps add up to a lot of code. AstroMansion's API takes the local time, the place and the time zone, and returns the ascendant with the whole chart.

from astromansion import AstroMansion

client = AstroMansion()  # reads ASTROMANSION_API_KEY
chart = client.natal(
    date="2000-01-01",
    time="12:00",
    lat=51.4779,
    lon=0.0,
    timezone="Europe/London",
)
print(chart.summary.ASC.sign)

The free plan allows 100 calls a month. Keys and SDKs are on the developers page, and the rising sign calculator for a single chart is on the rising sign page.

Sources

Frequently Asked

What is the formula for the ascendant?

The ascendant's ecliptic longitude is atan2(cos θ, −(sin θ cos ε + tan φ sin ε)), where θ is the local sidereal time, ε the obliquity of the ecliptic and φ the latitude.

How much does the birth time change the ascendant?

The ascendant moves about one degree every four minutes. An hour's error shifts it by about fifteen degrees.

Can the ascendant be calculated without a birth time?

No. The ascendant depends on the sidereal time of the moment of birth, so it cannot be computed without the time.

More guides