provider image
Welcome! You’re in GoodRx for healthcare professionals. Now, you’ll enjoy a streamlined experience created specifically for healthcare professionals.
Skip to main content

What Is Gastroenteritis, and What Happens When You Have It?

Robert Shafton, MDKatie E. Golden, MD
Written by Robert Shafton, MD | Reviewed by Katie E. Golden, MD
Published on November 23, 2021

Key takeaways:

  • Gastroenteritis is an infection of the stomach and intestine that is usually caused by a virus. But it can also happen after you eat food or drink water contaminated with bacteria. 

  • The typical symptoms are nausea, vomiting, and diarrhea. More serious cases can lead to fever, abdominal pain, dehydration, or intestinal bleeding.    

  • Most of the time you can fully recover from gastroenteritis at home without any difficulty. 

02:00
Reviewed by Alexandra Schwarz, MD | December 22, 2023

Gastroenteritis is an infection of the intestinal tract that affects millions of Americans per year. It is sometimes referred to as “gastro,” the “stomach flu,” or a “stomach bug.” Most often, it’s caused by a virus and will go away on its own after a few days. But sometimes the symptoms can last a little longer. We will explain what causes gastroenteritis, what you can expect if you get it, and what you can do to take care of yourself. 

What causes gastroenteritis?  

Gastroenteritis is caused by infection from viruses, bacteria, or parasites. Viruses cause 50% to 70% of all cases, with norovirus and rotavirus being the most common (though many other viruses can cause the infection as well). These viruses are transmitted from person to person, usually in closed group spaces such as nursing homes, cruise ships, schools, or daycare centers.

Bacteria also can cause gastroenteritis, although this is less common. You may come into contact with these germs:

  • When you eat contaminated or undercooked food

  • When you drink from a contaminated water supply, which can happen during travel to areas with poor water filtration or sewage systems (commonly referred to as “traveler’s diarrhea”) 

  • When there’s a complication related to taking antibiotics, which can sometimes kill off the helpful bacteria in our intestines — allowing the more harmful bacteria to grow and cause infection

As with viruses, there are many different kinds of bacteria that can cause gastroenteritis. For example, E. coli or Salmonella frequently cause outbreaks.  

Less commonly, gastroenteritis is caused by a parasite. Examples include Giardia, Entamoeba, and Cryptosporidium. You may come into contact with these parasites when you:

  • Eat contaminated foods

  • Swim in a contaminated river or lake

  • Handle exotic animals that have the parasite 

What are the common symptoms of gastroenteritis?  

The classic symptoms of gastroenteritis that occur most frequently are:

  • Stomach cramps

  • Nausea and vomiting

  • Diarrhea

  • Fever

  • Dry mouth, thirst, and general weakness (symptoms of dehydration)

  • Gas trapped in parts of the intestines

Typically, these symptoms last about a week or less. Although the symptoms may last a little longer. If your symptoms are not improving after a week, it’s a good idea to see a healthcare provider. They may recommend blood or stool tests to look for other types of infection. 

Other reasons you should consider seeing a healthcare provider include:

  • Abdominal pain, especially if it seems more severe than mild intestinal cramping

  • Inability to keep down any fluids

  • Bloody diarrhea

  • Significant dizziness or fainting

  • Confusion or disorientation

What is the treatment for gastroenteritis? 

In most cases, no specific treatment is needed. Most people with gastroenteritis will make a full and quick recovery with some easy measures at home:  

  • Getting plenty of rest

  • Staying hydrated by drinking fluids

  • Eating when able to keep food down 

People with more severe or prolonged symptoms may also receive additional treatment:

Most of the time, antibiotics aren’t needed to treat gastroenteritis. This is because the infection is most likely caused by a virus. What’s more, antibiotics can sometimes make the problem worse. They can often lead to more severe diarrhea. Or they can even make you susceptible to other types of infection. So healthcare providers typically only prescribe antibiotics in confirmed bacterial or parasitic infections (usually done with a stool culture).

What foods should I eat or avoid eating if I have gastroenteritis?

Many people have been told to follow a “BRAT diet” (bananas, rice, applesauce, and toast) while recovering from gastroenteritis. But there’s no scientific basis to support this idea. And avoiding dairy doesn’t seem to make a significant difference either (though it’s best to stay away from fried and high-fat foods). Instead, the evidence suggests that you should try to eat as soon as you feel ready. In fact, early “refeeding” seems to reduce the amount of time you are sick.  

A good way to get both fluids and nutrition is by drinking clear broths like chicken soup. Also, it is important to get electrolytes in a glucose-based drink to prevent getting dehydrated. You can do this by drinking an electrolyte drink you can find in a store. Or you can even make your own by mixing half a teaspoon of salt and 6 teaspoons of sugar into 1 liter of water.

What can I do to avoid getting gastroenteritis?  

The best measures you can take to avoid getting gastroenteritis are:

  • Good hand washing and hygiene practices

  • Safe food preparation

  • Avoiding contact with other people who are sick

  • Taking precautions with drinking water and peeling fruits and vegetables if you’re in a developing country or an area with poor sanitation

The bottom line

Gastroenteritis is extremely common, with tens of millions of cases in the U.S. per year. To avoid getting this infection, it’s best to wash your hands, handle foods properly, and avoid close contact with others who are sick. If you do catch a case of gastroenteritis, your symptoms will likely go away on their own in a matter of days. And the best thing you can do is to rest, drink plenty of electrolyte-rich fluids, and eat as soon as you can tolerate foods.

why trust our exports reliability shield

Why trust our experts?

Robert Shafton, MD
Robert Shafton, MD, studied at the University of Michigan at Ann Arbor and Harvard University before earning his medical degree at the University of Illinois at Chicago. He trained at the Rambam Hospital in Haifa, Israel, during which specialized in urgent care medicine in the Tel Aviv area.
Katie E. Golden, MD
Katie E. Golden, MD, is a board-certified emergency medicine physician and a medical editor at GoodRx.

References

Barr, W., et al. (2014). Acute diarrhea. American Family Physician.

Graves, N. S. (2013). Acute gastroenteritis. Primary Care

View All References (3)

Shane, A. L., et al. (2017). 2017 Infectious Diseases Society of America clinical practice guidelines for the diagnosis and management of infectious diarrhea. Clinical Infectious Diseases.

Thielman, N. M., et al. (2004). Clinical practice. Acute infectious diarrhea. The New England Journal of Medicine.

Zollner-Schwetz, I., et al. (2015). Therapy of acute gastroenteritis: Role of antibiotics. Clinical Microbiology and Infection.

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Was this page helpful?

Get the facts on Gastrointestinal Infection.

Sign up for our newsletter to get expert tips on condition management and prescription savings.

By signing up, I agree to GoodRx's Terms and Privacy Policy, and to receive marketing messages from GoodRx.