If your last Internet booking left you wondering whether you could’ve found a better deal on air travel, you’re hardly alone. Many consumers purchase airline tickets online only to find they might have gotten a better deal if they hadn’t procrastinated or, conversely, waited just a bit longer to buy.

But how’s the average consumer to know?

To better determine the best time to buy, travel website CheapAir.com evaluated 1.3 billion airfares involving roughly 3 million different trips and thousands of markets across the United States, with departure dates ranging from same-day to 11 months away.

As it turns out, buying 54 days before departure is the best time to purchase airfare for domestic travel.

The site cautioned, however, that because every trip is different the magic “54” number should be considered a starting point. The analysis found that the best fares can usually be found 21 to 112 before departure, with the best time to buy somewhere in that range.

The study also found that it’s rare for airlines to practically “give away” seats by offering deep discounts if any remain unsold before departure. Rather, the data showed that fares increase dramatically within 14 days of a flight.

“Generally, a trip price starts off high, slowly drops and then starts to climb a few weeks before the flight,” said CheapAir.com CEO Jeff Klee.

One other factor that may affect the fare your quoted are cookies, the bits of data stored on your computer that track your Internet usage.

To help travelers navigate the airfare market, CheapAir.com divided the 11-month booking window into five “zones.” Here’s what you should know to help you save:

First Dibs (197 to 335 days out): Most airlines begin selling tickets 335 days before the flight. “First Dibbers” get their pick of flight times, nonstop options and seats. However, they pay an average of $50 more than they would during the “Prime Booking Window.”

Peace of Mind (113 to 196 days out): The Peace of Mind zone offers a balance between flight options and price. Travelers pay an average of $20 more per ticket than they would in the Prime Booking Window, but also have more flight options to choose from.

Prime Booking Window (21 to 112 days out): This is the zone for bargain hunters. During these 90 days, fares fluctuate a lot, sometimes day to day. Travelers are urged to check prices frequently during this period and to buy when a bargain pops up.

Push Your Luck (14 to 20 days out): In the period between two and three weeks out, fares can vary dramatically. Depending on how full flights are, travelers may get a fantastic deal, or they may pay significantly more. Popular flights during peak seasons are less likely to have low fares in this zone.

Hail Mary (zero to 13 days out): On rare occasions, the Hail Mary zone offers the best rate. However, 7-13 days out, travelers pay an average of $75 over the Prime Booking Window. 1-6 days in advance, that premium shoots up to $200.