Orbital Mechanics Calculator
Kepler's third law says something that still looks surprising: how long an orbit takes depends only on its size, not its shape. A near-circular orbit and a long thin one with the same semi-major axis take exactly the same time. This generates orbits, works out the period and the speeds at each end, and confirms all of it against three separate laws that have to agree.
What this generator does
Produces an orbit around the Sun with a random size and shape, then computes the orbital period from Kepler's third law and the speed at both the closest and furthest points from the vis-viva equation. Distances are given in astronomical units and speeds in kilometres per second.
How to use this tool
- Generate an orbit and read its semi-major axis and eccentricity.
- Check the period against the cube of the axis — Earth's is one year at one astronomical unit.
- Compare the speeds at the closest and furthest points.
- Multiply distance by speed at each end: the two products match, which is angular momentum being conserved.
Understanding the controls
- Generate
- Produces a fresh orbit with a semi-major axis between 0.3 and 30 astronomical units and an eccentricity up to 0.8 — roughly the range from inner planets to comets.
- Seed
- Any word reproduces exactly the same orbit, so a worked example can be set and marked later.
Common use cases
- Astronomy and physics practice with self-checking answers
- Teaching Kepler's laws with worked numbers rather than only the statement
- Showing why eccentricity does not affect the orbital period
- Generating orbit problems for a lesson or a problem set
- Setting the same orbit twice from a seed
How this generator works
Three independent statements about the same orbit have to agree, which is why an error would be hard to hide. Kepler's third law fixes the period from the semi-major axis alone. The vis-viva equation gives the speed at any distance. And the product of distance and speed must be identical at both ends of the orbit, because angular momentum is conserved — that last one uses neither of the first two and is the strongest check of the three.
Randomness and fairness
The orbit's size and shape are drawn at random; everything else is a deterministic consequence. A seed reproduces the same orbit exactly and is therefore explicitly not cryptographically secure. Without a seed the browser's cryptographically secure generator is used.
For how randomness is produced across the whole site, see how Generate Random works.
Limitations and good to know
- Two-body orbits around the Sun only. Real orbits are perturbed by other planets, which is what makes long-term prediction hard.
- Closed elliptical orbits, with eccentricity below 1 — parabolic and hyperbolic trajectories are a different case.
- The orbiting body's own mass is ignored, which is a very good approximation for anything smaller than a planet.
- No orbital plane, inclination or orientation — this is the shape and timing, not a position in space.
- Orbits are not stored between visits; seed one you want again.
Privacy and your data
The orbit and every figure are computed in your browser. Nothing about it or your seed is transmitted or kept.
Related generators
- Projectile Trajectory GeneratorTraces a projectile's whole flight and checks the simulated landing point against the range formula, with the symmetry about the apex verified.
- Ideal Gas Law CalculatorGas problems solved for any of the four variables, with the answer substituted back so PV and nRT are shown to match.
- Doppler Shift CalculatorObserved frequency for a moving source and observer, showing why the two motions do not enter the formula the same way.
- Half-Life Decay CalculatorWorks out how much remains after a given time, and solves the equation back for time to prove the two are genuine inverses.