Orbital period calculator

How long is a year on another planet? Enter the size of an orbit and the mass of the star or planet at the centre to get the orbital period from Kepler’s third law.

For a circle, the radius. Mercury 0.387 AU, Mars 1.524 AU, Jupiter 5.20 AU
Leave at 0 unless it is a sizeable fraction of the central mass
Orbital period–
Average orbital speed–

See it for real: play Keep Them Orbiting or play Gravity Golf.

The formula

In 1619 Johannes Kepler found that the further a planet is from the Sun, the longer its year, in a very precise way: the square of the period is proportional to the cube of the orbit’s size. Newton later showed where the constant comes from:

T = 2π √(a³ / G(M + m))

T is the orbital period in seconds, a the semi-major axis (half the longest diameter of the ellipse, or simply the radius of a circular orbit) in metres, G = 6.674 × 10⁻¹¹ N·m²/kg², M the central mass and m the orbiting mass in kilograms. For planets around the Sun, m is tiny and in years and astronomical units the law becomes beautifully simple: T² = a³.

Why it works

Gravity weakens with the square of distance. A planet further out feels a weaker pull, so it must move more slowly to stay in orbit (speed falls as 1/√a), and it also has a longer path to cover (circumference grows as a). Multiply the longer path by the slower pace and the time grows as a1.5. Double the orbit size and the year becomes 2.83 times longer. The shape of the ellipse does not matter: a long thin orbit and a circle with the same semi-major axis take the same time.

The planets obey it

Planeta (AU)a³Period (years)T²
Mercury0.3870.0580.2410.058
Venus0.7230.3780.6150.378
Earth1.0001.0001.0001.000
Mars1.5243.541.8813.54
Jupiter5.203140.811.86140.7
Saturn9.53786729.45867
Neptune30.0727,190164.827,160

The last two columns match to within the rounding, from Mercury’s 88-day year to Neptune’s 165 years.

Weighing the Sun, and everything else

Turned round, Kepler’s law becomes a set of scales: M = 4π²a³ / G T². Earth’s 365.25-day orbit at 149.6 million km gives the Sun’s mass as 1.99 × 10³⁰ kg. The Moon’s 27.3-day orbit gives Earth’s mass. Stars racing around the centre of our galaxy, some with periods of only 16 years, show that it holds a black hole of about 4 million Sun masses. Astronomers find the masses of exoplanets’ stars and of double stars the same way.

Assumptions and limits

Everyday uses

Test Kepler’s law yourself in Keep Them Orbiting, where the notebook’s T²÷a³ column stays close to 1 for every world around the Sun and each world chimes at a pitch set by its period, or slingshot around planets in Gravity Golf.

Worked example

Mars orbits the Sun at an average distance of 1.524 AU (228 million km). How long is a Martian year?

Mass of the central star or planet1 Sun masses
Orbit size (semi-major axis)1.524 AU
Mass of the orbiting body (optional)0 Earth masses
Orbital period1.881 years
Average orbital speed24.13 km/s

About 1.88 Earth years, or 687 days. Because a Martian year is nearly twice ours, Earth overtakes Mars every 2 years and 2 months or so, which is why launch windows to Mars open only about every 26 months.

Frequently asked questions

What is Kepler’s third law?
The square of a planet’s orbital period is proportional to the cube of its average distance from the Sun. In years and astronomical units, T² = a³: Jupiter at 5.2 AU takes √(5.2³) = 11.9 years.
What is the formula for orbital period?
T = 2π√(a³/GM), with a the semi-major axis in metres, M the central mass in kg and G = 6.674 × 10⁻¹¹ N·m²/kg². For a satellite 7,000 km from Earth’s centre: T = 2π√((7×10⁶)³ / 3.986×10¹⁴) = 5,830 s, about 97 minutes.
How long is a year on each planet?
Mercury 88 days, Venus 225 days, Earth 365.25 days, Mars 687 days, Jupiter 11.9 years, Saturn 29.5 years, Uranus 84 years and Neptune 165 years.
Does the mass of the planet affect its orbital period?
Hardly, when it is small compared with the star. Strictly the formula uses the sum of both masses, but even Jupiter, the heaviest planet, is only 0.1% of the Sun’s mass, so its period changes by just 0.05%.
What orbital period does a geostationary satellite have?
One sidereal day, 23 hours 56 minutes 4 seconds, which needs an orbit radius of 42,164 km (35,786 km above the equator).
Does an elliptical orbit have a different period from a circular one?
Not if the semi-major axis is the same. Halley’s Comet has a very stretched orbit with a semi-major axis of about 17.8 AU, so its period is √(17.8³) ≈ 75 years, the same as a circular orbit at 17.8 AU.

Sources

Related calculators

Play it