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.
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
| Planet | a (AU) | a³ | Period (years) | T² |
|---|---|---|---|---|
| Mercury | 0.387 | 0.058 | 0.241 | 0.058 |
| Venus | 0.723 | 0.378 | 0.615 | 0.378 |
| Earth | 1.000 | 1.000 | 1.000 | 1.000 |
| Mars | 1.524 | 3.54 | 1.881 | 3.54 |
| Jupiter | 5.203 | 140.8 | 11.86 | 140.7 |
| Saturn | 9.537 | 867 | 29.45 | 867 |
| Neptune | 30.07 | 27,190 | 164.8 | 27,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
- Only two bodies are counted. Other planets tug slightly, which is how Neptune was discovered in 1846 from the wobbles it caused in Uranus’s orbit.
- The orbiting mass is included in the formula, so you can use it for double stars or Pluto and Charon, where it matters. For planets around the Sun it changes the answer by less than 0.1%.
- This is the sidereal period, relative to the stars. The time between two full moons (29.5 days) is longer than the Moon’s 27.3-day orbit because Earth has moved round the Sun in the meantime.
- Newtonian gravity is assumed, which is excellent everywhere except very close to black holes and neutron stars.
Everyday uses
- Satellites: to orbit once a day and hover over one spot, a satellite must sit 42,164 km from Earth’s centre. Try it: 1 Earth mass, 42,164 km.
- Space missions: a transfer orbit to Mars has a semi-major axis of about 1.26 AU, so the half-orbit journey takes about 259 days.
- Exoplanets: a planet found circling its star every 4 days, as many “hot Jupiters” do, must be about 0.05 AU away, far closer than Mercury is to the Sun.
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 planet | 1 Sun masses |
|---|---|
| Orbit size (semi-major axis) | 1.524 AU |
| Mass of the orbiting body (optional) | 0 Earth masses |
| Orbital period | 1.881 years |
| Average orbital speed | 24.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
- Kepler’s laws of planetary motion, Wikipedia
- Planetary Fact Sheet, NASA
- Kepler’s laws, HyperPhysics
- Orbital period, Wikipedia
Related calculators
- Orbital Velocity Calculator: How fast does a satellite have to go to stay up? Pick the planet and the height of the orbit to get the circular orbital speed and the time for one lap.
- Escape Velocity Calculator: How fast would you have to throw something to make it never come back? Enter the mass of a planet and your distance from its centre to get the escape velocity.
- Gravitational Force Calculator: How hard do two masses pull on each other? Enter the masses and the distance between their centres to get the gravitational force from Newton’s law.
- Pendulum Period Calculator: How long does a pendulum take to swing there and back? Enter its length, and its swing angle if it swings wide, to get the period and frequency.
Checked against the sources above. Last reviewed 2026-11-11. Calculators give estimates from standard formulas; see our disclaimer.

