A Holmann transfer to Mars takes about six months. A window for a Holmann transfer opens about every two years. So roughly speaking, a mission to Mars requires six months transit there, a year spent on Mars itself, and another six months return trip. A Holmann transfer, by the way, is a minimum-energy transfer, which is certainly required using chemical fuels only. A nuclear-powered rocket could probably achieve the trip in half the time, but the solar system is still bound by the sun's gravity and our orbits around it. It would still have to wait more than a year until a launch window back to Earth opens.
I could do the math, but a straight-line trip would take more than a day at 1 g acceleration, probably about a week. That much energy at the disposal of the ship would require fusion power or better, with both high thrust-to-weight and high specific impulse. No window is necessary in that scenario, but also not yet possible with any known technology.
Alright, I did the math for a 1g trip to mars, accelerating all the way. That is, accelerating the first half, and decelerating the next. I also estimated the closest approach between Earth and Mars as 59.6 million kilometers and the farthest as 401 million kilometers, based on each's perigee and apogee, but it's most likely a narrower gap. Anyway, minimum time: 43.3 hours. Maximum 112.4 hours. No launch window necessary if the acceleration is a constant 1g.