Solar System Simulator

An orrery built on real orbital elements from NASA's Jet Propulsion Laboratory.

Every planet follows a true ellipse with the Sun at one focus, speeding up at perihelion and slowing at aphelion, because the simulator solves Kepler's equation instead of sliding dots around circles.

Set any date between 1800 and 2050, run time forwards or backwards, and switch between a readable view and genuine to-scale distances.

Last updatedHow we build & check our tools
Results will appear here once you enter your values.

Why orbits are ellipses and not circles

For nearly two thousand years the circle was not a finding but an assumption. Planets were heavenly, heavenly things were perfect, and perfect motion was circular. When the observations refused to fit, astronomers added more circles rolling on circles rather than question the shape.

What broke it was Mars. Johannes Kepler inherited Tycho Brahe's observations, the most precise made before the telescope, and spent years fitting a circular orbit to them. He got one that worked to within eight minutes of arc, about a quarter of the width of the full Moon. Any earlier astronomer would have called that a triumph. Kepler knew Tycho's measurements were better than eight arcminutes, so the leftover error had to be real. Those eight arcminutes, he later wrote, pointed the way to reforming the whole of astronomy.

The curve that fitted was an ellipse with the Sun at one focus, not at the centre. An ellipse has two foci; the Sun sits at one and there is nothing at all at the other. This is why a planet's distance from the Sun changes over its year: nearest at perihelion, furthest at aphelion. Mars, at an eccentricity of 0.093, swings from 1.381 to 1.666 astronomical units. That is the deviation Kepler could see in the numbers.

Isaac Newton later showed why it must be so. Any two bodies attracting each other with a force falling off as the square of the distance move on conic sections: ellipse, parabola or hyperbola. The ellipse is not a curiosity, it is what inverse-square gravity produces for anything gravitationally bound. Circles are the special case where eccentricity happens to be zero, and nothing in the Solar System is exactly that.

This simulator therefore draws every orbit as its true ellipse. Look at Mercury, at an eccentricity of 0.206, and you can see the Sun sitting well off centre. Turn on Pluto, at 0.249, and its orbit is so elongated that for twenty years out of every 248 it is closer to the Sun than Neptune.

What Kepler's three laws actually say

All three are statements you can check against the screen, not slogans to memorise.

  • First law, 1609 (the law of ellipses): each planet moves on an ellipse with the Sun at one focus. Select a planet and the panel shows its closest and furthest distances from the Sun. For Earth those are 0.983 and 1.017 astronomical units, about five million kilometres apart, which is why the Sun looks very slightly larger in January than in July. Note that this has nothing to do with the seasons: Earth is closest to the Sun during the northern winter. Seasons come from the 23.4 degree axial tilt.
  • Second law, 1609 (the law of equal areas): the line from the Sun to a planet sweeps out equal areas in equal times. The consequence is that planets move faster when closer. Mercury travels at 58.98 kilometres per second at perihelion and 38.86 at aphelion. Watch the speed readout while Mercury completes an orbit and you will see it rise and fall. This law is really conservation of angular momentum, arrived at seventy years before Newton gave it that name.
  • Third law, 1619 (the harmonic law): the square of the orbital period is proportional to the cube of the semi-major axis. Test it on the data panel: Jupiter's semi-major axis is 5.203 astronomical units, and 5.203 cubed is 140.9; the square root of 140.9 is 11.87, and Jupiter's year is 11.86 of ours. The same arithmetic works for every planet, and it worked for Kepler two centuries before anyone knew the distance to the Sun in kilometres.

The second law is the reason this simulator has to do real work each frame. Position at a given time comes from the mean anomaly, an evenly growing angle that a planet would have if it moved uniformly. Turning that into a real position means solving M = E − e sin E for the eccentric anomaly E, an equation with no algebraic solution. It is solved here by Newton's method, which converges in three or four steps. Skip that step, and Mercury glides round at a constant rate and Kepler's second law quietly disappears from the lesson.

Why the Solar System cannot be drawn to scale on a screen

Almost every picture of the Solar System, in every textbook, is wrong about scale. It is not carelessness. It is arithmetic.

Suppose you fill a 1920-pixel-wide screen with Neptune's orbit, roughly 60 astronomical units across. Each pixel then covers about 4.7 million kilometres. Earth, 12,742 kilometres in diameter, comes out at 0.003 of a pixel. Earth's entire orbit is 64 pixels across, about the width of a thumbnail. Mercury, Venus, Earth and Mars together occupy a smudge near the middle roughly 100 pixels wide, and everything else is empty black.

Work the other way and it gets worse. Shrink the Sun to a one-metre ball at the front of a classroom and Earth becomes a 9-millimetre bead 107 metres away, out past the school gates. Jupiter is a 10-centimetre ball at 560 metres. Neptune is a 3.5-centimetre marble 3.2 kilometres away. A model that gets both sizes and distances right does not fit in a building, which is why to-scale Solar System walks are laid out along roads and coastlines.

Every simulator has to choose a lie, and the useful question is which one and whether it is admitted. This tool offers two distance modes and labels the active one on the canvas at all times.

  • True to scale does exactly what it says, and the result is mostly empty space with the inner planets in a knot. Show it once and leave it up for a minute. The emptiness is the lesson.
  • Compressed shrinks each orbit by its own factor. Because the whole ellipse is scaled by one number, its shape stays exact and the Sun stays precisely on the focus, so Kepler's first and second laws survive untouched. What is distorted is only the spacing between orbits, and that is stated on screen rather than hidden.
  • Planet sizes are a separate toggle for the same reason. In readable mode the dots follow a compressed logarithmic rule so Pluto and Jupiter can share a screen. In true mode most planets fall below one pixel, and the tool prints the exact figure rather than pretending otherwise.

Ask a class to spot the problem in a textbook diagram before you show them the true-scale mode. Almost every one has the planets evenly spaced and comparable in size, and neither is anywhere close to true.

How we know how far away the planets are

Nobody has ever run a tape measure to Mars. Every distance in the panel traces back to a chain of measurements, and the chain is a good story for a lesson because each link is something a student could in principle check.

  • Relative distances came first, and came free. Kepler's third law relates a planet's year to its distance, and a planet's year is simply how long it takes to return to the same place in the sky, which anyone patient can time. That gives every distance in units of Earth's distance, without knowing what that distance is in kilometres. By 1619 the whole map of the Solar System was known in the correct proportions, on an unknown scale.
  • Parallax fixed the scale. Observe the same object from two places far apart at the same moment and it appears against a slightly different background; the shift, plus the distance between the observers, gives the range by triangulation. In 1672 Giovanni Domenico Cassini in Paris and Jean Richer in Cayenne observed Mars simultaneously and derived a distance to the Sun of about 140 million kilometres, within about seven percent of the modern value, and the first time anyone had a defensible number at all.
  • Transits of Venus refined it. Edmond Halley proposed that timing Venus crossing the face of the Sun from widely separated latitudes would give a far sharper parallax. It is why James Cook sailed to Tahiti in 1769. The transits of 1761, 1769, 1874 and 1882 were the largest coordinated scientific expeditions of their day and eventually pinned the astronomical unit to within a fraction of a percent.
  • Radar settled it. In 1961 teams at JPL, MIT, Jodrell Bank and in the Soviet Union bounced radar off Venus and timed the echo. Since the speed of light is known exactly, so was the distance. That single measurement improved the astronomical unit by orders of magnitude and made the older methods historical.
  • Spacecraft keep it honest. Ranging to orbiters and landers now measures distances across the Solar System to within metres, and those measurements are what modern ephemerides are fitted to. Since 2012 the astronomical unit is not a measurement at all but a defined constant, exactly 149,597,870,700 metres.

Light gives a feel for the result. Sunlight reaches Earth in 8 minutes and 19 seconds. A radio command to a Mars rover takes between about 3 and 22 minutes each way depending on where the two planets are in their orbits, which is exactly why rovers have to drive themselves. Use the distance readout to watch that number change over a couple of years.

Using this in a lesson

The tool is built to be projected. It needs no account, sends nothing to a server, and every control is a single click, so it can be handed to a student to drive.

  • Find Kepler's second law yourself (ages 11-16). Select Mercury, set the speed to one week per second and watch the orbital speed readout. Ask students to note the fastest and slowest values and where in the orbit each happens. They should find roughly 59 and 39 kilometres per second, and that fast means close. Then give them the law and let them check that it explains what they saw.
  • Test the third law with a calculator (ages 14-18). Have students read the semi-major axis and orbital period for four planets from the data panel, cube the axis, square the period in Earth years, and compare. Agreement to two decimal places across a hundredfold range of distance is more persuasive than any assertion from the front of the room.
  • The scale shock (any age). Start in compressed mode with everything visible, then switch to true to scale without warning and say nothing for thirty seconds. Follow with the classroom model: Sun a one-metre ball, Earth a 9-millimetre bead 107 metres down the corridor.
  • Why Mars missions have launch windows (ages 11-16). Set the distance measurement to Earth and Mars, run at one month per second, and watch the separation swing between roughly 0.4 and 2.7 astronomical units. Ask when you would launch, and why a mission missed by a month waits about two years.
  • The birthday sky (ages 7-11). Every student types their date of birth and notes where Jupiter and Saturn were. Then set today's date and see how far each has moved. Jupiter will have gone round once every twelve years, Saturn once every thirty; Neptune, for a class of ten-year-olds, has barely stirred.
  • Pluto and Neptune (ages 9-14). Turn Pluto on, set 10 years per second, and watch its orbit cross inside Neptune's. Ask why they never collide. The answer is a 3:2 resonance: Pluto completes two orbits for every three of Neptune's, so they are never at the crossing point together.
  • Modelling and honesty (ages 14-18, computing or science). Open the simplifications panel and discuss what has been left out and why: no planetary perturbations, mean lunar elements only, a flat projection of a tilted system. A good model announces its assumptions. Ask which simplification would matter most if you were actually flying a spacecraft.

One warning worth passing on: if a student asks whether the planets will ever line up, let them find the answer by running time forward at a hundred years per second. Watching eight planets refuse to cooperate for five thousand years teaches more about orbital periods than any explanation.

Frequently Asked Questions

Common questions about the Solar System Simulator

They are computed from the orbital elements NASA's Jet Propulsion Laboratory publishes for approximate planetary positions, referred to the J2000 epoch and valid from 1800 to 2050. Set a date and the simulator works out where each planet actually was or will be. It is accurate to roughly 25 arcseconds for Mercury and about 400 arcseconds for Neptune, which is a fraction of a degree: right for showing which side of the Sun a planet sits on, not right for aiming a telescope.