Use this distance to planets tool to see how far Earth is from the Moon, the Sun and every planet on any date, in kilometres, astronomical units and light travel time. The numbers change daily because every body moves on its own orbit.
Distance to planets from Earth today
Press the button with the date left empty and the table shows today's distances. Pick another date to look at a past opposition, a close approach of Mars, or the day you were born. The distances are worked out with Astronomy Engine, a calculation library that is based on the VSOP87 planetary theory and on NOVAS C, and the author says its planet positions are accurate to within one arcminute. [1] Pluto is the exception: VSOP87 does not model it, so the library uses its own gravitational simulation for it. [1]
Units: kilometres, AU and light time
An astronomical unit (AU) is defined as exactly 149,597,870,700 metres, which is about the average distance from Earth to the Sun. [2] The kilometre column is the AU figure multiplied by 149,597,870.7. Light takes about 499 seconds, or a little over eight minutes, to cross one AU, so the light-time column is the distance divided by the speed of light, 299,792.458 km/s. [2]
| Body | Approximate range from Earth |
|---|---|
| Moon | 0.0024 to 0.0027 AU (356,000 to 407,000 km) |
| Sun | 0.983 to 1.017 AU |
| Venus | 0.26 to 1.74 AU |
| Mars | 0.37 to 2.68 AU |
| Jupiter | 3.9 to 6.5 AU |
| Saturn | 7.9 to 11.1 AU |
| Neptune | 28.8 to 31.3 AU |
These ranges are our own working, from the orbit sizes; the table in the tool shows the exact distance for your date.
How the tool works
- It takes the date you give, at 12:00 UTC, so the day means the same thing in every time zone.
- For each body it asks Astronomy Engine for the position relative to the centre of the Earth, including the light travel time (the body is seen where it was when the light left it).
- It takes the length of that position vector as the distance in AU.
- It converts to kilometres and light time and rounds for display.
Why distances change
Earth and the other planets move at different speeds, so the gap between them grows and shrinks. Mars comes close every 26 months or so; Jupiter and Saturn stay far away, and their distance varies by a factor of less than two. The Moon's orbit is an ellipse, so its distance changes by tens of thousands of kilometres within a month. The Sun looks the same size all year, but it is nearest in early January and farthest in early July.
Things to keep in mind
- The figures are distances from the centre of Earth, not from the surface, so the Moon's figure can differ by up to about 6,400 km from a distance measured from a spot on the ground.
- Calculated, not live: no data is fetched, and the tool works offline once the page has loaded.
- The result is for the day at noon UTC; within a day the Moon moves by roughly 13 degrees of its orbit.
- Dates outside 1800 to 2200 are not accepted, because this tool is meant for everyday and historical use.
Reading the light travel time
Light moves at 299,792.458 kilometres per second, so every distance can be turned into a delay. The Moon is about 1.3 light-seconds away, the Sun about 8.3 light-minutes, Mars between roughly three and 22 light-minutes depending on the year, and Neptune about four light-hours. When you see a planet in the sky, you are looking at it as it was that long ago. Spacecraft controllers use the same figures: a command sent to a probe near Mars needs minutes to arrive, and the reply takes just as long to come back.
A few dates worth trying
- A date near the start of January, to see the Sun at its closest.
- A date near the start of July, to see the Sun at its farthest.
- A recent opposition of Mars, when Mars is closest to Earth and shines brightest.
- Your birthday in different years, to see how the sky differs on the same calendar day.
The tool works the same way for any date in range, so you can also use it to prepare a lesson on the scale of the solar system.
Frequently confused terms
Distance is not the same as altitude or apparent size. A planet can be at its closest approach and still be hard to see if it lies close to the Sun in the sky. Opposition, when a planet is opposite the Sun as seen from Earth, usually comes near the closest approach for the outer planets but is not exactly the same day. Conjunction is when two bodies look close together in the sky, which says nothing about how far apart they really are. The table here gives only true distances, so it answers "how far", not "when can I see it".
For the Sun and Moon the same applies: the Moon looks biggest when it is nearest, and the effect is easy to compare by running the tool for dates a fortnight apart.
Using the numbers
Teachers can compare light times to explain why a signal to Mars takes minutes while a radio message to the Moon takes about a second. Observers can see when Mars is near. The tool does not give rise or set times; for those, use a sunrise calculator or a planetarium program.
What next
Use this often? Add Distance to to your Home screen.
Frequently asked questions
How is the distance to planets worked out?
The tool uses the Astronomy Engine library to find each body's position relative to the centre of the Earth on your date, including light travel time, and takes the length of that vector.
What is an astronomical unit?
An astronomical unit (AU) is exactly 149,597,870,700 metres, roughly the average distance from Earth to the Sun.
How accurate are the distances?
The library states that planet positions are accurate to within one arcminute, which is far finer than the precision shown here. Distances are from the centre of Earth to the centre of each body.
Can I check a past or future date?
Yes. Enter any date from 1800 to 2200. The distances are calculated for 12:00 UTC on that day.
Is any data fetched from a server?
No. Everything is calculated in your browser, so the tool works without a connection once the page has loaded.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.