It is a question that anyone booking a holiday or business trip will have asked themselves countless times: exactly when is the best time to buy an advance plane ticket to fly at the cheapest price?

Leave it too late and prices shoot up, and there is a danger the flight will be fully booked. But book too early and you run the risk that plans may change and you will be out of pocket if you don't travel or have to alter the flight.

Help is at hand. An economist, Makoto Watanabe, has calculated that the optimum time to buy an airline ticket is eight weeks in advance of flying.

His yet-to-be-published findings also suggests that airline tickets are cheaper when purchased in the afternoons, rather than the mornings, prompting him to speculate that airlines are assuming business travellers will book their tickets at work in the morning on the company account, whereas leisure travellers are more likely to book from home in the afternoon.

The eight-week result stems from work published in the latest edition of the Economic Journal in which Watanabe and his colleague, Marc Möller, offer intimidating equations such as ∏A = gU G + min(k - g, (1 - g)(1 - r)) as part of the complex formula, where ∏ equals profit, that determines advance ticket purchases.

The economists write: "When we book our flight to London weeks ahead we have to account for the possibility of unforeseen events which make our trip to London impossible. In order to make consumers take their chances, airlines have to offer advance purchase discounts. As a consequence, ticket prices increase as the travel date approaches."

Conversely, fans of long-running West End musicals know they can often pick up cheap tickets if they leave their purchases to the last minute.

The pair note: "The purchase of airline and theatre tickets are both examples where individual demand uncertainty and rationing risks interfere. However, there is empirical evidence which shows that airline ticket prices typically increase over time while theatre tickets are often sold at a discount on the day."

Earlier studies appear to corroborate these claims, although there may be discrepancies between the pricing of long-haul and short-haul flights.

A 2001 study of flight tickets for 12 different US routes showed that postponing a ticket purchase by just one day raised the price by around 0.1% of the average fare. A 2004 study of flights from Nice airport showed that the average price of a flight increases by 12.7% within the last 22 days prior to departure.

In contrast, a 2004 study of 199 Broadway shows found that 197 offered discounts of up to 50% on the day of the performance and that 14% of the audience took advantage of such discounts.

The pair note: "When we purchase our theatre ticket last minute, there exists the possibility that the event has sold out. In order to make consumers bear this risk, theatres implement a clearance sale by offering last minute discounts."

In the abstract accompanying their ongoing work, Möller and Watanabe say: "Differences in the pricing of airline and theatre tickets are explained by the fact that air travel to London is offered by relatively few carriers while long-running West End musicals are unlikely to sell out."