It's just about time to plan that summer vacation, and if you want the best deal, a new survey says you should do it soon.

The Huffington Post, with help from CheapAir, looked at the "optimal booking day" for booking your flight to various destinations.

If you're flying anywhere within the U.S., the time to do it is at least 54 days in advance. Going to Canada? Book 59 days ahead. They suggest buying your ticket to Mexico 61 days in advance, 76 for the Caribbean and 99 for European travel.

Not surprisingly, they also say summer is the busiest time to book, so these schedules might even vary and you should book even further ahead this time of year.

Finally, you can book price alerts from your favorite travel site to keep clued in on the best deals.

Have a great summer but make sure you plan ahead.