Free simulation
Orbits and Kepler's laws simulator
Stretch an orbit, change the central mass and see equal areas swept out in equal times.
- Time since perihelion
- —
- Distance from the star r
- —
- Speed v (vis-viva)
- —
- Period P = √(a³/M)
- —
- Perihelion: distance, speed
- —
- Aphelion: distance, speed
- —
- Speed ratio perihelion/aphelion
- —
One orbit takes 10 seconds on screen, whatever the real period. The settings are saved in the page address, so you can share a link to an exact setup.
What’s happening
Kepler’s three laws describe how planets move:
- Orbits are ellipses with the star at one focus. The shape is set by the eccentricity : the closest distance is and the farthest is .
- A planet sweeps out equal areas in equal times, so it moves fastest near the star.
- The period depends only on the semi-major axis and the central mass. In units of years, AU and solar masses: .
To find where a planet is at a given time, solve Kepler’s equation for the eccentric anomaly :
where the mean anomaly grows uniformly with time. There is no closed-form solution, but Newton’s method converges quickly from the starting guess . Then , and the speed follows from the vis-viva equation:
Assumptions and limits. Two bodies only, with the planet’s mass negligible compared with the star’s. Other planets cause small perturbations that this model ignores.
Try this
- Mars. Mars orbits the Sun at AU. What is its period?
Answer
years. - Earth’s speed. Earth has AU and . Find its speed at perihelion and aphelion.
Answer
AU gives km/s; AU gives km/s. - Solve Kepler’s equation. For and rad, find and .
Answer
rad, so . The true anomaly is about . - Heavier star. A planet orbits a star at 1 AU. How long is its year?
Answer
years.
Learn this with a tutor
More free simulations
Want help with this topic?
A 30-minute trial costs €10. We set goals and you see how we teach. After that, lessons are €30 for 60 minutes, or less with a pack.