"You can't have paid less than me, you booked a week later," said one Easyjet passenger to the friend seated next to her.

As the pair waited at Venice's Marco Polo airport for their flight home, the woman who had paid more for her ticket became increasingly annoyed.

Her friend must have got the figure wrong, she insisted. Like many of us, she had assumed that prices only go up as the date of departure nears.

But BBC research suggests we may need to reassess some of the things we think we know about air fares.

Prices on routes from London to major European cities including Rome, Barcelona and Berlin on three major airlines were monitored every day for six weeks.

'Low-cost airline' means an airline whose costs are low, not necessarily an airline whose fares are low Simon Calder, Travel journalist

The findings show that fares can actually fall and then rise a number of times during the period leading up to a flight.

The price of a Ryanair flight from London to Rome in the middle of April, for example, fell on six separate occasions in the six weeks before departure.

You could therefore have saved money by waiting for a day or so, and in a couple of cases, the saving was quite substantial. Between 14 and 15 March, the price fell from £40.14 to £28.14. And between 1 and 2 April it fell from £78.91 to £54.99.

"We will know whether we are over or below [the target for passengers buying seats]," says Michael Cawley, Ryanair's deputy chief executive.

"And if we are above it, we can increase the fare, because we need to slow down the rate of booking, or if we are below it, we need to reduce the fares," he explains.

This is classic demand management, of course. But it makes particular sense for the low-cost airlines, because their business models depend as much on selling extras - hotels, refreshments and car hire - as they do on selling tickets.

As they say at Ryanair, it is all about "bums on seats". Fewer passengers means fewer opportunities to sell gifts on board.

Fill your 'buckets'

It is price, not place, that counts Low-cost air travel takes people to places they had never thought of visiting - but not necessarily because they are fulfilling their travel ambitions. Often, it is just because the destination is the cheapest on offer. "Passengers generally have a budget, and are in many cases indifferent to where they go, so long as it's a sunshine destination or a historic destination depending on their preference," says Ryanair's Michael Cawley. "So if it's Krakow or Prague it really doesn't matter. Or if it's Alicante or Malaga, it doesn't matter. It's the price that determines that demand." For best man Richard Fry, organising a stag party for his friend, the best choice was Riga in Latvia because it was "cheaper than Prague and Amsterdam" and the trip took no longer than it would take to get to Liverpool or Manchester by train. "It's a bit of a no-brainer, really," says Richard.

This results in the peaks and troughs in the prices. In the space of just four days, a ticket from London to Barcelona with the Irish airline went from £57.99 to £35.34 to £28.14 and then back up to £41.74.

At Easyjet it is all about "buckets". On each flight, groups of tickets are sold in a series of "buckets", with the buckets sold closer to the flight having higher prices, explains UK director Paul Simmons.

Media playback is unsupported on your device Media caption Easyjet boss Carolyn McCall is optimistic about growth

But while in general the later buckets have higher fares, to sell all the tickets in a particular bucket, prices may be cut to boost sales and move on to the next, higher priced bucket.

And if there's low demand on a flight, the system may never reach the higher priced buckets.

"It doesn't accelerate through the buckets at all if it's a low-demand flight, so it may never get to the final buckets, it may just carry on at a lower trajectory," says Mr Simmons.

That is what appears to have happened with the Easyjet flight to Berlin on 12 April.

The research for the BBC programme, Flights and Fights: Inside the Low Cost Airlines, showed that if you had booked on 13 March you would have paid £90.99. But on 10 April, just two days before the flight, the fare had gone up by just £9 to £99.99.

How to save

So how can you try to get the best fare?

"Days of the week do vary. Tuesdays would be our weakest day from a revenue point of view," says Paul Simmons. "So if you are flexible, say you can fly on your summer holiday Tuesday to Tuesday, rather than Saturday to Saturday, you'd probably save money."

Also, check comparison sites because British Airways, often considered a more expensive "full service" airline, was sometimes cheaper than those known as "low-cost" airlines.

On the route to Barcelona, for example, BA was cheaper than Easyjet for most of the period. It would only have been cheaper to fly Easyjet six weeks before the flight and for a few days right before take-off.

And although Ryanair was still consistently the cheapest, they often fly to different airports, further from the centre of the city.

Simon Calder, who has monitored the industry for many years, warns consumers not to confuse "low-cost" airlines, which operate as cheaply as possible, with "low fares", which is what the customers pay to fly.

"'Low-cost airline' means an airline whose costs are low, not necessarily an airline whose fares are low," says Mr Calder.

"A low-cost airline can have very high fares. A high-cost airline can have very low fares. The crucial thing about low-cost airlines is that the lower your costs, the more likely it is that you will be able to make a profit and offer - most of the time - decent value to your customers."

Flights and Fights: Inside the Low Cost Airlines, will be broadcast on BBC Two on Thursday 20 June at 21:00BST.

See: Charles Miller on how the film was made