Skip to content
Simulation · Space

How long does it take to get to Mars?

Fly the cheapest orbit from Earth to Mars, then move the planet to see why you can only launch every 26 months.

Launch window
Mars at launch44.3°ahead of Earth
In the launch window

Flight time259 d
Burn at Earth2.94 km/s
Burn at Mars2.65 km/s
Total Δv5.59 km/s
Misses by0 M km
Next windownow

The transfer orbit

The cheapest trip is half of an ellipse that touches Earth's orbit at one end and Mars's orbit at the other. Its long axis is the sum of the two orbit radii.

t = ½ · 2π √(a3 ÷ GM), a = (r1 + r2) ÷ 2

The two burns

One burn speeds the craft up from Earth's orbital speed onto the ellipse. A second burn at Mars matches Mars's speed. Both are changes of speed relative to the planet.

Δv = √(GM(2/r − 1/a)) − √(GM/r)

Why a window

While the craft flies half an ellipse, Mars moves along its own orbit. Launch only works when Mars starts about 44° ahead, which happens once every synodic period.

φ = 180° − 360° × t ÷ TMars

How long does it take to get to Mars, and why only every 26 months?

The cheapest trip from Earth to Mars takes about 259 days, roughly 8.5 months. That is half of one orbit around the Sun on an ellipse that touches Earth's orbit at one end and Mars's orbit at the other, called a Hohmann transfer. Real missions take between about six and nine months depending on the launch date and how much extra fuel they spend. The trip can only start when Earth and Mars are in the right places, and that happens once every 780 days, about 26 months.

The simulation above uses circular orbits at 1 AU and 1.524 AU. Because Mars moves while the spacecraft flies, Mars must start about 44.3° ahead of Earth. Drag the slider and the picture shows where the Hohmann orbit ends and where Mars actually is. The two burns add up to about 5.59 km/s of speed change relative to the planets: 2.94 km/s to leave Earth's orbit and 2.65 km/s to match Mars. Switch to "Best path for this date" to see what it costs to catch Mars when you miss the window.

Key results from the simulation

  • Transfer time: half the period of the ellipse with a = 1.262 AU. Kepler's third law gives T = a^1.5 years = 1.42 years, so the trip is 259 days.
  • Launch angle: Mars moves 136° while the spacecraft flies its 259 days, so it must start 44.3° ahead of Earth to be at the other end of the ellipse on arrival.
  • Burns: 2.94 km/s leaving Earth's orbit and 2.65 km/s arriving, 5.59 km/s in all. Earth moves at 29.8 km/s and Mars at 24.1 km/s, so the burns are small compared with the planets' own speeds.
  • Waiting: the launch window repeats every 780 days. Miss it and Mars is 96.1 million km away from where the Hohmann orbit ends if you are 24° late. Catching it anyway would cost about 2.8 km/s more.

Six launch dates, one orbit

Each section gives the numbers the simulation shows for that Mars position and has a button that loads it. The slider is the angle by which Mars leads Earth at launch, from 0° to 360°. "Misses by" is the distance between the end of the Hohmann orbit and Mars on arrival. "Best path" is the cheapest two-burn transfer that does reach Mars, found with Lambert's method.

Mars right next to Earth (0°)

Closest to Earth is the worst time to leave

At 0° the two planets are lined up on the same side of the Sun, which is when Mars is nearest to us. It looks like the perfect moment to go, but the spacecraft needs 259 days to fly its orbit and Mars would have moved 136° ahead by then. The Hohmann orbit ends 172 million km away from Mars.

Catching Mars from here is possible with a faster, more direct path, but the best one needs 10.5 km/s of burns (4.9 km/s more) and takes 429 days, so it is slower as well as more expensive. The next window is 684 days away.

Hohmann misses by 172 M km Best path Δv 10.5 km/s Best path time 429 d Next window 684 d

A window missed by about 50 days (20°)

Mars lead has shrunk, so Earth is too late

If Mars is only 20° ahead, Earth has already gained on it, and the window closed about 53 days ago. The Hohmann orbit would end 96 million km from Mars. To catch it, the cheapest path needs 8.4 km/s, which is 2.8 km/s more than the 5.59 km/s of the window, and takes 339 days.

Each degree of lead error costs more as you leave the window, but the window itself is not razor thin. Within about ±6.1° (roughly ±13 days) the extra cost stays under 0.2 km/s, which is the green band on the chart. That is why real launch periods last a few weeks.

Hohmann misses by 96 M km Extra Δv +2.8 km/s Best path time 339 d Next window 727 d

The launch window: Mars 44.3° ahead

The Hohmann orbit as designed

With Mars 44.3° ahead, the spacecraft leaves Earth, falls outward along the ellipse for 259 days, and meets Mars at the far end. The departure burn adds 2.94 km/s along Earth's motion, which puts the craft on an orbit whose farthest point is Mars's distance. The arrival burn of 2.65 km/s then matches Mars's 24.1 km/s.

Total heliocentric Δv is 5.59 km/s. This is the lowest possible for a two-burn trip between these two circular orbits, which is why mission planners use it as the baseline. The launch dates that give this geometry come around every 780 days.

Related reading: Could Mars be the first terraformed planet?

Flight time 259 d Burn at Earth 2.94 km/s Burn at Mars 2.65 km/s Total Δv 5.59 km/s

Too early by about 55 days (70°)

Mars is farther ahead than the orbit needs

With Mars 70° ahead, the Hohmann orbit arrives 101 million km behind Mars. The window opens in 56 days, because Earth gains on Mars by 0.46° a day and has to close the 26° gap.

Launching now with a faster path costs 7.7 km/s (+2.2 km/s) and 281 days. Waiting two months costs nothing in fuel. Mission planners wait.

Hohmann misses by 101 M km Extra Δv +2.2 km/s Best path time 281 d Window in 56 d

Mars on the far side of the Sun (180°)

Solar conjunction: the worst geometry

When Mars is directly opposite Earth across the Sun, any trip has to swing nearly halfway around the Sun in a short time. The cheapest two-burn path in this model costs 24.7 km/s and takes 230 days, about 4 times the window cost. It is not a path anyone would fly.

The geometry also puts the Sun between the two planets. Radio signals pass close to it and are disturbed for a couple of weeks, so missions plan a communication pause at conjunction. The next window opens in 294 days.

Related reading: The glorious near future of space exploration

Hohmann misses by 422 M km Best path Δv 24.7 km/s Best path time 230 d Next window 294 d

Mars 90° behind Earth (270°)

A long chase

If Mars is behind Earth, the spacecraft has to wait for Mars to catch up or fly out to a much wider orbit. The best path found within the 700 days this model searches costs 15.3 km/s and takes 657 days, and the Hohmann orbit misses by 420 million km. The window is 489 days away.

Compare the time to wait with the time to fly: Hohmann trips are short and the waiting is long. A round trip with minimum-energy orbits each way takes about 972 days: 259 out, 454 waiting at Mars for the return window, and 259 back.

Hohmann misses by 420 M km Best path Δv 15.3 km/s Best path time 657 d Next window 489 d

Six launch dates compared

Mars leadHohmann misses byCheapest ΔvExtra ΔvFlight timeNext window
0.0°172 M km10.47 km/s+4.87 km/s429 d684 d
20.0°96 M km8.42 km/s+2.83 km/s339 d727 d
44.3°0 M km5.59 km/s+0.00 km/s259 dopen
70.0°101 M km7.75 km/s+2.15 km/s281 d56 d
180.0°422 M km24.73 km/s+19.14 km/s230 d294 d
270.0°420 M km15.32 km/s+9.72 km/s657 d489 d

Values are heliocentric speed changes for two instantaneous burns between circular, coplanar orbits at 1 AU and 1.524 AU. The cheapest path is searched among transfers of 60 to 700 days. Real missions also pay to leave Earth's gravity and, if they orbit or land, to enter Mars's. See the fact sheet on our solar system for more on the planets.

How the simulation works

Earth is on a circle of radius 1 AU and Mars on one of 1.524 AU. Kepler's third law, T² = a³ with T in years and a in AU, gives their periods: 1 year for Earth and 1.881 years (687 days) for Mars. Earth gains on Mars by 360° per year minus 360° per 1.88 years, so they line up again every 780 days, the synodic period. For more on T² = a³ see the Kepler's laws simulator.

The transfer ellipse has its nearest point at Earth's orbit and its farthest point at Mars's, so its semi-major axis is a = (1 + 1.524) ÷ 2 = 1.262 AU. Its full period is 1.42 years and the trip is half of it, 259 days. The speed on the ellipse comes from the vis-viva equation, v² = GM(2/r − 1/a). Earth's orbital speed is 29.78 km/s and the speed at the nearest point of the ellipse is 32.73 km/s, so the first burn is 2.94 km/s. At the far end the craft moves at 21.48 km/s against Mars's 24.13 km/s, so the second burn is 2.65 km/s.

When Mars is not at the Hohmann angle, "Best path for this date" solves Lambert's problem: given where the spacecraft starts, where Mars will be after a chosen flight time, and that time, find the single conic orbit that connects them. The model tries flight times from 60 to 700 days and keeps the one with the smallest sum of the two burns. The chart shows that cheapest sum for every lead angle. The spacecraft in the picture is moved along its orbit with the universal-variable form of Kepler's equation, so it flies the true conic, not a sketch. Time-lapse is marked on screen: the speed button sets how many days pass per second.

What the model leaves out

  • Real orbits are not circles. Mars's orbit is noticeably elliptical (eccentricity about 0.09), which makes some windows cheaper than others by a large margin. Windows when Mars is near its closest point to the Sun are the easy ones.
  • Orbits are not in one plane. Mars's orbit is tilted by about 1.85° to Earth's, which adds a small plane-change cost that the model does not include.
  • Gravity wells. The burns here are measured relative to the planets. Leaving a 300 km Earth orbit takes more speed than the 2.94 km/s the model shows, because the craft must climb out of Earth's gravity, and capture into Mars orbit or landing takes extra again. Spacecraft also use the atmosphere for part of the braking.
  • Burns take time. Chemical rockets burn for minutes, not instantly, and electric propulsion for months. Both change the path and the cost slightly.
  • Search limit. The off-window cost is a search among single-orbit transfers of 60 to 700 days with two burns. Gravity assists, three burns and longer paths can lower it for some dates.

Common misconceptions

"Closest approach is the best time to launch." Mars is nearest when it is opposite the Sun from Earth, but a spacecraft is not aimed at where Mars is, it is aimed at where Mars will be. The good launch comes about 96 days before Earth passes Mars, when Mars is 44.3° ahead.

"A faster trip is just a matter of more power." More speed means a more direct path, but fuel scales exponentially with speed change (see the rocket equation). Trips of around 200 days are possible with extra fuel, and a crewed ship has to carry that extra fuel as well.

Frequently asked questions

How long does it take to get to Mars?

The minimum-energy Hohmann transfer takes about 259 days, or 8.5 months. Real robotic missions take about six to nine months: Perseverance took roughly 203 days in 2020 on a faster path. A crewed mission would likely take about the same each way, with a long stay at Mars before the return window.

Why can we only launch to Mars every 26 months?

Earth and Mars return to the same relative positions every 780 days, the synodic period. The cheap transfer needs Mars about 44.3° ahead of Earth at launch, so the window opens once per synodic period and stays usable for a few weeks.

How far away is Mars?

The distance changes from about 55 million km at the very closest approaches to about 400 million km when the planets are on opposite sides of the Sun. A radio signal needs about 3 minutes one way at the closest and about 22 minutes at the farthest. The spacecraft itself flies a curved path of several hundred million km.

How much fuel does a trip to Mars need?

The heliocentric speed change is about 5.59 km/s, but leaving Earth's orbit, entering Mars's orbit and landing need more, and fuel grows exponentially with speed change. See the rocket equation simulator and the future of space exploration for how rockets are being designed for it.

How long would a round trip take?

With minimum-energy orbits both ways, about 972 days, or 2.7 years. 518 days of that is flying and about 454 days is waiting on Mars for Earth to reach the right place for the return. Shorter round trips exist but need much more fuel.

Could Mars be made liveable once we get there?

That is a different, much slower problem. See the Mars terraforming simulator and Could Mars be the first terraformed planet? for what it would take.

Keep learning

Space 02

Glorious Near Future of Space Exploration

The Near future of space exploration is looking bright and glorious. With advances in technology and a renewed focus on reaching for the stars, we are on the cusp of a new era of discovery and excitement. Join us as we explore the possibilities that await us.

More simulations