astronomylabFor teachers
Take an orbit for a spin.

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.

Orbit simulatorInteractive model
Orbital plane · display tilted for readability
Orbital period1 years
Current speed40.59 km/s
Star distance0.7 AU

Your experiment

P = √(1³ / 1) = 1 years. Closest approach: 0.7 AU; farthest: 1.3 AU.

How it works

P² = a³ / M★

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

QuantityFormulaNote or example
Kepler’s third lawP² = a³ / M★P in years, a in AU, M★ in solar masses
Closest and farthest distancer_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.

ExampleOrbital periodCurrent speedStar distance
Earth-like1 years30.3 km/s0.98 AU
Mars-like1.88 years26.51 km/s1.38 AU
Stretched orbit5.2 years51.59 km/s0.6 AU
Keep wondering

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