Someone has finally come up with answer to a question that has plagued travelers for decades -- when's the best time to book a flight?

A recent study by says on average, that's 54 days out from the day you plan to fly. 

"It really is like playing the stock market, it seems like there is no rhyme or reason," says CEO Jeff Klee.  "The airlines have extremely sophisticated yield management systems that are literally in real time adjusting fares based on flight loads."

However, Klee tells KTRH News you have to take the study with a grain of salt.

"When you look deeper at the numbers, you see there are a ton of variance and a ton of volatility," he says.

Klee says airline tickets tend to be their cheapest between 104 and 29 days prior to a flight.

"Anything inside of the 29 days you'll probably end of paying a lot more, but to the other extreme, if you book before 104 days out, you're also likely to pay more," he says.

Of course timing and destination play a role too.  If you're flying for Thanksgiving or Christmas -- better book that flight in June.

One drawback from the study, Klee says if everyone starts to book flights 54 days in advance, airlines will see that and possibly hike up prices due to demand.