The full two-body form is used throughout: T² = 4π²a³ / (G(M + m)). For a planet around a star the orbiting mass changes nothing visible; for the Earth-Moon system it shifts the period by about a percent, which is why the field exists.
| Quantity | Value |
|---|
Disclaimer: This calculator gives estimates for general information only. It is not financial, medical or other professional advice. Orbits are two-body and unperturbed; real ephemerides account for other bodies, relativity and tides.
What this calculator does
Kepler’s third law ties an orbit’s size to its period: the square of the period is proportional to the cube of the semi-major axis, with the constant set by the total mass of the system. This calculator uses the full Newton form, T² = 4π²a³ / (G(M + m)), and solves it in all three directions: the period from the axis and masses, the axis from the period and masses (the geostationary-orbit calculation), and the total mass from a measured period and axis, which is how stars in binary systems and planets around other suns are actually weighed. The central body can be picked from presets (Sun, Earth, Moon, Mars, Jupiter) or entered freely in kilograms, solar masses or Earth masses, and the orbiting body’s own mass can be included, because in the Earth-Moon system it is a percent-level correction, not a pedantic one. Alongside the solved quantity the results give the unit equivalents a working answer needs, the mean orbital speed for a circular orbit at that axis, and, where the central body has a known radius, the altitude above its surface.
How to use it
- The defaults are the calibration case: the Sun’s mass and an axis of 1 AU must return a period of one year, and they do (365.26 days on these constants), because the astronomical unit and these constants were built from that orbit. If a Kepler calculator misses this, nothing else it says matters.
- Presets fill the mass field; choosing Custom leaves whatever mass you typed untouched. Masses can be entered in scientific notation (1.9885e30) and in solar or Earth masses via the unit selector.
- Include the orbiter’s mass where it is not negligible: satellites around Earth, no visible effect; the Moon around Earth, about a 1% shorter period than the Moon-less figure; binary stars, where omitting either mass is simply wrong.
- Axis is centre to centre. For a satellite, the semi-major axis is measured from the central body’s centre, so altitude plus the body’s radius. The results return the favour by printing the altitude when the preset’s radius is known, which is the number most satellite questions actually ask for.
- Mass mode weighs systems: enter any orbit’s period and axis and read off the total mass in kilograms, solar masses and Earth masses, the standard trick behind exoplanet-system and binary-star masses.
The method
Newton’s form of Kepler’s third law comes from setting gravity’s pull equal to the centripetal requirement of an orbit and generalising to ellipses: T² = 4π²a³ / (G(M + m)), where a is the semi-major axis, M and m the two masses, and G = 6.674 × 10^−11 m³ kg^−1 s^−2. For circular orbits a is simply the radius. Kepler’s original version, T² ∝ a³, is this equation with the mass factor suppressed, valid for comparing bodies orbiting the same centre; in solar-system units (years, AU, solar masses) the constant collapses so neatly that a³/T² returns the total mass in solar masses, a check row printed with every result. The rearrangements are exact algebra: a = (G(M + m)T²/4π²)^(1/3) and M + m = 4π²a³/(GT²). The circular-orbit speed v = 2πa/T is included as the mean speed; for elliptical orbits the true speed varies around it by the vis-viva relation, which the limitations keep in view. Constants: 1 AU = 1.495978707 × 10^11 m exactly; preset masses Sun 1.9885 × 10^30 kg, Earth 5.972 × 10^24, Moon 7.348 × 10^22, Mars 6.417 × 10^23, Jupiter 1.898 × 10^27; radii for the altitude row: Earth 6,371 km, Moon 1,737.4 km, Mars 3,389.5 km, Jupiter 69,911 km, Sun 695,700 km. Everything is computed at full precision and rounded only for display.
Worked examples
The calibration orbit (the loaded defaults). Sun, 1 AU, orbiter mass ignored: T = 365.26 days, one year on these constants, mean speed 29.78 km/s, and the a³/T² check returns exactly 1.0000 solar masses. It is the least surprising result in astronomy and the one every such calculator must reproduce.
The Moon, with its own mass counted. Earth as centre, axis 384,400 km, orbiter mass set to the Moon’s 7.348 × 10^22 kg: T = 27.29 days, against the measured sidereal month of 27.32 days. Leave the Moon’s mass at zero and the answer stretches to 27.45 days, a visible error from a “negligible” mass, which is the lesson the two-mass form exists to teach.
A space station. Earth, axis 6,791 km (about 420 km of altitude): T = 92.8 minutes, matching the familiar roughly hour-and-a-half station orbit, with the altitude row returning the 420 km the axis was built from.
The geostationary slot, solved backwards. Period mode in reverse: Earth, T = 23.934 hours (one sidereal day): the axis comes out at 42,163 km from the centre, about 35,792 km above the equator on these constants, the ring where a satellite’s period matches Earth’s rotation and it hangs over one longitude. Published figures differ by a few kilometres with refined constants, which the reading section explains.
Weighing the Sun from Earth’s orbit. Mass mode with a = 1 AU and T = 1 year returns 1.9886 × 10^30 kg, 1.0000 solar masses: the Sun’s mass measured with nothing but Earth’s year and its distance, the same trick, scaled up, that weighs binary stars and exoplanet hosts.
Reading your result
The verdict is the solved quantity, and the table gives its equivalents in the units neighbouring questions use: a period in years, days, hours and seconds; an axis in AU, kilometres and, for planetary bodies, altitude above the surface; a mass in kilograms, solar and Earth masses. Two checks are built in. The a³/T² row, in AU, years and solar masses, should return the total mass you entered whenever the system is the Sun’s; for other centres it is still a useful fingerprint of the system. And the circular speed should sit in a sane band for the setting, tens of km/s for planets, about 1 km/s for the Moon, 7.7 km/s for a low Earth orbit; a speed that surprises is an input that slipped, usually a unit. Remember that the axis is the semi-major axis: for an ellipse it is half the long diameter, and the period depends on it alone, not on how stretched the ellipse is, which is the law’s quiet surprise and the reason a comet and a planet at the same axis share a period.
Limitations
- Two bodies only. Real systems perturb each other: the Moon’s period is nudged by the Sun, station orbits decay and precess, and exoplanet systems resonate. This is the exact solution for the idealised pair, not an ephemeris.
- The speed is the circular mean. On an elliptical orbit the body moves faster at periapsis and slower at apoapsis around the printed value; the vis-viva equation is needed for the speed at a specific point.
- Preset masses and radii are rounded reference values. A few kilometres of difference from published geostationary figures, for instance, traces to those constants, not to the law. Custom masses accept any precision your source provides.
- Relativity is ignored. Around very massive or compact objects (Mercury’s perihelion is the famous small case; anything near a neutron star is the large one), Newtonian gravity itself needs correction.
- Nothing here keeps a satellite up. The law gives the period of an orbit at an axis; drag, station-keeping and orbital decay are engineering questions outside it.
Frequently asked questions
Why does the orbiting body’s mass appear at all? School versions leave it out.
Because both bodies orbit their shared centre of mass, and the exact law carries the total M + m. School versions assume m is negligible next to M, which is excellent for planets around the Sun (Jupiter, the heaviest, is a thousandth of the Sun) and merely good for the Moon around Earth, where the ratio is about 1.2% and the period error from ignoring it is about half that, the difference between 27.29 and 27.45 days in the worked example. For binary stars, where the masses are comparable, dropping either one is not an approximation but a blunder, and the field costs nothing when the honest figure is zero.
Does the shape of the ellipse change the period?
No, and it is the most counterintuitive part of the law: the period depends only on the semi-major axis and the total mass. A circular orbit of radius 1 AU and a long thin ellipse with semi-major axis 1 AU, which dives in close to the Sun and swings far out, take the same year. What changes with eccentricity is the speed profile, fast at the near end and slow at the far end, averaging out to the same period. Halley’s comet, axis about 17.8 AU, period about 75 years, is the famous demonstration: 17.8 cubed is about 5,640, whose square root is about 75.
How do astronomers weigh a star they cannot touch?
Exactly with this page’s mass mode. Find something orbiting it, measure the orbit’s period (from the light curve or Doppler wobble over time) and its axis (from the angular separation and the distance), and the total mass follows from 4π²a³/(GT²). Applied to binary stars for two centuries, it is still nearly the only direct way to weigh stars, and extended to exoplanet hosts and to stars circling the galactic centre’s black hole, where the same arithmetic returns four million solar masses for Sagittarius A*.
Why is the geostationary answer a few kilometres off some published figures?
Because the last few kilometres are constants, not physics. Published values use Earth’s exact gravitational parameter and equatorial radius (6,378 km against the mean 6,371 km used here for the altitude row) and define the day precisely. The calculator’s 42,163 km axis against the commonly quoted 42,164 km shows the size of it: a kilometre in forty-two thousand. For a homework problem or a feasibility check the difference is invisible; for parking a real satellite, the refined constants and a great deal more engineering apply.
Related calculators
Method: Newton’s form of Kepler’s third law, T² = 4π²a³ / (G(M + m)) with G = 6.674 × 10^−11 SI and 1 AU = 1.495978707 × 10^11 m; solved for period, axis or total mass; circular mean speed v = 2πa/T; preset masses and radii as listed in the method section. Last reviewed: 24 October 2026.
