The opportunities for a launch to Mars
Initially, the planets are close together, but one Earth year later the Earth is back in its initial position but Mars has completed little more than half a revolution.
We can calculate the time it takes for Earth and Mars to reach similar relative positions. It is the time at which the Earth has traveled one complete revolution further than Mars:
Now the angle traveled by either planet is its angular rate multiplied by elapsed time:
We can substitute in the first equation and rearrange terms:
Earth's angular rate is 360 degrees per year, and Mars angular rate is 360 degrees per 1.88 years.
The time between launch opportunities is a little greater than 2 years (about 25 to 26 months). That's why NASA sends missions to Mars at about 2 year intervals.