The prices for plane tickets are already up more than 5% this year compared to a year prior — and will climb into June, according to data out in June from Hopper.com. You don’t have to take this.

Moneyish looked at research from CheapAir, which analyzed 921 million flights to figure when to buy tickets — and talked to airfare experts — to figure out when you should buy tickets to save money.

This is how far ahead you should buy your plane ticket. In general, you want to book airfare at least three weeks and up to 3 ½ months ahead of time, the CheapAir analysis found. “Keep in mind that fares will still fluctuate within this rather large window, but in general, the sweet spot is in this zone – where the best fare tends to pop up and fares tend to be within 5% of their lowest,” the researchers write. Of course, this broad rule depends on locations, which is why we’re including this chart.

Destination When to buy
Continental U.S., Canada 54 days ahead
Hawaii 79 days ahead
Caribbean 76 days ahead
Mexico/Central America 61 days ahead
Europe 99 days ahead
South America 81 days ahead
Asia 90 days ahead
Africa, Middle East 119 days ahead
South Pacific 89 days ahead

These numbers are averages — helpful averages, to be sure, but still averages. Think of them as a rough guideline for the best time to buy, and then combine them with tools like Hopper.com’s “When to fly and buy” feature, as well as fare alerts from services like Google Flights and Kayak, to get the lowest fare possible.

Why does this matter? The prices of flights will change 71 times between when the flight is announced and when it takes off, and each change averages $33 up or down — which means that fare alerts set within a smart window of time are one of the best ways to make sure you’re getting a low rate. Finally, “be ready to buy quickly when you see a good fare,” the experts at CheapAir advise. “This tactic will assure you a good shot at capturing a very good fare, if not the best airfare for a particular flight.”

This is the absolute worst day to book a flight. Unsurprisingly, it’s the day before you fly that will yield you the worst deals: You’ll pay $249 more than average if you book then. And people who try to book less than two weeks ahead of time trying to score those coveted “last minute” deals won’t do all that much better. On average, they’ll pay $150 more than those who book within the 3 week to 3 ½ month-ahead window.

The buy on Tuesday rule is a myth. This “rule” gets repeated so many times that many people are certain it’s true. It’s not. CheapAir found that you’re just as likely to find deals on a Tuesday as you are any other day of the week: “The average lowest fares by purchase day of week are all within $2. That’s less than a 0.6% difference,” the researchers write. A similar analysis by Hopper.com found that Tuesday was only the cheapest day to buy tickets for 1.6% of domestic routes. “There are not really rules of thumb anymore on this,” says Patrick Surry, the chief data scientists at Hopper.

But the travel on Tuesday rule is spot-on. If you want to save big bucks on your plane tickets, pick flights that take off on a Tuesday or Wednesday, which will save you an average of $73 per ticket, according to the CheapAir analysis. Meanwhile, Sunday is the most expensive. Surryy says that you should think of it like this: If it’s a day when business travelers are likely to fly, it will be more expensive.

It’s also important to think about what time of year you’re flying. Summer tends to be the priciest and January and February the cheapest, he says, though of course this depends somewhat on your destination. Ski destinations, for example, will likely still be pricey at the start of the year.

This story was originally published in April and has been updated.