Children's allergies to peanuts, dairy and other foods cost the U.S. nearly $25 billion a year, according to the first survey to come up with a comprehensive price tag for a condition that affects 8% of American kids.

Researchers led by Dr. Ruchi Gupta, a pediatrician at Ann & Robert H. Lurie Children's Hospital of Chicago and a professor at Northwestern University's Feinberg School of Medicine, surveyed 1,643 parents around the country who have at least one child with a food allergy. The parents' responses were weighted to match the actual distribution of children with food allergies in the United States.

Here's what they found:

Doctor's appointments, hospital stays, trips to the emergency room and other direct medical expenses accounted for $4.3 billion of the tab, researchers reported. The lost productivity of parents who had to take their children to these appointments added $773 million.

Then there were the expenses associated with buying special allergen-free foods, placing children in allergy-sensitive schools and making special arrangements for child care in facilities that are willing to banish peanuts. These costs totaled $5.5 billion.

The biggest cost by far was the money parents gave up by staying out of the workforce, taking lesser jobs or otherwise restricting their careers to accommodate their children's medical condition. Among the parents surveyed, 9.1% said they had incurred some type of work-related opportunity cost. (Some parents even said they'd been fired as a result of dealing with their kids' allergies.) Altogether, these costs added up to $14 billion a year.

The grand total for these expenses came to $24.8 billion a year, or $4,184 per child, the researchers found. After excluding medical expenses that would be covered by health insurance, the costs borne by families was $20.5 billion.

Read more from Los Angeles Times.