Orbital Period Calculator Formula

Understand the math behind the orbital period calculator. Each variable explained with a worked example.

Formulas Used

Orbital Period

period_seconds = 2 * pi * sqrt(pow(semi_major_axis, 3) / (6.674e-11 * central_mass))

Period in Days

period_days = 2 * pi * sqrt(pow(semi_major_axis, 3) / (6.674e-11 * central_mass)) / 86400

Period in Years

period_years = 2 * pi * sqrt(pow(semi_major_axis, 3) / (6.674e-11 * central_mass)) / 31557600

Variables

VariableDescriptionDefault
semi_major_axisSemi-Major Axis(m)149597870700
central_massCentral Body Mass(kg)1.989e+30

How It Works

How the Orbital Period Is Calculated

The orbital period is the time a body takes to complete one full orbit around a central mass.

Kepler's Third Law (Generalized)

T = 2π √(a³ / (G M))

  • *a* is the semi-major axis of the orbit (metres)
  • *G* is the gravitational constant, 6.674 × 10⁻¹¹ N m² kg⁻²
  • *M* is the mass of the central body (kg)
  • This assumes the orbiting body's mass is negligible compared to the central body.

    Worked Example

    Find the orbital period of Earth around the Sun (a = 1.496e11 m, M = 1.989e30 kg).

    semi_major_axis = 149597870700central_mass = 1.989e+30
    1. 01T = 2π √(a³ / (G M))
    2. 02a³ = (1.496e11)³ = 3.348e33 m³
    3. 03G M = 6.674e-11 × 1.989e30 = 1.327e20
    4. 04a³ / (G M) = 2.524e13
    5. 05T = 2π × √(2.524e13) ≈ 3.156e7 s ≈ 365.25 days

    Frequently Asked Questions

    Does the orbiting body's mass affect the period?

    For most situations the orbiting body is far less massive than the central body, so its contribution is negligible. For a binary of comparable masses, replace M with (M1 + M2).

    What shape of orbit does this assume?

    The formula applies to any Keplerian elliptical orbit. The semi-major axis alone determines the period regardless of eccentricity.

    How accurate is this for real solar-system bodies?

    Accurate to better than 0.01% for planets, with tiny deviations from perturbations and relativistic effects.

    Ready to run the numbers?

    Open Orbital Period Calculator