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³
Interactive simulation
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.
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.
- 1Drag Eccentricity e from 0 upward and watch the star move away from the centre of the ellipse toward one end.
- 2Press Play and compare the Speed readout at perihelion and aphelion. The ratio is (1 + e)/(1 − e).
- 3Turn on Equal-area wedges. Every wedge takes T/12 to sweep and has the same area, shown under Area per wedge.
- 4Change a and M and read T² / a³. It stays at 1/M no matter what shape or size the orbit is.
- 5Try 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?
- 1Perihelion q = 17.83 × (1 − 0.967) = 0.588 AU, inside the orbit of Venus.
- 2Aphelion Q = 17.83 × (1 + 0.967) = 35.07 AU, beyond Neptune at 30.07 AU.
- 3Period T = √(17.83³) = √5668 = 75.3 years. It last passed the Sun in 1986 and returns in 2061.
- 4Perihelion speed from vis-viva: v = 29.8 × √(1.967 / 0.588) km/s ≈ 54.5 km/s.
- 5Aphelion 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
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.
| Planet | a (AU) | T (yr) | a³ | T² | T² / a³ |
|---|---|---|---|---|---|
| Mercury | 0.387 | 0.241 | 0.05796 | 0.05808 | 1.002 |
| Venus | 0.723 | 0.615 | 0.3779 | 0.3782 | 1.001 |
| Earth | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 |
| Mars | 1.524 | 1.881 | 3.540 | 3.538 | 1.000 |
| Jupiter | 5.203 | 11.862 | 140.9 | 140.7 | 0.999 |
| Saturn | 9.537 | 29.457 | 867.4 | 867.7 | 1.000 |
| Uranus | 19.191 | 84.011 | 7068 | 7058 | 0.999 |
| Neptune | 30.070 | 164.790 | 2.719e+4 | 2.716e+4 | 0.999 |
Why the ellipse looks off-centre
Real-world applications
Satellite orbits
GPS constellation
Transfer orbits
Weighing stars and planets
Finding exoplanets
Predicting comets
Practice problems
Problem 1: Ceres’ year
Show solutionHide solution
T² = a³ = 2.77³ = 21.25
T = √21.25
about 4.61 years
Problem 2: A comet’s orbit
Show solutionHide 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
Show solutionHide 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.