Airline prices database

Whenever we travel by plane, the following question arises: What is the best time to buy the flight tickets? In general, booking early is advisable, since the prices tend to rise as we get nearer to the departure date, which is sometimes a bonus rewarded by companies to early buyers. However, if the company does not sell all the tickets, the company will most likely decide to decrease the price of the ticket rather than flying with empty seats.

There are a lot of websites giving some money-saving tips when travelling as well as research works studying how the prices of flight tickets are determined. For example, this study published in the Economic Journal concludes that the best moment to buy flight tickets is eight weeks before departure. The mathematical formulation supporting this conclusion draws the attention of The Economist and The Guardian.

According to this article in The Telegraph, it is still possible to get cheaper prices in last minute bookings, although this requires being flexible with the departure and return dates. This BBC News article also argues why waiting a few days to purchase the tickets may result in a cheaper price.

There are several reasons to explain rises and decreases of prices at different points in time. But what about real data? What would we see if we observed the real data of flight ticket prices? Some time ago I recorded daily prices of some routes. After several months I gathered a relatively large database. It does not contain enough information to infer strong conclusions or rules, but it is a nice source of information to illustrate in a graphic how prices evolved. That is what I show in the animation below. These graphics display prices observed daily for the route KL1704 Madrid-Amsterdam. The prices were observed daily over a period of 100 days before different departure dates.


In general, buying 60-70 days before the departure date leads to cheaper prices. In the dates immediately before departure, prices tend to undergo sharper increases.

This article at summarizes some conclusions after observing millions of prices. provides information on whether a price is expected to increase or decrease; this is also based on millions of flight queries.

In order to get reliable forecasts, further information would be necessary in addition to historic prices; for example, number of tickets that sold at each date, dates of holidays, oil prices. The database that I collected contains prices recorded daily from January 2013 to July 2014 for the route Madrid-Amsterdam and can be useful for a preliminary analysis and view of this kind of data. It is not easy to find prices of a given flight over a batch of 100 days before the departure date. If you are interested in this data set, send me an email and I would be happy to send you the data.



This entry was posted in database and tagged , . Bookmark the permalink.

Leave a Reply

Your e-mail address will not be published. Required fields are marked *