The distance between Mars and Earth varies depending on their positions in their respective orbits around the Sun, as both planets have elliptical orbits. On average, Mars is about 140 million miles (225 million kilometers) away from Earth. However, this distance can vary significantly.
When Mars is at its closest approach to Earth, known as "opposition," it can get as close as about 34.8 million miles (56.1 million kilometers). This is the best time for observing Mars from Earth and is when space missions to Mars are typically launched to take advantage of the shorter travel distance.
Conversely, when Mars is on the opposite side of the Sun from Earth, it can be as far as about 249 million miles (401 million kilometers) away. During this time, it is difficult to observe and reach Mars with space missions.
So, the distance between Mars and Earth can range from around 34.8 million miles to 249 million miles, with an average distance of about 140 million miles. These distances change over time due to the varying orbits of both planets.