DOC

How calculators work

Kepler’s Third Law: How Orbital Period Reveals Distance and Mass

One equation links an orbit’s period, its semi-major axis, and the total mass of the pair. Derive it, use it in SI and astronomical units, and see where the shortcut stops working.

An orbit does not carry a label saying how far it is from its primary or how heavy that primary is. What it does carry is timing. Watch a body complete the same path again and again, measure the size of the relative orbit, and Newtonian gravity ties the two observations together.

Kepler’s third law is often compressed to “farther planets take longer.” That is true but incomplete. The useful version is a three-way relationship: a wider orbit takes longer, a more massive pair moves through a given orbit faster, and the orbit size in the equation is the semi-major axis—not whichever separation happens to be visible in a photograph.

Two elliptical orbits of different size circling a dark central body, with a longer sequence of clocks along the larger orbit
At the same central mass, enlarging the semi-major axis stretches the period sharply: period grows with the three-halves power of orbital size.
The relative two-body orbitT² = 4π²a³ / G(M + m)

Equivalently, T² = 4π²a³ / (μM + μm), where μ = GM. The second form is often the one precision orbit work actually measures.

Read the variables before using the formula

TOrbital periodseconds (s)

Time for one full cycle of the relative orbit.

aSemi-major axismetres (m)

Half the major axis of the pair’s relative ellipse.

M, mTwo masseskilograms (kg)

Central body and companion; the exact law uses their sum.

GGravitational constantm³ kg⁻¹ s⁻²

CODATA 2022: 6.674 30(15) × 10⁻¹¹.

The adjective relative matters. In a binary, both objects orbit their shared barycentre. The a in the complete equation is the semi-major axis of their separation orbit, not just the primary’s small wobble or the companion’s barycentric ellipse by itself. When m ≪ M—a spacecraft around Earth, or Earth around the Sun—the shortcut M + m ≈ M is excellent. In a stellar binary or a double-planet system, it may not be.

The short circular derivation—and the extra step an ellipse needs

For a circular orbit of radius r, gravity supplies the inward force required for circular motion. Set the two expressions equal:

1Gravity pulls inwardF = GMm / r²
2Circular motion needs forceF = mv² / r
3One lap sets the speedv = 2πr / T
4Substitute and simplifyT² = 4π²r³ / GM

That last line is the circular, small-companion version. Here the radius is constant, so r = a. It correctly exposes the scaling: double the orbit size and the period becomes 23/2 ≈ 2.83 times longer.

An ellipse needs one carefully stated upgrade. Newton’s exact two-body reduction says that the relative separation moves under −G(M + m)/r. A bound solution is an ellipse, and its mean motion obeys n²a³ = G(M + m), with n = 2π/T. That gives the full law at the top of the page. The circular derivation shows why the relationship has its shape; it is not permission to replace an elliptical orbit with a fixed radius.

An elliptical orbit with a dark central body at one focus, a stable long-axis measure, and a changing dotted radial distance to an orbiting body
In an ellipse, the primary sits at a focus. The separation r changes around the orbit; the semi-major axis a is the stable half-major-axis measure.

Three useful ways to solve the same relationship

Need the period?

T = 2π√[a³ / G(M + m)]Use a measured orbit and the pair’s total mass.

Need the orbit size?

a = [G(M + m)T² / 4π²]^(1/3)Useful when timing is easier than direct distance measurement.

Need the central mass?

M = 4π²a³ / GT² − mBetter yet, report G(M + m) when the data constrain a gravitational parameter directly.

The mass inversion has a built-in warning: it requires the companion mass to be handled deliberately. It also turns small distance errors into larger mass errors because mass scales as . To first order, if the period and semi-major axis are independently measured, the fractional uncertainty in the inferred gravitational parameter is approximately √[(3σa/a)² + (2σT/T)²].

SI units and the handy astronomical shorthand

In SI, keep the set intact: metres, seconds, kilograms, and the stated value of G. The numerical answer collapses if kilometres are fed to SI G, or days are treated as seconds.

SystemUseRelationshipWhat to watch
SIa in m, T in s, masses in kgT² = 4π²a³ / G(M + m)Use one stated value of G; do not mix km or days into it.
Astronomical unitsaAU = a / au; Ty = T / 31,557,600 sTy² = 1.00003777384907 aAU³ / qq = G(M+m)/(GM)N; the coefficient is not exactly 1.

The familiar classroom line, Pyear² ≈ aAU³ / (Mtotal/M), is a useful rounded normalization near a solar-mass primary. It is not an exact identity for every meaning of “year” and “solar mass.” With the IAU’s exact astronomical unit, a Julian year of 365.25 days, and the IAU nominal solar mass parameter (GM)N, the coefficient above is the precise conversion. This is why professional orbit tables often quote GM ratios rather than pretending a kilogram solar mass is exact.

Example 1: does Earth land near one year?

Use an ideal isolated Sun–Earth pair, not a calendar prediction. Take a = 1 au = 149,597,870,700 m, the IAU nominal solar parameter (GM)N = 1.3271244 × 10²⁰ m³ s⁻², and JPL’s Earth parameter GME = 3.98600435507 × 10¹⁴ m³ s⁻².

Earth scale check365.2563499 days

T = 2π√[a³ / ((GM)N + GME)]

31,558,148.63 s, or 1.000017385 Julian years.
Orbit about a different central mass11.9660 hours

For a negligible-mass satellite at a = 26,560 km = 2.6560 × 10⁷ m from Earth’s centre:

T = 43,077.758 s using JPL’s GME.

The first value is a magnitude check: it agrees with Earth’s listed sidereal scale, while real Earth motion is perturbed by the other planets and needs an ephemeris for precision work. The second is deliberately ideal. Reverse it with an exactly 12-hour period and the inferred semi-major axis is 26,610.223 km; use a = 26,560 km and T = 43,077.758 s together, and 4π²a³/T² returns 398,600.435507 km³ s⁻², the Earth gravitational parameter used as input.

Five mistakes that can produce a plausible-looking wrong answer

MistakeWhy it failsRepair
Using today’s separation as aIn an ellipse, r changes from periapsis to apoapsis.Use the semi-major axis of the relative orbit.
Mixing seconds with days or yearsT is squared; a unit mismatch explodes quickly.Convert first, or use one self-consistent astronomical form.
Giving SI G a distance in km introduces a factor of 10⁹.Convert km to m before substitution.
Using an orbit’s diameter as aa is half the major axis, not the full long diameter.Divide the measured major-axis length by two.
Dropping a companion that is not smallThe exact driver is M+m, not the primary alone.Use total mass and the separation orbit. In a constructed 0.8 + 0.2 solar-parameter binary at 2 au, ignoring the companion makes the period 11.8% too long.

What the equation can tell you—and where it must stop

Two-body boundary

It relates period, orbital scale, and total gravitational mass for a Newtonian two-body ellipse; and lets you infer one when the other two are measured.

It cannot tell you alone

An orbit’s orientation, eccentricity, phase, atmosphere, stability in a crowded system, or the detailed path after another body perturbs it.

Escalate the model when

Third bodies, oblateness, tidal effects, relativity, or high-precision timing matter. Use osculating elements and numerical ephemerides rather than treating the ellipse as permanently fixed.

A ruler, stopwatch, and mass block passing through a calibration gate into a two-body elliptical orbit, with a third body outside a dotted boundary
The formula rewards matched units and a well-defined pair. A third body is not a decorative detail; it changes the dynamical problem.

Kepler’s third law is therefore less like a magic distance finder than a disciplined accounting rule for a particular model. It is powerful because timing, geometry, and gravity all leave the same numerical fingerprint. It becomes misleading only when the numbers are clean but the orbit, units, or system boundary have been named carelessly.

Sources and further reading