We research all brands listed and may earn a fee from our partners. Research and financial considerations may influence how brands are displayed. Not all brands are included. Learn more.

map on clock
Lise Gagne—Getty Images

Trying to score a cheap airline ticket is a traveler's holy grail, but the complex and dynamic systems airline use to price their seats makes nabbing a good deal more an exercise of luck than skill. People have different strategies — book midweek, buy as soon as the tickets are available, make reservations on a Sunday or exactly 42 days before departure — but snagging the lowest price flights still remains something of a crapshoot. The odds of success still depend on the specific itinerary and the season when the trip is taking place, among other factors.

CheapAir.com just introduced a new tool that aims to take some of the guesswork out of when to buy tickets. Enter your origin and destination points, and the site will spit out a timeline charting the fares and the historically best time to score the lowest price.

The site looked at roughly 1.3 billion fares and determined that, on average, 54 days out from your departure is the magic window for getting the best price on a domestic flight. There's a lot of variability, though, and CheapAir found that the weeks before and after that 54-day mark also tended to yield cheap plane tickets most often.

To give travelers a better idea of when to book a specific route, CheapAir took another look, this time analyzing about 3 million itineraries. Researchers found that, depending on the trip, the "prime booking window" -- when prices hover at their lowest points -- is anywhere from 112 to 21 days before a flight. (Fares go up sharply in the last two weeks before a flight, the site found.)

Read next: What You Really Need to Know About When to Buy Flights

For example, a flight from Miami and Denver reaches its low price point Of $222 around 46 days before departure. But prices on the route are quite cheap anywhere during the span of 30 to 65 days before departure, with average fares ranging from $222 to $235. Book this same flight a week before departure, or perhaps 200 days before departure, and you're likely to pay well over $300.