Buying airline tickets can sometimes feel like rolling the dice. Knowing which time periods yield the best deals and when ticket prices are bound to fluctuate the most has been a tricky formula waiting to be solved. has finally cracked the question in its latest airfare study on when to purchase airline tickets.

Based on an analysis of 1.3 billion airfares, identified five key booking zones across an 11 month period before the flight date to determine what kinds of discounts passengers can expect to score. On average, the best time to purchase a domestic flight is 54 days in advance.

“Fifty-four days is a good number to start with, but it’s important to know that every trip is different,” says Jeff Klee, CEO of “Generally a trip price starts off high, slowly drops and then starts to climb a few weeks before the flight. People ask all the time if it’s true that at the last minute, the airlines have unsold seats that they practically give away, but that’s rarely the case.”

Within the study, identified a trip as an itinerary going from point A to point B on a specific date with a specific return date. The 1.3 billion airfares accounted for approximately 3 million trips that took place across every day of the year in 2015. measured fares for each trip offered every day from 320 days in advance until 1 day in advance.

Here are five zones each traveler should know for when to purchase airline tickets:

1. First Dibs (197-335 days out): Most airlines begin selling tickets at least 335 days before a flight. Early birds get the best choice of flight times, nonstop options and seat assignments. However, they pay an average of $50 more than the optimal time for ticket purchases.

2. Peace of Mind (113-196 days out): During this travel booking period, travelers can expect a balance between flight options and prices. Tickets cost an average of $20 more than booking during the optimal window for ticket purchases.

3. Prime Booking Window (21-112 days out): Bargain hunters should be on the lookout for fare fluctuations, which can vary greatly day to day during this 90-day period. Travelers should check travel dates frequently and purchase the moment a bargain comes up.

4. Push Your Luck (14-20 days out): Bargains can still be had between two to three weeks ahead, but prices are apt to change more dramatically. Depending on how full flights are, travelers may find a great deal or they may pay significantly more. Popular flights during peak seasons are less likely to offer lower fares at this time.

5. Hail Mary (0-13 days out): Very rarely can a deal be found so close to the travel date. Rather, travelers should expect to shell out an average of $75 more than rates offered during the prime booking window. From one to six days in out, that cost shoots up to $200.