Kepler’s laws are three rules for how planets orbit the Sun: each moves on an ellipse with the Sun at one focus, the Sun–planet line sweeps equal areas in equal times, and the period squared is proportional to the semi-major axis cubed. In years and astronomical units, T² = a³. Newton derived all three from gravity.
Earth is about 5 million kilometres closer to the Sun in early January than in early July, and it travels faster in January to match. Mercury’s swing is far wider, and a comet’s can carry it from inside Earth’s orbit to beyond Neptune’s. None of it is random.
Three short rules account for every one of those motions. Johannes Kepler extracted them from Tycho Brahe’s naked-eye observations, above all of Mars, long before anyone knew why they worked, and they still give each planet’s period to within a tenth of a per cent from the size of its orbit alone. This guide builds each law up with scale diagrams, JPL data for all eight planets, seven solved examples and a lab in which you can reshape an orbit yourself.
What Are Kepler’s Laws?
Kepler’s laws are three rules that fix a planet’s orbit completely: its shape, its changing speed and the time it takes to go round once. Stated in full, they read:
- First law, the law of ellipses. Every planet moves on an ellipse, with the Sun at one of the ellipse’s two foci rather than at its centre.
- Second law, the law of equal areas. The line joining the Sun to a planet sweeps out equal areas in equal intervals of time, so the planet speeds up as it nears the Sun and slows as it pulls away.
- Third law, the law of periods. The square of the orbital period T is proportional to the cube of the semi-major axis a, the orbit’s half-length. For anything circling the Sun, with T in years and a in astronomical units, T² = a³.
Each law answers a different question. The first draws the track, the second sets the timetable along it, and the third tells you how long one lap takes. That third answer depends on the size of the orbit and the mass of the star and on nothing else: stretch a circle into a long, thin ellipse with the same semi-major axis and the year does not get a second longer.
Kepler found these rules in data, not in theory. The explanation came decades later from Isaac Newton, whose laws of motion, combined with an inverse-square pull of gravity, turn all three into consequences of a single force. The same rules therefore govern moons, artificial satellites and planets round other stars, provided you swap in the mass of whatever sits at the focus; for binary stars, whose masses are comparable, M becomes the sum of the two (see Newton’s correction below).
The Formulas Behind Kepler’s Laws
Each law has a compact mathematical form. The first is the equation of an ellipse measured from the Sun, which gives the distance r at every angle θ round the orbit, together with the two extreme distances:
The second law says the area A swept by the Sun–planet line grows at a steady rate, covering the whole ellipse, of area πab, once per period:
The third law, in the form Newton gave it, links the period to the semi-major axis and the central mass:
| Symbol | Quantity | SI unit | Notes |
|---|---|---|---|
| r | distance from the Sun (the occupied focus) to the planet | m | changes all the way round an elliptical orbit |
| θ | angle of the planet from perihelion, measured at the Sun | rad (or °) | 0 at perihelion, 180° at aphelion |
| a | semi-major axis | m | half the ellipse’s longest diameter; also the average of q and Q |
| b | semi-minor axis | m | b = a × sqrt(1 – e²) |
| e | eccentricity | none | 0 for a circle; between 0 and 1 for an ellipse |
| q | perihelion distance, the closest approach | m | q = a(1 – e) |
| Q | aphelion distance, the farthest point | m | Q = a(1 + e) |
| A | area swept by the Sun–planet line | m² | grows at the same rate all the way round |
| T | orbital period | s | years are handier for planets |
| G | gravitational constant | N m² kg-2 | 6.67430 × 10-11 (CODATA) |
| M | mass of the central body | kg | about 1.988 × 1030 kg for the Sun |
To solve the third law for whichever of T, a or M you are missing, such as a moon’s period from its distance or a star’s mass from a planet’s year, use the Kepler’s third law calculator, which takes AU, kilometres, days and solar masses as readily as SI units.
Round the Sun the constants disappear. A year is Earth’s period, and an astronomical unit is Earth’s semi-major axis to within three parts in a million, so 4π²/(GM) for the Sun comes out as 1 year2 per AU3 to about four parts in 100,000. The third law becomes the version the planet table and the lab use:
Around a star of M solar masses it becomes T² = a³/M, so a star twice as heavy as the Sun carries a planet round a 1 AU circle in 0.7071 years. A common student slip is to use a satellite’s height above the ground, or an orbit’s full diameter, as a. Orbital distances are measured from the centre of the body being orbited, so for a satellite in a circular orbit a is the planet’s radius plus the altitude.
The lab below puts all three laws on one screen. It opens on an orbit with a = 1 AU and e = 0.5 round a star of one solar mass: the period reads 1.000 years, the planet passes perihelion at 51.59 km/s and aphelion at 17.20 km/s, and the ellipse is cut into 8 sectors of 0.3401 AU2 each, every one swept in 45.66 days.
Drag the eccentricity slider and the shape and the speeds change while the period stays where it is. Drag the semi-major axis and the orbit’s marker slides along the gold line of the log–log chart, and the planet buttons load JPL’s semi-major axis and eccentricity for Mercury through Neptune.
Kepler’s First Law: What Is an Elliptical Orbit?
An elliptical orbit is a closed, stretched loop in which the planet’s distance from the Sun changes all the way round (unless e = 0), because the Sun sits at one focus of the ellipse, not at its centre. The other focus is an empty point in space.
You can draw one with two drawing pins and a loop of string. Push the pins into a board, drop the loop over them, pull it taut with a pencil and go round: the pencil traces an ellipse, because its two distances from the pins always add up to the same length. Each pin is a focus, and in a planetary orbit the Sun occupies one of them.
Eccentricity measures the stretch. It is the Sun’s offset from the centre as a fraction of the semi-major axis, e = c/a, and every closed orbit has a value from 0 up to, but not including, 1. A circle is simply the ellipse with e = 0, both foci merged at the centre, which makes it a special case of the first law rather than an exception to it.
Real planetary orbits are far rounder than Figure 1. An ellipse’s flattening grows roughly as e²/2 while the Sun’s offset grows as e itself, so a small eccentricity shows up as an off-centre Sun long before the loop looks squashed. For Earth, at e = 0.0167, the short axis is just 0.014 % shorter than the long one, yet the Sun sits 2.5 million km from the centre.
Mercury, the most eccentric planet at e = 0.2056, makes the point sharply. Its orbit is only about 2 % narrower than it is long, but its distance from the Sun swings from 0.3075 AU at perihelion to 0.4667 AU at aphelion. Press the lab’s Mercury button and the Sun sits visibly off-centre in an orbit that still looks almost round.
Kepler’s Second Law: Why Do Planets Speed Up Near the Sun?
Planets speed up near the Sun because the Sun–planet line must sweep equal areas in equal times: close in, that line is short, so the planet has to cover a longer stretch of its orbit to sweep the same area. Far out, a long line sweeps area quickly, and the planet can crawl.
Why should the areas match? Gravity pulls straight along the line to the Sun, and a force along that line exerts no torque about the Sun, so the planet’s angular momentum cannot change. The rate at which the line sweeps out area is exactly half the angular momentum per unit mass, which makes equal areas in equal times conservation of angular momentum written in geometry.
At perihelion and aphelion the planet moves at right angles to the Sun–planet line, which gives a clean result: q × vp = Q × va, where vp and va are the speeds at the two points. The speed ratio is therefore fixed by the eccentricity alone:
Earth’s ratio is only 1.034: about 30.29 km/s in early January against 29.29 km/s in early July. Mercury’s is 1.518, and its angular velocity changes even more, because at the two ends ω = v/r and both factors pull the same way, making ω about 2.3 times higher at perihelion than at aphelion.
Energy tells the same story. Falling inwards towards perihelion, the planet converts gravitational potential energy into kinetic energy; climbing back out, it pays that kinetic energy back. The vis-viva equation gives the speed at any distance r:
Put r = q for Earth and it returns 30.29 km/s. Put r = a and it collapses to the circular-orbit speed sqrt(GM/a), which is 29.78 km/s at 1 AU from the Sun.
Kepler’s Third Law: Why Do Outer Planets Take So Long?
Outer planets take so long because two effects multiply: a bigger orbit is a longer path, and gravity that far out is weaker, so the planet also moves more slowly along it. Together they make the period grow as a1.5, faster than the orbit’s size.
Neptune shows the arithmetic. Its orbit is 30.07 times the size of Earth’s and its speed is sqrt(30.07) = 5.48 times lower, so one lap takes about 30.07 × 5.48 = 164.8 years. The table puts the law to the test against the measured periods of all eight planets.
| Planet | Semi-major axis a (AU) | Eccentricity e | Measured period T (years) | Kepler’s T = a1.5 (years) | T²/a³ (years2/AU3) |
|---|---|---|---|---|---|
| Mercury | 0.38709927 | 0.2056 | 0.240847 | 0.240843 | 1.00003 |
| Venus | 0.72333566 | 0.0068 | 0.615197 | 0.615191 | 1.00002 |
| Earth | 1.00000261 | 0.0167 | 1.00002 | 1.00000 | 1.00003 |
| Mars | 1.52371034 | 0.0934 | 1.88085 | 1.88085 | 1.00000 |
| Jupiter | 5.20288700 | 0.0484 | 11.8626 | 11.8677 | 0.999142 |
| Saturn | 9.53667594 | 0.0539 | 29.4480 | 29.4507 | 0.999817 |
| Uranus | 19.18916464 | 0.0473 | 84.0175 | 84.0590 | 0.999014 |
| Neptune | 30.06992276 | 0.0086 | 164.790 | 164.892 | 0.998772 |
The semi-major axes, eccentricities and measured periods come from JPL’s Approximate Positions of the Planets, a fit of each planet’s orbital elements valid from 1800 to 2050; each period is worked out from the rate at which those elements carry the planet round its orbit. In every row T²/a³ comes out within 0.13 % of 1, and the measured period lies within 0.07 % of a1.5.
Plotting on logarithmic axes is the standard way to test a power law, because any power law becomes a straight line whose slope is the power. Doubling the semi-major axis anywhere on the chart multiplies the period by 21.5 = 2.828, and that fixed ratio is what makes the line straight. Set a = 4 AU and e = 0 in the lab and the period reads 8.000 years, two doublings from Earth’s orbit.
How Did Newton Explain Kepler’s Laws?
Newton explained Kepler’s laws by showing that they follow from an inverse-square pull of gravity towards the Sun combined with his laws of motion: that one force produces elliptical orbits, equal areas in equal times and T² proportional to a³.
From Tycho’s measurements to Kepler’s rules
For centuries astronomers had built the heavens out of circles. Kepler worked from the most accurate observations of his day, made by the Danish astronomer Tycho Brahe, and spent years trying to fit Mars to a circular orbit, only to miss by margins that Tycho’s data would not allow.
Mars was the right planet to be stuck on. With an eccentricity of 0.093, more than five times Earth’s, its orbit is too far from a Sun-centred circle for the old schemes to hide the error. Kepler published the first two laws in 1609 and the third in 1619, and NASA’s Orbits and Kepler’s Laws page tells how he came to work alongside Tycho in Prague.
The circular-orbit derivation
The third law drops out in three lines for a circular orbit of radius r, the special case covered in our guide to circular motion. Gravity, as Newton’s law of gravitation gives it, supplies the centripetal force:
- Gravity provides the centripetal force: GMm/r² = mv²/r, so v² = GM/r.
- One lap of length 2πr takes a time T, so v = 2πr/T and v² = 4π²r²/T².
- Setting the two expressions for v² equal gives GM/r = 4π²r²/T², which rearranges to T² = 4π²r³/(GM).
For an ellipse the same result holds with r replaced by the semi-major axis a, although showing it takes calculus. Notice what cancelled in the first line: the planet’s own mass. A pebble and a gas giant at the same distance from the Sun would share a period, to far better accuracy than Kepler could measure.
The other two laws come from the same force. Because gravity points at the Sun it exerts no torque, which gives the second law, as the equal-areas section showed. And Newton proved that an inverse-square force produces orbits shaped as conic sections: ellipses for bodies bound to the Sun, parabolas and hyperbolas for bodies moving fast enough to escape, so the first law is the bound case.
Newton also sharpened the third law. Strictly, the Sun and the planet both orbit their common centre of mass, and the M in T² = 4π²a³/(GM) should be M + m, the sum of the two masses. For planets the correction is tiny, as the final section shows, but for two stars of similar mass it matters a great deal.
Real-World Examples: Kepler’s Laws Beyond the Planets
The laws apply to any small body orbiting a much heavier one, which is why engineers and astronomers lean on them daily. Replace the Sun’s mass with Earth’s, Jupiter’s or another star’s, and the same three rules hold.
Geostationary satellites
A satellite that hovers over one spot on the equator must orbit in exactly one sidereal day, 86,164.1 s, the time Earth takes to turn once relative to the stars. The third law then allows a single radius, 42,164 km from Earth’s centre, which is 35,786 km above the equator. Problem 5 works it through.
Weighing the Sun, planets and black holes
Turn the third law round and an orbit becomes a weighing scale: M = 4π²a³/(GT²). Earth’s orbit gives the Sun’s mass, about 1.988 × 1030 kg (Problem 4), and the orbit of any moon gives the mass of its planet. Applied to stars circling the centre of our galaxy, the same method is how astronomers weigh the black hole there.
Planets round other stars
For many exoplanets the period is the first number astronomers measure, from the regular dip in starlight as the planet crosses its star or from the star’s periodic wobble. Combined with the star’s mass, the third law then gives the orbit’s size: a planet on a 16.3-day orbit round a star of half the Sun’s mass must sit about 0.1 AU out, far closer in than Mercury (Problem 6).
Comets and spacecraft
Comets follow long, thin ellipses. A comet whose orbit reaches in to 0.5 AU and out to 35 AU has a = 17.75 AU, a period of about 75 years and a perihelion speed 70 times its aphelion speed (Problem 7). Spacecraft ride the same kind of curve: an idealised transfer from Earth to Mars is half an ellipse touching both orbits, with a = (1 + 1.524)/2 = 1.262 AU, so the one-way trip takes half of 1.2621.5 years, about 259 days, if you ignore the planets’ eccentricities.
Common Misconceptions About Kepler’s Laws
Misconception 1: the seasons come from Earth’s changing distance
Earth is closest to the Sun in early January, in the middle of the northern winter. Its distance varies by only 3.4 % over the year, changing the sunlight it receives by about 7 %, while the seasons come from the tilt of Earth’s axis, which is why they are reversed between the two hemispheres.
Misconception 2: the Sun sits at the centre of the orbit
The Sun sits at a focus, and the centre of the ellipse is an empty point. For Earth the gap is 2.5 million km; for Mercury it is 20.6 % of the semi-major axis, about 0.08 AU.
Misconception 3: a more stretched orbit takes longer
The period depends only on the semi-major axis and the central mass, never on the eccentricity. In the lab, set a = 1 AU and drag e from 0 to 0.9: the orbit turns from a circle into a thin loop reaching out to 1.9 AU, the speed ratio climbs to 19.00, and the period stays at 1.000 years throughout.
Misconception 4: heavier planets go round faster
Only by a hair: in the simple circular-orbit derivation the planet’s mass cancels out, and Newton’s correction, M + m in place of M, is tiny for planets. A pebble at Jupiter’s distance would take 11.868 years to go round, less than 0.05 % longer than Jupiter’s measured 11.8626 years, and Jupiter’s own mass, about a thousandth of the Sun’s, accounts for a difference of about that size. Distance from the Sun, not mass, is what sets a planet’s pace.
Where Kepler’s Laws Are Only Approximate
Kepler’s laws are exact only for two bodies alone in space, so every real orbit departs from them slightly. For the planets the departures are small but measurable, and each has a known cause.
- The planet’s own mass. The third law really reads T² = 4π²a³/(G(M + m)). Jupiter has about a thousandth of the Sun’s mass, which shortens its period by about 0.05 %, in line with the 0.04 % gap between its measured 11.8626 years and the 11.8677 years that T = a1.5 gives.
- Tugs from the other planets. Each planet perturbs the rest, so real orbits slowly change shape and orientation; JPL’s elements are an approximate fit, valid only from 1800 to 2050, that include slow drift rates. The 0.05 to 0.06 % gaps for Uranus and Neptune, whose masses are far too small to explain them, come from effects like these and from the approximate fit itself.
- Mercury’s creeping perihelion. Mercury’s closest point slowly rotates round the Sun. The other planets’ pulls explain most of this advance; the rest was explained only by Einstein’s general relativity, in which gravity departs slightly from the pure inverse-square law.
- Unbound paths. The laws describe closed orbits with e below 1. A body moving fast enough to escape follows a parabola or a hyperbola and never returns, so it has no period at all; the lab’s eccentricity slider stops at 0.975.
- Tilted orbits. Each planet’s orbit is tipped slightly relative to the others. The laws hold within each orbit’s own plane, which is why diagrams and the lab draw every orbit flat.
The lab computes each period from the third law itself, with the planet’s mass ignored, so for the outer planets its readout runs a few hundredths of a per cent longer than the measured values in the table: 11.87 years for Jupiter against 11.8626. The difference is the physics of this section, not an error in either number.