It's been the question that has vexed women since the invention of underwear - how to figure out what bra size you are.

Now a Southampton boffin has come up with a mathematical formula to calculate the correct fitting for any woman.

It should be a boon for men everywhere trying to size-up their partner's needs in time for Christmas shopping. But they will have to have a head for figures - of the mathematical kind. The formula we use above is just to calculate an average 36C cup.

More used to working out how to reduce aircraft noise than mulling over the problem of an ill-fitting bra cup, Southampton University lecturer Matthew Wright was prompted to write an academic paper entitled The Graphical Analysis of Bra Size Calculation Procedures.

"A friend of mine brought the problem of bra sizes to my attention. It does impinge on all our lives even though I don't happen to use these particular products myself," he joked.

In his spare time, Dr Wright has analysed the effects of small errors in measurements and discovered it could make the difference between predicting a size 36A and one of 34D.

Bra-fitting specialists at Southampton's WestQuay Marks and Spencer store Elaine Randall and Christine Easton said 90 per cent of women are wearing the wrong size bra.

"We do 400 fittings a week in this store - and most women are not wearing the correct bra," said Christine.

As our formula above shows, if you have a ribcage measurement of 32.4 inches and a bust measurement of 37.5 inches you will fit snugly into a 36C bra.

Dr Wright said: "Experienced fitters know how to choose the right size but the rise of Internet shopping means more and more customers are measuring themselves.

"To do this requires making two measurements, one around the ribcage and one around the bust. These two numbers then have to be converted to an even number and a letter and this is where the problem arises."

Now here's where it gets really complicated.

The standard procedure for making the bra size calculation on many websites instructs the user to convert the first number by adding four if it is even and five if it is odd, effectively rounding it to the nearest five inches.

This rounded number is then subtracted from the second also rounded number to give the cup size.

Because one rounded number is subtracted from another any errors will accumulate.

Dr Wright explained: "It is a well-known effect called - somewhat unfortunately in this context - spurious rounding."

His paper suggests an alternative method that reduces the possibility for error - with the subtraction done before the rounding.

But Dr. Walker's research may also have important health spin offs.

"Medical statistics relating the incidence of cancer to breast size may be based on census data that asks for cup size.

"The accuracy of the procedures used to calculate that cup size could have serious implications for the interpretation of such statistics," he said.