Orbit simulator
Free orbit simulator: change distance, eccentricity and star mass and watch Kepler’s laws in action — orbital period, speed and closest approach update live.
Your experiment
How it works
In astronomical units, solar masses, and Earth years, Kepler’s third law connects the size of an orbit to its period. Increasing eccentricity stretches the orbit without changing its period when the semi-major axis stays fixed.
Kepler’s Third Law Explained (P² = a³) ↗About this model
An isolated star and a negligible-mass planet in a fixed, two-dimensional Keplerian orbit. The diagram rescales to fit; star and planet sizes are exaggerated.
Key formulas
| Quantity | Formula | Note or example |
|---|---|---|
| Kepler’s third law | P² = a³ / M★ | P in years, a in AU, M★ in solar masses |
| Closest and farthest distance | r_min = a(1 − e) · r_max = a(1 + e) | Perihelion and aphelion |
| Orbital speed (vis-viva) | v = √(GM (2/r − 1/a)) | Fastest at closest approach |
Worked examples
Each row uses one of this lab’s presets and the same model as the interactive tool.
| Example | Orbital period | Current speed | Star distance |
|---|---|---|---|
| Earth-like | 1 years | 30.3 km/s | 0.98 AU |
| Mars-like | 1.88 years | 26.51 km/s | 1.38 AU |
| Stretched orbit | 5.2 years | 51.59 km/s | 0.6 AU |
Orbit simulator: common questions
Why is the star off-center?
The star sits at one focus of an elliptical orbit, not at the ellipse’s center. A circular orbit has coincident foci.
Does an eccentric orbit take longer?
Not if the semi-major axis and stellar mass stay the same. Eccentricity changes the shape and the variation in speed.
What is Kepler’s third law?
The square of a planet’s orbital period is proportional to the cube of its average distance from its star. With periods in years and distances in AU around a Sun-like star, P² = a³: Mars, at 1.52 AU, takes about 1.88 years per orbit.
Your next discovery
Moon phase explorer
Move through a lunar month and see how sunlight creates the Moon’s familiar phases.
Open experiment Solar systemGravity & escape velocity
Build a world and calculate its gravitational pull, your weight, and its escape speed.
Open experiment Deep spaceLight travel time
Discover how long light takes to cross the solar system and the distances between stars.
Open experiment