Kepler’s Third Law Calculator: Orbital Period from the Semi-Major Axis
Kepler's Third Law Calculator: Orbital Period from the Semi-Major Axis
Kepler’s third law is not “T squared is proportional to a cubed”. It is T² = 4π²a³/GM, and the constant on the right belongs to the central body alone — which is why one number works for every planet round the Sun and a different one for every moon round Jupiter. Give a semi-major axis and get the period in seconds, days and years, the perihelion and aphelion distances, the two speeds there, and a check that a³/T² really is 1.000 in astronomical units and years.
Period of an orbit from its semi-major axis, in SI and in years and au
Mars has a semi-major axis of 227.956 million km (NASA fact sheet). Find its orbital period. Take the Sun’s GM as the IAU 2015 nominal value of 1.3271244 × 1020 m³/s², and the eccentricity as 0.0935.
The law with its constant written out, and the two unit systems it lives in
- T
- orbital period: one full loop, back to the same point relative to the stars. In seconds in the SI form.
- a
- semi-major axis in metres, half the long axis of the ellipse and the mean of the perihelion and aphelion distances.
- GM
- the central body’s mass parameter in m3 s−2. The orbiting body’s own mass does not appear, which is an approximation: the exact two-body result uses G(M + m), and for Jupiter round the Sun that lengthens the right-hand side by about one part in two thousand.
- e
- eccentricity, between 0 and 1. It shapes the orbit and sets the two distances and two speeds, and it is absent from the period.
- 4π²/GM
- the constant of proportionality. For the Sun it is 2.9746 × 10−19 s2/m3; written the other way up, a³/T² = GM/4π² = 3.3616 × 1018 m3/s2.
Worked example
Mars has a semi-major axis of 227.956 million km (NASA fact sheet). Find its orbital period. Take the Sun’s GM as the IAU 2015 nominal value of 1.3271244 × 1020 m³/s², and the eccentricity as 0.0935.
Put a into metres first. 227.956 million km = 227.956 × 106 × 103 m = 2.279 56 × 1011 m. This is the step that goes wrong most often, and it goes wrong by a factor of a thousand, which cubes to a factor of 109 — so the answer is not slightly wrong, it is absurd.
Cube it. a³ = (2.279 56 × 1011)³ = 1.184 55 × 1034 m³.
Divide by GM. a³/GM = 1.184 55 × 1034 ÷ 1.3271244 × 1020 = 8.925 68 × 1013 s². The units work out to seconds squared, which is the sanity check that you have used GM and not M.
Square-root and multiply by 2π. √(8.925 68 × 1013) = 9.4476 × 106 s, and T = 2π × 9.4476 × 106 = 5.9361 × 107 s.
Into days and years. 5.9361 × 107 ÷ 86 400 = 687.05 days, which is 1.8810 sidereal years. NASA publishes Mars’ sidereal orbit period as 686.980 days, so this agrees to one part in ten thousand.
The one-line check, if the Sun is the central body. a = 1.523 79 au, so T = a1.5 = 1.523 791.5 = 1.8810 years. No GM, no powers of ten, no conversion — and the same answer. This is the version worth memorising.
What e did and did not change. Nothing in the five steps above used e = 0.0935. It fixes the perihelion at a(1 − e) = 1.3813 au and the aphelion at a(1 + e) = 1.6663 au, and makes Mars move at 26.50 km/s at one end and 21.97 km/s at the other — but the period is the same as a circular orbit of radius 1.5238 au.
Every planet, period predicted from its published distance
| Planet | a (10⁶ km) | Published sidereal period (d) | T from Kepler (d) | Ratio |
|---|---|---|---|---|
| Mercury | 57.909 | 87.969 | 87.969 | 1.000 00 |
| Venus | 108.210 | 224.701 | 224.704 | 1.000 01 |
| Earth | 149.598 | 365.256 | 365.257 | 1.000 00 |
| Mars | 227.956 | 686.980 | 687.048 | 1.000 10 |
| Jupiter | 778.479 | 4332.589 | 4335.914 | 1.000 77 |
The same law in three sets of units
| Written as | Constant | Use it when |
|---|---|---|
| T² = 4π²a³/GM | depends on the central body | always — this is the real law, and the only form that works for Earth satellites and the moons of Jupiter |
| T [yr]² = a [au]³ | exactly 1, by choice of units | anything orbiting the Sun. Holds to about 1.5 parts in a million when the year is the sidereal year of 365.256 363 days |
| T&sub1;²/T&sub2;² = a&sub1;³/a&sub2;³ | cancels out | comparing two bodies round the same central body. The usual exam form, and the one that needs no constants at all |
Why the constant belongs to the central body, and where the law breaks
Kepler found the third law by fitting, in 1619, and could not say why it was true. Newton could: put the gravitational force GMm/r² equal to the centripetal force mv²/r for a circular orbit, substitute v = 2πr/T, and T² = 4π²r³/GM drops out in three lines. The m cancels, which is the whole point — the period of an orbit does not depend on what is doing the orbiting. A grain of dust and a moon at the same radius keep step. That is also why the derivation is a standard exam question: it is short, and it uses nothing but the two force laws.
The derivation above is for a circle, and Kepler’s orbits are ellipses. The result survives unchanged with a in place of r, and that is the genuinely surprising part: the period of an ellipse is the period of the circle with the same semi-major axis. A comet on a long thin orbit with a = 17 au takes the same 70 years as a circular orbit at 17 au, even though it spends almost all of that time crawling about in the outer solar system and only weeks near the Sun.
The constant is 4π²/GM and nothing else, so it is a property of the central body. One number covers everything orbiting the Sun. A different number covers everything orbiting the Earth, and that is what the orbital period and altitude page uses. A third covers the moons of Jupiter. Students lose marks by carrying “T² = a³” out of the solar system: in years and astronomical units that equation is true for the Sun because the units were chosen to make it true, and it is wrong by many orders of magnitude for anything else.
Where this goes wrong is almost always the unit of a. The axis gets cubed, so a kilometre typed where metres were wanted is not a 0.1% error, it is a factor of 109, and the period comes out wrong by a factor of 30 000. There is no warning, and a number like “0.0217 seconds” for Mars does not look like a unit slip; it looks like a different kind of mistake. The habit that saves you is to convert to metres on a line of its own, write the power of ten, and only then start cubing. The unit selector above does that for you and prints the axis back in both au and km so you can see which one you meant.
The second thing that breaks the law is the mass of the orbiting body. The exact two-body result is T² = 4π²a³/G(M + m), with both bodies orbiting their common centre of mass. Dropping m is excellent for a planet round the Sun — Jupiter is the worst case and still one part in a thousand — and hopeless for two stars of similar mass, where the omission is a factor of √2. It is also how binary-star masses are measured: observe a and T, and G(M + m) follows.
Kepler’s other two laws are in the diagram above rather than in the arithmetic. The first says the orbit is an ellipse with the central body at one focus, not at the centre — which is why the Sun in the picture sits off to one side, and why perihelion and aphelion differ. The second says the line from the focus sweeps equal areas in equal times; the two shaded wedges are drawn with exactly equal areas, so they take exactly equal times, and the fact that one is fat and short while the other is thin and long is the second law. It is also conservation of angular momentum: the swept area per second is L/2m, and nothing torques an orbit about its own focus.
Frequently asked questions
Does the eccentricity change the orbital period?
No. Only the semi-major axis does. This is the single most useful thing to know about the third law and it is asked constantly. Two orbits with a = 1 au, one circular and one with e = 0.9, both take one year. What eccentricity changes is the shape, the closest and farthest distances a(1 − e) and a(1 + e), and how wildly the speed varies — at e = 0.9 the perihelion speed is nineteen times the aphelion speed, because that ratio is (1 + e)/(1 − e).
Why is it T² = a³ in some books and T² = 4π²a³/GM in others?
They are the same equation in different units. Measure T in years and a in astronomical units and the constant 4π²/GMSun comes out at 1.000, so it vanishes from the page — which is convenient and also a trap, because it only vanishes for the Sun. In SI units the constant is 2.9746 × 10−19 s²/m³ and has to be written down. Use the years-and-au form for planets and the full form for everything else.
What exactly is the semi-major axis, and how do I get it from a question?
It is half the longest diameter of the ellipse. Three routes get you there. If you are given the closest and farthest distances, a is their average: a = (q + Q)/2. If you are given q and e, then a = q/(1 − e). If you are given a circular orbit, a is just the radius. The one thing a is not is the time-averaged distance from the focus, which is slightly larger, because the body spends longer out near aphelion.
Does Kepler’s third law work for Earth satellites?
Yes, with the Earth’s GM in place of the Sun’s — choose “The Earth” above. The constant becomes 4π²/3.986004 × 1014, and a is measured from the centre of the Earth, not from the ground. Forgetting to add the Earth’s radius to an altitude is the standard error here: an orbit “at 400 km” has a = 6778 km, not 400 km. The orbital period and altitude page takes the altitude and adds the radius for you.
Is Kepler’s third law on my syllabus?
It depends on the board, and this is worth checking before you memorise anything. The NCERT Class XI chapter on gravitation states all three laws explicitly. The Cambridge International 9702 syllabus for 2025–2027 does not mention Kepler by name anywhere in its gravitation topic; it asks instead that you “analyse circular orbits in gravitational fields by relating the gravitational force to the centripetal acceleration it causes”, which is the derivation of the third law without the label. Either way, the derivation is the examinable part.
The page gives Mars 687.05 days but my textbook says 687. Which is right?
Both, to the precision each is quoting. NASA publishes Mars’ period as 686.980 days and its distance as 227.956 million km, and those two are not quite consistent under the two-body law — they differ by one part in ten thousand, partly the mass of Mars and partly rounding. “687 days” is correct; “1.88 years” is better.
Related calculators
References
- E. Mamajek et al., IAU 2015 Resolution B3 on Recommended Nominal Conversion Constants for Selected Solar and Planetary Properties, arXiv:1510.07674. Source of every GM and radius used here: nominal solar mass parameter 1.3271244 × 1020 m3 s−2, terrestrial 3.986004 × 1014, jovian 1.2668653 × 1017; nominal solar radius 6.957 × 108 m, terrestrial equatorial radius 6.3781 × 106 m, jovian equatorial 7.1492 × 107 m. The resolution is explicit that these are conversion factors fixed by convention, not measurements with uncertainties.
- International Astronomical Union, Resolutions of the XXVIIIth General Assembly, Beijing 2012, Resolution B2. Recommendation 1: “that the astronomical unit be re-defined to be a conventional unit of length equal to 149 597 870 700 m exactly”; Recommendation 5 fixes the symbol as
au. - NASA Goddard, National Space Science Data Coordinated Archive, Planetary Fact Sheet (Metric) and the individual planet fact sheets, curated by D. R. Williams, page updated 18 March 2025. Source of the semi-major axes, sidereal orbit periods, eccentricities and published synodic periods tabulated on this page.
nssdc.gsfc.nasa.gov/planetary/factsheet/ - Paris Observatory, Numerical standards and constants (IERS/EOP product centre). Sidereal year 365.256 363 004 mean solar days, after Simon et al., Astron. Astrophys. 282 (1994) 663; sidereal day 86 164.090 530 832 88 s exactly, after Aoki et al., Astron. Astrophys. 105 (1982) 359; geocentric gravitational constant 3.986 004 418(8) × 1014 m3 s−2.
- NCERT, Physics: Textbook for Class XI, Part I, the chapter “Gravitation”, which states all three of Kepler’s laws and derives the orbital and escape speeds from them. The chapter number differs between the pre-2023 edition and the rationalised one, and
ncert.nic.indisallows automated reading, so it is cited here by name only rather than by a number that could be wrong. - Cambridge Assessment International Education, Cambridge International AS & A Level Physics 9702 syllabus for examination in 2025, 2026 and 2027, version 1 (September 2022). Topic 13.2 asks candidates to “analyse circular orbits in gravitational fields by relating the gravitational force to the centripetal acceleration it causes”, and to understand that a geostationary orbit has “an orbital period of 24 hours”, lies above the Equator and runs west to east. The syllabus does not name Kepler’s third law.
