Kepler's Third Law Calculator – Period, Axis and Mass
The Kepler's Third Law Calculator connects the three quantities that govern every closed orbit: the orbital period T, the semi-major axis a and the mass of the central body M. Give it any two and it returns the third, along with the harmonic constant T²/a³, the mean orbital velocity, the mean motion and a full derivation. Choose a preset star, planet or moon, or type in your own system.
The Harmonic Law and Where It Comes From
Kepler announced in 1619, from Tycho Brahe's decades of naked-eye observations, that the square of a planet's period is proportional to the cube of its mean distance. He had the pattern but not the reason. Newton supplied it: equate gravity with the centripetal acceleration a curved path demands and the proportionality falls out with its constant attached.
T² = 4π²a³ / (GM) the harmonic law
T = 2π√(a³ / GM) period from the orbit size
a = (GM·T² / 4π²)^(1/3) orbit size from the period
M = 4π²a³ / (G·T²) the mass the orbit implies
G gravitational constant, 6.6743 × 10⁻¹¹ m³/(kg·s²)
a semi-major axis, half the long axis of the ellipse (m)
T time for one complete revolution (s)Two facts follow immediately. The period contains no eccentricity term, so a near-circular orbit and a long thin cometary ellipse with the same a take exactly the same time to close. And the mass of the orbiting body cancels, which is why a pebble and a moon at the same distance keep the same schedule.
The Astronomical Shorthand T² = a³
Measure periods in years and distances in astronomical units and the constant 4π²/GM comes out at almost exactly 1 for our Sun, collapsing the law to T² = a³. Jupiter sits at 5.203 AU, so its year is 5.203^1.5 ≈ 11.87 Earth years — no constants required. That convenience is a coincidence of units and a one-solar-mass primary: around Jupiter or a red dwarf the constant scales as 1/M, so the calculator shows the exact Newtonian figure beside the shorthand and flags the mismatch when the primary is not the Sun.
Weighing Planets and Stars
Rearranged as M = 4π²a³/(GT²), the law becomes the astronomer's scale. Io circles Jupiter at 421,700 km every 1.769 days, which returns 1.898 × 10²⁷ kg— Jupiter's accepted mass. The Moon's 384,400 km, 27.32-day orbit gives Earth's mass to about a percent. The same arithmetic, applied to stars whirling around Sagittarius A*, is how the mass of the Milky Way's central black hole was measured. Exoplanet work runs the calculation the other way: a transit light curve yields a period, and the period yields the semi-major axis that decides whether the planet sits in the habitable zone.
Binaries and the Two-Body Correction
The exact statement uses the combined mass, T² = 4π²a³/(G(M + m)). For planets around the Sun the second mass changes the period by a few thousandths of a percent, well below observational noise. For binary stars it dominates: Sirius A and B, separated by 23.5 AU with a 50.1-year period, imply a³/T² ≈ 5.2 solar masses for the pair. Supply an orbiting mass and the calculator prints the one-body answer, the corrected answer and the percentage gap between them.
Checking That the Constant Really Is Constant
The verification table computes a³, T² and T²/a³ for every body in a chosen system from its own published data. Across the Solar System, from Mercury at 0.387 AU to Neptune at 30.07 AU — a range of nearly two orders of magnitude — the ratio stays within a fraction of a percent of 1. On log-log axes the same data plots as a straight line of slope exactly 3/2. The small residual spread is real physics: planetary masses entering through M + m, mutual perturbations and, for Mercury, the relativistic precession that Newtonian gravity cannot account for.
Limits of the Model
Results assume two point masses with no third-body perturbations, no oblateness and no drag, so treat them as good to three or four significant figures. Unbound trajectories with e ≥ 1 have no period at all and are rejected, and very tight or very massive systems carry a General Relativity caveat.