THE GAP, RIGHT NOW

How far is Mars from Earth right now?

There is no single answer. The two planets orbit at different speeds, so the distance between them changes every second. Here is what it is at this moment.

Right now
Calculating…
In astronomical units
Radio signal, one way
There and back
Calculated from simplified orbital elements. This is arithmetic, not an observation — it can differ from a precise ephemeris by a few minutes of light time.

Why the number keeps moving

Earth takes 365 days to go around the Sun. Mars takes 687. They are on different tracks at different speeds, so sometimes they are on the same side of the Sun and sometimes on opposite sides.

When they line up on the same side — an opposition — the gap can close to about 54.6 million km. When the Sun stands between them, it opens to about 401 million km. That is a factor of seven, and it is why every mission to Mars has to leave in a narrow window that comes around every 26 months.

The numbers people ask for

Closest possibleabout 54.6 million km — light takes about 3 minutes
Farthest possibleabout 401 million km — light takes about 22 minutes
Averageabout 225 million km
In light yearsabout 0.0000238 at closest — Mars is far too near for light years to be a useful unit
Travel time for a spacecraftabout 7 to 9 months on a normal transfer orbit
Launch windowabout every 26 months, when the two planets line up

What the delay actually means

A command sent to a rover on Mars arrives between about 3 and 22 minutes later, and its reply takes the same again. There is no way to drive it in real time; by the time you saw a rock in front of it, the rover would already have hit it.

That is why the rovers make their own decisions. Curiosity is told where to go, not how to get there. It looks at the ground, picks its own route and reports back afterwards.

The same delay is on the weather data. What the rover measured has been travelling for minutes before anyone on Earth sees it, and NASA publishes it a few sols later still.

See it moving

Questions

How many light years away is Mars?
About 0.0000238 light years at its closest. Light years are a unit for stars: the nearest star after the Sun is about 4.2 light years away, roughly 180,000 times farther than Mars. For Mars, light minutes are the useful unit — 3 at closest, 22 at farthest.
How long would it take to fly there?
About 7 to 9 months on the kind of transfer orbit missions actually use, which is not a straight line but a long curve that meets Mars where it will be. A hypothetical straight run at the speed of a passenger jet would take about 30 years.
Why can't we go whenever we want?
Because the fuel needed depends on where the planets are. Roughly every 26 months they reach a geometry where a transfer orbit is cheap. Miss it and you wait.
Where does this number come from?
It is computed in your browser from the standard J2000 orbital elements of both planets. Nothing is fetched — it is arithmetic. That also means it is an approximation, and we say so rather than implying a precision it does not have.
Orbital elements: standard J2000 mean elements for Earth and Mars. Light travel time uses 299,792.458 km/s. This page computes, it does not observe.