Kepler's Third Law Calculator
Find the orbital period of a planet or satellite from the size of its orbit, or the orbit size from the period.
What it does
Kepler worked out the pattern of the planets from Tycho Brahe's observations, without knowing why it was true. The third law is the part that still gets used every day: the square of the time of one orbit is proportional to the cube of the size of the orbit, and that is enough to predict a period from a distance, or a distance from a period.
The NASA page describes the law in exactly that form. The orbital period of a planet, squared, is directly proportional to the semi-major axis of its orbit, cubed, and the effect is dramatic: Mercury takes 88 days and Earth takes 365, while Saturn needs 10,759 days for the same trip. The NASA learning page puts the same idea for two bodies revolving around each other, where the constant comes from the total mass of the pair.
Newton supplied the missing why. The University of Virginia notes derive the law from the two conservation laws, and the result is the period squared equals four pi squared times the cube of the semi-major axis divided by the product of the gravitational constant and the total mass. That is why the constant of the law depends on the central body and on nothing else.
This page runs that relation in both directions. Give it the central body and either the size of the orbit or the length of one period, and it returns the other one, along with the mean speed around the orbit, the length of the orbit and the constant of the law for that body.
The limits are worth stating. The law describes the average orbit and the average period, so a real planet that is pulled around by other planets does not follow it exactly. It also assumes the orbit is a closed ellipse with the central body at one focus, and it says nothing about the shape of that ellipse, which is the first law.
How to use
- Pick the body the orbit goes around. A planet going round the Sun uses the Sun, and a satellite of the Earth uses the Earth.
- Say whether you know the size of the orbit or the length of one period.
- Enter the semi-major axis in astronomical units, or the period in days.
- Read the orbital period, which comes out in days and in years.
- Read the mean speed around the orbit, which is what a mission planner needs for a flyby.
- Read the constant of the law for that body, which lets you check a period you already know.
Formula
- T
- Orbital period of one trip round the central body.
- a
- Semi-major axis, half the length of the long axis of the elliptical orbit.
- G M
- Gravitational constant times the mass of the central body, which is the constant of the law for that body.
The mean speed around the orbit is the length of the orbit divided by the period, and the length of the orbit is two pi times the semi-major axis. The constant of the law, the period in years squared over the axis in astronomical units cubed, is one for the Sun because of how the astronomical unit and the year are defined, and it is different for every other central body.
Worked example
Example: an orbit of 1 astronomical unit round the Sun
Defaults: the Sun as the central body, the size of the orbit known, and a semi-major axis of 1 AU.
- One astronomical unit is 149.6 million km, so the semi-major axis is 149,598 thousand km.
- The product of the gravitational constant and the mass of the Sun is 1.32712e11 km cubed per second squared.
- The period is 2 pi times the square root of 149,598,000 cubed over 1.32712e11, which is 3.15581e7 s.
- That is 365.257 days, which is 1.00002 years, a little longer than the calendar year because the year is defined by the seasons rather than by the orbit.
- The orbit is 2 pi times 149,598,000 km, which is 939.9511 million km, so the mean speed is 29.7847 km per s.
- The constant of the law, the period in years squared over the axis in astronomical units cubed, works out at 1.000038.
- The tool shows 365.257 days, 1.00002 years, 1.00000 AU, 149,598 thousand km, 29.7847 km per s, 939.9511 million km and 1.000038.
Reference table
| Planet | Semi-major axis | Orbital period | Mean speed |
|---|---|---|---|
| Mercury | 0.38710 AU | 87.970 days | 47.8720 km per s |
| Venus | 0.72333 AU | 224.700 days | 35.0207 km per s |
| Earth | 1.00000 AU | 365.257 days | 29.7847 km per s |
| Mars | 1.52371 AU | 686.992 days | 24.1291 km per s |
| Jupiter | 5.20440 AU | 4,336.651 days | 13.0559 km per s |
Limits
- The law gives the average orbit and the average period, so a planet pulled around by its neighbours does not follow it exactly.
- It assumes a closed ellipse with the central body at one focus, and it says nothing about the eccentricity of that ellipse.
- For a body that is not a point, the mass of the orbiting pair is used rather than the mass of the central body alone, which is why the Moon needs the Earth and the Moon together.
- Relativistic corrections matter for orbits very close to a compact object, and the law is not valid there.
Common mistakes
- Using the distance from the planet to the Sun at one moment instead of the semi-major axis, which is the average over the whole orbit.
- Mixing up kilometres and astronomical units, which changes the cube of the distance and so the period by a huge factor.
- Using the mass of the central body alone for a satellite, where the mass of the satellite matters too.
- Forgetting that the constant of the law is different for every central body, so the familiar T squared equals a cubed only works for the Sun.
- Expecting the law to give the orbit shape. It gives the period and the average distance, and the shape is the separate first law.
Try it yourself
Quick checks. Answers sit tucked under each question.
How long does a year on Mars last?
686.992 days. Mars orbits at 1.52371 AU, and the period grows with the axis to the power of one and a half, so 1.52371 raised to 1.5 gives 1.8809 years, which is 686.992 days. Its mean speed is 24.1291 km per s.
What is the period of the Moon around the Earth?
27.292 days, which is the 27.3 days everybody knows. The Moon sits at 0.00257 AU, which is 384 thousand km, and the calculation uses the Earth and the Moon together because the two of them orbit their common centre of mass.
How much longer does Neptune take than Earth?
Neptune orbits at 30.07 AU, and 30.07 raised to 1.5 is about 164.8 years, so one lap of Neptune takes 60,228 days against the 365.257 days of the Earth. The mean speed is 5.4316 km per s, which is much slower than the Earth because the orbit is so much longer.
Questions
What is Kepler's third law?
The square of the orbital period is proportional to the cube of the semi-major axis. The NASA page writes it as p squared equals a cubed for a planet going round the Sun.
What is the semi-major axis?
Half the length of the long axis of the elliptical orbit, and for most orbits close to the average distance from the central body. The NASA page calls it the semi-major axis and notes that it is the size of the orbit in the third law.
Why does the constant of the law depend on the central body?
Because it comes from the product of the gravitational constant and the mass of that body, so a heavier central body pulls harder and the same orbit is completed faster.
Does the law work for the Moon?
Yes, with the Earth and the Moon treated as a pair. The NASA learning page explains that the two bodies revolve around their common barycentre, and that is the mass that appears in the constant.
Why is a year 365.25 days rather than the 365.257 the calculation gives?
Because the calendar year is tied to the seasons and the length of the solar year, and the orbit of the Earth is not quite a circle, so the two drift apart slightly over the centuries.
What does the law not tell me?
The shape of the orbit, which is Kepler's first law, nor the direction the planet is moving at a given moment, which is the second law, nor why the orbit is there at all.
Sources
- NASA Science: orbits and Kepler's laws, with the third law and the periods of the planets
- NASA learning: gravity and mechanics, with Kepler's laws for two bodies in mutual orbit
- University of Virginia physics: elliptic orbits, with the derivation of the period relation