Time, Date, Navigation & Astronomy Celestial Mechanics & Orbits Newton's generalisation of Kepler's third law

Kepler's Third Law Calculator

Kepler's third law in astronomical units says T² = a³/(M₁ + M₂) when the period is in years, the semi-major axis in astronomical units and the masses in solar masses. Choose which of the three you want and this calculator solves for it, splits the total mass by a ratio you supply, and gives the mean orbital speed. The same expression handles a planet round the Sun, a moon round a planet and the two components of a visual binary.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Solve forThe other two quantities become the inputs; the field for the one you are solving is hidden.Orbital period
Semi-major axisHalf the long axis of the ellipse — the mean of the closest and furthest separation, not the current distance.5.2026 AU
Orbital periodThe sidereal period — one full orbit relative to the fixed stars, not relative to Earth.11.8618 yr
Total system massThe sum of both bodies' masses. For a planet orbiting the Sun this is 1 plus the planet's own mass, which is usually negligible.1.0009543 M☉
Mass ratio M₁/M₂Set this to split the total into two components; it comes from the ratio of the stars' distances from the barycentre, since M₁a₁ = M₂a₂.1

It returns

  • Orbital period — The sidereal period in Julian years of 365.25 days.
  • Semi-major axis
  • Total system mass
  • Primary mass M₁
  • Secondary mass M₂
  • Mean orbital speed — The circular value 2πa/T; a real ellipse varies about this.
  • Orbital period in days

The formula

T2=a3M1+M2
T=2πa3G(M1+M2)
M1a1=M2a2

In plain text: T² = a³ / (M₁ + M₂), with T in years, a in AU and masses in solar masses

  • TSidereal orbital period (years)
  • aSemi-major axis of the relative orbit (AU)
  • M₁, M₂Masses of the two bodies (solar masses)

This is Newton's generalisation of Kepler's third law with the constants absorbed into the choice of units. Kepler's original 1619 statement, T² = a³, is the special case M₁ + M₂ = 1 — true for the Solar System only because the Sun holds well over 99.8% of its mass.

Updated Category Celestial Mechanics & Orbits Verified against published test cases Reading time 12 min

One relation, three unknowns

Kepler's third law links the size of an orbit to how long it takes. Published in 1619 as “the square of the period is proportional to the cube of the mean distance”, it was an empirical pattern in Tycho Brahe's data with no explanation attached. Newton supplied the explanation sixty-eight years later and, in doing so, added the term that makes the law useful beyond the Solar System: the total mass of the two bodies.

In astronomical units the constant disappears. Measure the period in years, the semi-major axis in astronomical units and the masses in solar masses, and the law reads T² = a³/(M₁ + M₂). Substituting the Earth — one year, one AU, essentially one solar mass — gives 1 = 1/1, which is what fixes the units against each other. No numerical constant is needed and none is hidden.

Because the relation ties three quantities, knowing any two gives the third, and each direction has its own use. Given a distance and a mass you get a period, which is how orbits are planned. Given a period and a mass you get a distance, which is how an exoplanet's separation from its star is inferred from a transit or radial-velocity period. Given a period and a distance you get a mass — and that is the only direct way we have of weighing anything in the universe.

The mass term is why Kepler's original form works for the Solar System and nowhere else. The Sun holds over 99.8% of the system's mass, so M₁ + M₂ is within a thousandth of 1 for every planet and the correction is invisible in Kepler's data. For a binary star of two comparable suns the total is nearer 2, and ignoring it would put the mass out by a factor of two.

The formula, one variable at a time

a is the semi-major axis of the relative orbit — half the long axis of the ellipse one body traces around the other, which equals the mean of the closest and furthest separations. It is not the current distance, and for a binary it is not the separation of either star from the barycentre. Getting this wrong is the most common error in binary mass work.

T is the sidereal period: one complete orbit relative to the fixed stars. For a planet seen from Earth the observed repetition is the synodic period, which is different and generally longer — the synodic period calculator converts between the two. Using a synodic period here gives a wrong answer that looks plausible.

M₁ + M₂ is a sum, and only a sum. Kepler's third law cannot separate the two masses however precisely you measure the orbit, because the relative orbit depends only on the total. To split them you need a second observation: the ratio of each body's distance from the barycentre, since Ma₁ = Ma₂. The mass-ratio field here applies that split once you supply the ratio.

In SI units the same law is T = 2π√(a³/[G(M₁ + M₂)]) with G = 6.67430 × 10⁻¹¹ m³ kg⁻¹ s⁻². That form is needed for satellites round the Earth, where the astronomical unit and the solar mass are absurd units — the geostationary orbit calculator works in it directly. Note that G is the least precisely known of the fundamental constants, to about one part in 10⁴, whereas the product GM for the Sun is known to eleven digits. That is why astronomers work in solar masses and avoid G entirely.

One thing the law does not contain is eccentricity. A circular orbit and a wildly elongated one with the same semi-major axis have exactly the same period. Eccentricity changes where the body is within the orbit and how fast it is moving at any moment, not how long the circuit takes — see the eccentricity calculator for that side of the geometry.

Worked example: Jupiter's period, and weighing Sirius

Start with Jupiter, whose semi-major axis is 5.2026 AU and whose mass is 0.0009543 M☉, giving a total system mass of 1.0009543 M☉.

  1. Cube the axis. 5.2026² = 27.0670, and 27.0670 × 5.2026 = 140.831 AU³.
  2. Divide by the total mass. 140.831 / 1.0009543 = 140.697 yr².
  3. Take the square root. √140.697 = 11.861 years. The published sidereal period is 11.862 years, so the agreement is to one part in twelve thousand.
  4. Mean speed. 2π × 5.2026 × 1.495979 × 10⁸ km = 4.8905 × 10⁹ km of circumference, divided by 11.861 × 3.15576 × 10⁷ s = 3.7434 × 10⁸ s, giving 13.06 km/s, which matches the published mean orbital speed.

Now run the law backwards on a binary star. Sirius A and B orbit with a period of 50.1284 years and an angular semi-major axis of 7.4957 arcseconds; at the system's parallax of 0.37921 arcseconds that is 7.4957 / 0.37921 = 19.767 AU.

  1. Cube the axis. 19.767³ = 7,723.4 AU³.
  2. Square the period. 50.1284² = 2,512.85 yr².
  3. Divide. 7,723.4 / 2,512.85 = 3.074 M☉ for the two stars together, close to the accepted total near 3.06.
  4. Split them. Astrometry of the barycentre gives a mass ratio of about 2.02, so M₁ = 3.074 × 2.02/3.02 = 2.056 M☉ and M₂ = 3.074/3.02 = 1.018 M☉.

That second calculation is worth pausing on. Nothing about Sirius was measured except two angles and a time, and out of them comes the mass of a star eight and a half light years away. Every stellar mass ever determined traces back to this relation applied to a binary.

Kepler's third law across the Solar System

Semi-major axes and sidereal periods from the NASA planetary fact sheets, with the ratio a³/T² evaluated for each. The ratio should equal the total system mass in solar masses, which is 1 to within each planet's own mass.
Bodya (AU)T (yr)a³/T²
Mercury0.38710.24080.058010.057981.0004
Venus0.72330.61520.378400.378470.9998
Earth1.00001.00001.000001.000001.0000
Mars1.52371.88083.537523.537411.0000
Jupiter5.202611.8618140.819140.7021.0008
Saturn9.541529.4571868.66867.721.0011
Uranus19.189284.0117065.957057.851.0011
Neptune30.0700164.7927189.4427155.741.0012

The last column drifts a little above 1 for the giant planets because the total system mass is 1 plus the planet's mass: Jupiter alone adds 0.000955, and the published axes and periods carry rounding of their own.

How to read the result

The exponents tell you how sensitive the answer is. Period goes as a1.5, so a 1% error in the distance becomes a 1.5% error in the period. Mass goes as a³/T², so a 1% error in the distance becomes a 3% error in the mass — and for a visual binary the distance comes from a parallax that is itself hard-won. Stellar masses derived this way are rarely better than a few per cent, and the limiting factor is almost always the parallax rather than the period.

A mass that comes out near 1 M☉ for a system you know to be a pair of Sun-like stars is a signal you have used the wrong a — most often one component's distance from the barycentre rather than the separation of the two. If your angular measurement is in arcseconds, divide by the parallax in arcseconds to get astronomical units before entering it.

The individual masses are only as good as the ratio you supply. Kepler's third law itself is completely blind to how the total is divided; the split shown here is arithmetic applied to your ratio, not an independent determination. If you have no ratio, leave it at 1 and read only the total, which is the quantity the orbit actually constrains.

Mean orbital speed is the circular value 2πa/T. For a near-circular orbit like Earth's it is accurate to a fraction of a per cent; for a comet on a highly eccentric path it is a poor description of anything, since the real speed varies by orders of magnitude between perihelion and aphelion while the period stays exactly what the law says.

Assumptions and limits

  • Two bodies only. The law is exact for an isolated pair. Additional bodies cause perturbations — which is precisely how Neptune was found, from Uranus refusing to keep to its predicted orbit.
  • Point masses or spherically symmetric bodies. Extended, oblate or tidally distorted bodies produce small departures.
  • Newtonian gravity. Mercury's perihelion advances by 43 arcseconds a century more than Newtonian theory allows; general relativity is needed near a massive body or at high orbital speed.
  • Use the sidereal period, never the synodic one. The synodic period is what you observe from a moving Earth, and it is a different number.
  • a is the relative semi-major axis. For a binary it is the sum of the two barycentric semi-major axes, not either one.
  • Eccentricity does not appear. Two orbits with the same semi-major axis have the same period however differently shaped they are.
  • The mass is a total. No orbit-only measurement can separate the two components; that needs astrometry or spectroscopy of the individual motions.

Why astronomers avoid the gravitational constant

The SI form of the law contains G, which is the most poorly measured of the fundamental constants — known to roughly one part in 10⁴, orders of magnitude worse than the elementary charge or Planck's constant. The product GM for the Sun, called the heliocentric gravitational parameter, is by contrast known to about eleven significant figures, because it is what orbits actually determine. Working in solar masses, astronomical units and years absorbs GM☉ into the unit system and removes G from the arithmetic entirely, which is why the astronomical form of the law is not just convenient but genuinely more precise. The International Astronomical Union fixed the astronomical unit at exactly 149,597,870,700 metres in 2012, making it a defined length rather than a measured one.

For orbits around the Earth rather than the Sun the SI form is what you want, and the geostationary orbit altitude calculator is the standard worked case: set the period to one sidereal day and solve for the radius. Changing between two orbits is a different problem again, handled by the Hohmann transfer calculator, whose transfer time is exactly half the period of an ellipse whose semi-major axis is the mean of the two radii — Kepler's third law doing the work.

The shape of the orbit that this law deliberately ignores is covered by the eccentricity, apoapsis and periapsis calculator. If you are converting an observed repetition into a true orbital period, the synodic period calculator is the step that has to come first. And the surface gravity that follows once you know a body's mass and radius comes from the planetary surface gravity calculator.

In exoplanet work this law is used in reverse thousands of times over. A transit or radial-velocity survey measures a period directly and precisely; the star's mass is estimated from its spectrum and luminosity; and a = (T²M)1/3 then gives the separation, which is what decides whether the planet sits in the habitable zone. Every uncertainty in the stellar mass propagates into that separation as one third of its fractional size, which is why the cube root is such a forgiving operation.

Key terms

Semi-major axis
Half the longest diameter of the orbital ellipse, equal to the mean of the periapsis and apoapsis distances. It sets the period and the orbital energy.
Sidereal period
One complete orbit measured against the fixed stars, as distinct from the synodic period measured against the Earth's own motion.
Barycentre
The centre of mass of the two bodies, about which both actually orbit. The ratio of their distances from it is the inverse ratio of their masses.
Astronomical unit
Defined since 2012 as exactly 149,597,870,700 metres, close to the mean Earth–Sun distance.
Solar mass
The mass of the Sun, about 1.989 × 10³⁰ kg. Used as the unit of mass so that the gravitational constant drops out of the law.

Frequently asked questions

What is Kepler's third law in simple terms?

The further out an orbit is, the longer it takes, and the relationship is that the period squared is proportional to the distance cubed. In astronomical units it is simply T² = a³/(M₁ + M₂). Doubling the distance from a star multiplies the period by 21.5 = 2.83, so a planet at 4 AU from a solar-mass star takes exactly 8 years.

Why does the mass term matter if Kepler managed without it?

Because the Sun holds over 99.8% of the Solar System's mass, so the total is within a thousandth of 1 for every planet and Kepler's data could not see the difference. In a binary star of two Sun-like components the total is close to 2, and dropping the term would halve the answer. Newton's version restored it.

Can this give me the mass of each star separately?

No — the orbit constrains only the sum. Splitting it needs a second, independent measurement: the ratio of the two stars' distances from the barycentre, since M₁a₁ = M₂a₂. Enter that ratio in the optional field and the calculator applies the split, but the split is arithmetic on your number rather than something the orbit itself determines.

Does the shape of the orbit change the period?

No. Two orbits with the same semi-major axis have the same period no matter how eccentric either is. Eccentricity changes the body's speed and distance at each point of the orbit, and it changes the path length, but the two effects cancel exactly in the period. That is one of the more surprising consequences of the inverse-square law.

What units does the calculator use internally?

Astronomical units, Julian years of 365.25 days and solar masses, which is the combination that makes the constant of proportionality exactly 1. The input fields will accept kilometres, gigametres, days, hours, Jupiter masses and Earth masses and convert for you, but every result is reported in the astronomical set.

Should I use the sidereal or the synodic period?

Sidereal, always — one orbit relative to the fixed stars. The synodic period is what you observe from a moving Earth, such as the interval between successive oppositions of Mars, and it is a different quantity. Substituting it produces a wrong answer that looks entirely reasonable. Convert first with the synodic period calculator.

How do I use this for a satellite orbiting the Earth?

Convert the Earth's mass to solar masses, which is 3.00348 × 10⁻⁶, and the orbital radius to astronomical units, and the same relation holds. In practice the SI form T = 2π√(a³/GM) is far easier to work with at those scales, and the geostationary orbit calculator uses it directly.

Where does the law break down?

When a third body perturbs the orbit noticeably, when either body is close enough that tidal distortion matters, or when relativistic effects become significant. Mercury's perihelion advances 43 arcseconds per century beyond the Newtonian prediction, which was the first observational support for general relativity. The calculator warns when the mean orbital speed exceeds 1% of the speed of light.

References