Kepler's Laws of Planetary Motion

Shape an orbit, watch the planet speed up near the Sun and sweep equal areas, and check that T² is proportional to a³

Beginner

Interactive simulation

1.00 AU
0.500
1.0 M☉

Presets (around the Sun)

Playback

Equal-area wedges

Period T
1.00 yr
Time
0.00 yr
Distance r
0.500 AU
Speed
51.59 km/s
Perihelion a(1 − e)
0.500 AU
Aphelion a(1 + e)
1.50 AU
T² / a³
1.000 yr²/AU³
Area per wedge
0.227 AU²
  • Star at one focus
  • Planet
  • Velocity (length ∝ speed)
  • Area swept in T/12, alternating colours

The position comes from solving Kepler’s equation E − e sin E = 2πt/T at every frame, and speed from the vis-viva equation, so the motion is exact rather than approximate. T²/a³ equals 1/M in years, AU and solar masses, so it reads 1.000 for anything orbiting the Sun. The animation plays one orbit in 12 seconds at 1× whatever the real period.

Kepler’s third law for the eight planets

Every planet lands on the dashed line T² = a³. The blue ring is the orbit you have set.

0.010.011110010010⁴10⁴a³ (AU³), log scaleT² (yr²)MercuryVenusEarthMarsJupiterSaturnUranusNeptuneYour orbit: a³ = 1.00, T² = 1.00, M = 1.0

How Kepler’s laws work

In 1609 and 1619 Johannes Kepler published three rules that describe how planets move, worked out from Tycho Brahe’s careful observations of Mars. Seventy years later Isaac Newton showed that all three follow from a single law: gravity pulling toward the Sun with a strength that falls off as 1/r².

First law. Every orbit is an ellipse with the Sun at one focus. The other focus is empty. Eccentricity e measures how stretched the ellipse is: 0 is a circle, values near 1 are long and thin like a comet’s orbit.

Second law. The line from the Sun to the planet sweeps out equal areas in equal times. Near the Sun the line is short, so the planet must move fast to cover the same area; far away it moves slowly. This is conservation of angular momentum.

Third law. The square of the period is proportional to the cube of the semi-major axis. In years, astronomical units and solar masses, T² = a³/M, so for anything orbiting the Sun T² = a³ exactly.

  1. 1
    Drag Eccentricity e from 0 upward and watch the star move away from the centre of the ellipse toward one end.
  2. 2
    Press Play and compare the Speed readout at perihelion and aphelion. The ratio is (1 + e)/(1 − e).
  3. 3
    Turn on Equal-area wedges. Every wedge takes T/12 to sweep and has the same area, shown under Area per wedge.
  4. 4
    Change a and M and read T² / a³. It stays at 1/M no matter what shape or size the orbit is.
  5. 5
    Try the presets. Earth’s orbit looks almost circular; Halley’s Comet is a long, thin ellipse.

Key formulas

Shape of the ellipse

perihelion q = a(1 − e),  aphelion Q = a(1 + e),  b = a√(1 − e²)

a
semi-major axis, half the longest diameter (AU)
e
eccentricity, 0 for a circle, below 1 for any ellipse
b
semi-minor axis

Each focus sits a distance ae from the centre, so the two foci are 2ae apart.

Kepler’s third law

T² = a³ / M  (years, AU, solar masses),  in SI: T² = 4π² a³ / (GM)

T
orbital period in years
M
mass of the star in solar masses
G
gravitational constant, 6.674 × 10⁻¹¹ N m² kg⁻²

Speed anywhere on the orbit (vis-viva)

v² = GM (2/r − 1/a)

r
current distance from the star

At perihelion and aphelion this gives v_peri / v_aph = (1 + e)/(1 − e). For Earth, GM of the Sun gives v = 2π AU per year = 29.8 km/s on a circle of radius 1 AU.

Where the planet is at time t (Kepler’s equation)

E − e sin E = 2πt / T,  x = a(cos E − e),  y = b sin E

E
eccentric anomaly, an angle measured from the centre of the ellipse

There is no closed-form solution for E, so the simulation solves it with Newton’s method every frame. The star is at the origin and t = 0 at perihelion.

Worked example: Halley’s Comet

Halley’s Comet has a = 17.83 AU and e = 0.967. How long is its year, and how much does its speed change?

  1. 1
    Perihelion q = 17.83 × (1 − 0.967) = 0.588 AU, inside the orbit of Venus.
  2. 2
    Aphelion Q = 17.83 × (1 + 0.967) = 35.07 AU, beyond Neptune at 30.07 AU.
  3. 3
    Period T = √(17.83³) = √5668 = 75.3 years. It last passed the Sun in 1986 and returns in 2061.
  4. 4
    Perihelion speed from vis-viva: v = 29.8 × √(1.967 / 0.588) km/s ≈ 54.5 km/s.
  5. 5
    Aphelion speed is smaller by (1 − e)/(1 + e) = 0.033 / 1.967, giving about 0.91 km/s: some 60 times slower.

Check it in the visualizer

Press the Halley’s Comet preset. The readouts show Period T 75.29 yr, Perihelion 0.588 AU and Aphelion 35.07 AU, and the canvas labels give the two speeds.

The third law for the planets

Semi-major axis a in AU and period T in years. T² / a³ comes out at 1 for every planet, because they all orbit the same star.

Planeta (AU)T (yr)a³T²T² / a³
Mercury0.3870.2410.057960.058081.002
Venus0.7230.6150.37790.37821.001
Earth1.0001.0001.0001.0001.000
Mars1.5241.8813.5403.5381.000
Jupiter5.20311.862140.9140.70.999
Saturn9.53729.457867.4867.71.000
Uranus19.19184.011706870580.999
Neptune30.070164.7902.719e+42.716e+40.999

Why the ellipse looks off-centre

A common mistake is to draw the Sun at the centre of the orbit. It is at a focus, a distance ae from the centre. For Earth, ae is only 0.017 AU, which is why Earth’s orbit looks like a circle and why seasons are caused by axial tilt, not distance.

Real-world applications

Satellite orbits

Engineers use T² ∝ a³ (with Earth’s mass in place of the Sun’s) to place satellites: a 24-hour geostationary orbit needs a radius of about 42,160 km.

GPS constellation

GPS satellites orbit with a period of half a sidereal day, about 11 h 58 min, which fixes their orbit radius at about 26,560 km.

Transfer orbits

A Hohmann transfer from Earth to Mars is half an ellipse touching both orbits. Kepler’s third law gives its flight time: about 259 days.

Weighing stars and planets

Measure a moon’s or planet’s period and orbit size and T² = a³/M gives the mass of what it orbits. That is how we know the masses of Jupiter and of distant stars.

Finding exoplanets

A transiting planet’s period comes from the time between dips in starlight. With the star’s mass, Kepler’s third law gives its distance from the star.

Predicting comets

Edmond Halley used Kepler’s laws to predict that the comet of 1682 would return in 1758. It did, and now carries his name.

Practice problems

Problem 1: Ceres’ year

The dwarf planet Ceres orbits the Sun with a semi-major axis of 2.77 AU. How long is its year?
Show solution

T² = a³ = 2.77³ = 21.25

T = √21.25

about 4.61 years

Problem 2: A comet’s orbit

A comet comes within 0.5 AU of the Sun at perihelion and reaches 35.5 AU at aphelion. Find a, e, its period, and how many times faster it moves at perihelion than at aphelion.
Show solution

a = (q + Q)/2 = (0.5 + 35.5)/2 = 18 AU

e = (Q − q)/(Q + q) = 35/36 = 0.972

T = √(18³) = √5832 = 76.4 years

v_peri / v_aph = Q / q = 35.5 / 0.5

a = 18 AU, e = 0.972, T = 76.4 yr, 71 times faster

Problem 3: A planet around a smaller star

An exoplanet orbits a star of 0.5 solar masses once every 0.25 years (about 91 days). How far is it from its star?
Show solution

a³ = M T² = 0.5 × 0.25² = 0.03125

a = ∛0.03125

about 0.315 AU

Spotted a mistake on this page?

Wrong formula, broken animation or confusing wording. Tell us and we will fix it.