Today, about four of every 100 Americans suffer from the exaggerated immune response, which can be triggered by peanuts, milk, eggs and other products.

Using several databases, the researchers tallied up the cost of emergency room care, hospitalizations, and visits to the physician's office for allergic reactions. They then used those numbers to estimate the nationwide cost of treatment and reported their results in the Journal of Allergy and Clinical Immunology.

Total medical costs ranged from $225 million to $307 million, depending on the type of calculation the researchers performed.

Visits to the emergency department cost $45 million, about 20 percent of the total medical fees.David Holdford, a pharmacist at Virginia Commonwealth University in Richmond who worked on the study, told Reuters Health he had expected emergency room visits to make up a bigger chunk of the medical costs.

Food allergies can trigger anaphylaxis, a severe reaction that can cause breathing difficulty, heart problems and death and requires immediate attention.

Doctor visits comprised 52 percent of medical costs.

"We were surprised that physician visits were more than half of the costs," said Holdford, who is also an investor in Johnson and Johnson, which makes allergy medications.

"I think what's happening is a lot of these (doctor) visits are not for acute visits," but for helping patients manage or prevent food allergies, Holdford added.

The study found that the medical cost of treating an allergic reaction to food was greater than for similar conditions.

For instance, an emergency department visit for a food allergy cost $553, while previous studies have found that a visit to the emergency room for asthma cost $345.

"We're not really sure why that is," Holdford said. The results could mean that people with food allergy reactions require more intensive treatment.

Indirect costs of food allergies, such as missing work to take a sick child to the doctor, cost $115 million to $203 million, annually.

Maria Acebal, the vice president of research at the Food Allergy and Anaphylaxis Network, an advocacy organization that partially funded the study, said these numbers are just the base of what it costs to deal with food allergies.

The study did not include the cost of maintaining special diets, or arranging for particular travel or school accommodations, for instance.

"This is the first attempt to try and quantify the economic cost of food allergies," Acebal told Reuters Health.

Holdford said he'd also like to put a figure on the additional cost of managing food allergies."If you don't understand how big the problem is, it's hard to have discussions on ways to go about addressing it."