The answer to this question has eluded even the most seasoned of travelers for years: When is the best time to book a flight and get the lowest airfare?

The self-proclaimed “airfare geeks” at claim to “sort of have an answer.” Sifting through more than 560 million fare searches, they believe it’s 49 days (7 weeks) before departure.

Looked at on a graph, domestic airfares generally start out high and steadily decrease as you get closer to a flight date until the magic 7-week mark, at which point they begin to increase ever so slightly. The fares stay relatively steady until about one month out, when they spike dramatically.

“Of course, a million caveats apply, and this is all based on averages from a year’s worth of dates in over 11,000 purely domestic markets,” CEO Jeff Klee said. “For any given flight, the actual best time to buy might vary, depending on the market, the time of year, the day of week and other factors.”

Rather unsurprisingly, the worst time to buy a ticket is the day before. Two days before is a close second, and then three days and so on until you get to 11 days out. After that, the next worst day to purchase a flight is between 208 and 210 days in advance.

“The simple fact is that the way to get the worst airfare last year was, in most cases, to buy your ticket really late or really early,” Klee noted.

The results, however, differ when you look at international flights. While it’s still a good rule of thumb not to book too early or too late, found that the sweet spot is between 11 and 12 weeks prior to departure, or about 81 days.

The magic number for busy holidays like Thanksgiving or Christmas is also slightly different, at about 14 weeks (96 days) in advance for domestic flights.

Many travel experts claim that booking on Tuesday or Wednesday will get you the lowest airfares, but Klee said that’s an urban legend.

“While it’s true that airlines frequently publish system-wide sales on those days, it’s also true that there are large numbers of smaller-scale, unpublished sales on other days. Add it all up, and we find that no one day was significantly better than any other.”

That’s not to say that flying on certain days isn’t cheaper. No matter when you purchase your flight, Tuesdays, Wednesdays and Saturdays will typically have lower fares.

But again, as Klee noted, “it’s best to take this information as a guideline and not a rule.”