Gastroenteritis (Stomach Flu)

Medically Reviewed by Poonam Sachdev on April 17, 2024
9 min read

Gastroenteritis is when your stomach and intestines are irritated and inflamed. This can cause belly pain, cramping, nausea, vomiting, and diarrhea. The cause is typically inflammation triggered by your immune system's response to a viral or bacterial infect ion. However, infections caused by fungi or parasites or irritation from chemicals can also lead to gastroenteritis.

You may have heard the term "stomach flu." When people say this, they usually mean gastroenteritis caused by a virus. However, it's not actually related to the flu, or influenza, which is a different virus that affects your upper respiratory system (nose, throat, and lungs).

Gastroenteritis symptoms often start with little warning. You'll usually get nausea, cramps, diarrhea, and vomiting. Expect to make several trips to the toilet in rapid succession. Other symptoms tend to develop a little later on and include:

  • Belly pain
  • Loss of appetite
  • Chills
  • Fatigue
  • Body aches
  • Fever

Because of diarrhea and vomiting, you also can become dehydrated. Watch for signs of dehydration, such as dry skin , a dry mouth, feeling lightheaded, and being really thirsty. Call your doctor if you have any of these symptoms.

How long does gastroenteritis last?

It depends on what caused it. But generally, acute gastroenteritis lasts about 14 days. Persistent gastroenteritis lasts between 14 and 30 days, and chronic gastroenteritis lasts over 30 days.

Children and infants can get dehydrated quickly. If they do, they need to go to the doctor as soon as possible. Some signs of dehydration in kids include:

  • Sunken soft spot on your baby's head
  • Sunken eyes
  • Dry mouth
  • No tears come out when they cry
  • Not peeing or peeing very little
  • Low alertness and energy (lethargy)
  • Irritability

When caused by an infection — most often a virus — gastroenteritis is contagious. Young kids are more likely to have severe symptoms. Keep children with gastroenteritis out of day care or school until all their symptoms are gone.

Two vaccines are available by mouth to help protect children from infection with one of the most common causes of viral gastroenteritis: rotavirus. The two vaccines are called RotaTeq and Rotarix. Kids can get them starting at 2 months of age. Ask your doctor if your child should get a vaccine.

Check with your doctor before giving your child any medicine. Doctors don't usually recommend giving kids younger than 5 years over-the-counter drugs to control vomiting. They also don't recommend giving kids younger than 12 drugs to control diarrhea (some doctors won't recommend them for people under 18).

The most common cause of gastroenteritis is a virus. The main types are norovirus and rotavirus. You usually get exposed to a virus through:

  • Contact with someone who has an infection
  • Sharing food or utensils or eating food handled by someone with an infection
  • Drinking water or eating food that has been contaminated with the virus
  • Touching contaminated surfaces and then putting your unwashed fingers in your mouth


Norovirus is very contagious, which means it spreads easily and quickly.

You'll usually start getting symptoms about 12-48 hours after you're exposed. You'll probably be sick for about 1-3 days, and you'll be contagious for up to 2 weeks after you start to feel better.


Both adults and kids get rotavirus, but kids are more likely to have serious symptoms, such as severe dehydration. You can get it at any time, but it has a seasonal peak in the U.S. from January through June. Kids are most likely to get it then, and they can spread it fast to friends and family they have close contact with.

You'll usually start getting symptoms about 1-3 days after you're exposed. You'll probably be sick for about 5-7 days and contagious for a few days after you start to feel better.


Astrovirus usually causes a fairly mild infection, with watery diarrhea. Anyone can get infected with it, but most adults will have immunity because they've had an infection at some point in their past. Infection is most common in:

  • Children younger than 5
  • Adults aged 65 or older
  • People with a weakened immune system due to infection with HIV, having cancer, or taking immunosuppressant medicine

You'll usually start getting symptoms about 4-5 days after you're exposed, and you'll probably be sick for about 1-4 days.


There are several strains of adenovirus. Infection with one of these usually causes a cough, runny nose, and fever. But sometimes, adenovirus infection can cause stomach problems. Anyone can get it, but it's most common in kids younger than 5 years. When adults get it, it's usually because they live in more crowded areas, such as dormitories, military quarters, or nursing homes. You're also more likely to get it if you have a weakened immune system, and you may get seriously sick.

You'll usually start getting sick about 3-10 days after you're exposed, and you may be sick for as long as 2 weeks. If you have respiratory symptoms, such as a cough, they may linger for a while after you otherwise feel better.


Bacteria such as Escherichia coli and salmonella can also trigger the stomach flu. But this isn't as common as cases that are caused by a virus.

Salmonella and campylobacter bacteria are the most common bacterial causes of gastroenteritis in the U.S. These bacteria are usually spread by undercooked poultry, eggs, or poultry juices. Salmonella can also be spread through pet reptiles or live poultry.

Another bacteria, shigella, is often passed around in day care centers. It's typically spread from person to person, but it's also commonly spread through contaminated food and drinking water.


Parasites can also cause gastroenteritis, but it's not common. You can pick up organisms such as giardia and cryptosporidium in contaminated swimming pools or by drinking contaminated water.

There are also other unusual ways to get gastroenteritis:

  • Heavy metals (arsenic, cadmium, lead, or mercury) in drinking water
  • Eating a lot of acidic foods, such as citrus fruit and tomatoes
  • Toxins that might be found in certain seafood
  • Medications such as antibiotics, antacids, laxatives, and chemotherapy drugs

Viral gastroenteritis generally has four stages:

Exposure. This is when you first come into contact with the virus. Symptoms usually take some time to develop, so you won't likely know you were exposed until you start getting sick.

Incubation. Once you've been exposed, it takes some time for the virus to infect your cells and start to reproduce. This is called the incubation period. It generally lasts 1-10 days, depending on which virus has infected you.

Acute infection. As your immune system responds to the infection, you'll develop inflammation. This is what triggers your symptoms, which can last 1-14 days, depending on the type of virus you're infected with.

Recovery. During this period, your symptoms start to go away and you'll feel better. However, you may still be contagious for up to 2 weeks afterward, depending on which virus caused your infection.

Is gastroenteritis contagious?

Gastroenteritis is not contagious, but the infections that cause it are. For example, viruses are usually spread through bodily fluids, such as spit, and poop. If someone with an infection uses the bathroom or coughs or sneezes without washing their hands afterward, they can transfer the virus to every surface they touch. One of the best ways of protecting yourself from getting infected is to wash your hands frequently throughout your day, especially before you eat or touch your face. Also, make sure you wash fresh fruits and vegetables before you eat them, and don't make food for other people if you're sick.

How long does gastroenteritis last?

This depends on what is causing your infection. Most cases of viral gastroenteritis will be over in a few days, but you may be sick for up to 2 weeks with some viruses, such as adenovirus.

While anybody may develop gastroenteritis, some things make you more prone to it. They include:

  • Being older than 65 or younger than 6
  • Living or working in a nursing home
  • Working at or attending a childcare center or school
  • Traveling abroad in places where infections that cause gastroenteritis are more common
  • Eating raw or undercooked fish or meat
  • Having a health condition that either weakens your immune system or requires treatment that weakens your immune system
  • Drinking a lot of alcohol or taking high doses of certain medicines, such as nonsteroidal anti-inflammatory drugs (NSAIDs)

Stomach flu and pregnancy

Gastroenteritis is common during pregnancy. About 30% of pregnant people will have gastroenteritis at some point in their pregnancy. Without treatment, you can get dehydrated, which can trigger early labor. If you are pregnant and you can't keep clear liquids down, talk to your doctor as soon as possible.

Most people won't need specific treatment for gastroenteritis. You'll likely get better on your own after a few days. The best thing you can do to speed up your recovery is to rest at home, stay hydrated, and eat bland food.

To keep yourself hydrated:

  • Drink as much clear fluid as possible. If you're nauseated, try frequent small sips throughout the day or suck on ice chips.
  • If you can, eat small amounts of foods that are easy to digest and have electrolytes, such as fruit juice, popsicles, broths, and saltine crackers.
  • Children can get dehydrated very quickly, so give a child with gastroenteritis a hydration solution, such as Pedialyte, to drink.

Gastroenteritis medication

To help ease your symptoms, your doctor may recommend medicines such as:

  • Anti-nausea medications to ease your vomiting
  • Anti-diarrhea medications, unless you have recently used antibiotics, have bloody diarrhea, have small amounts of blood in the stool that are too small to be seen, or have diarrhea with a fever

Antibiotics can’t treat viral gastroenteritis. They are not often used for bacterial gastroenteritis, either, as your infection should resolve on its own in a few days. However, some bacteria do require antibiotic treatment. Your doctor may do tests to help decide if you need antibiotics.

As your symptoms start to ease:

  • Gradually ease back into eating your regular diet.
  • Start by eating bland, easy-to-digest food such as crackers, bananas, toast, rice, and chicken.
  • Avoid dairy, caffeine, and alcohol until you've completely recovered.

For infants and children

Infants and children can get dehydrated faster than adults. Kids who are dehydrated need to go see a doctor. Keep them hydrated with a hydration solution, and avoid drinks with too much caffeine and sugar, which can make their diarrhea worse, such as:

  • Carbonated sodas
  • Caffeinated drinks
  • Sports drinks
  • Tea with sugar
  • Juices

Go to the doctor or ER if:

  • You or your child aged over 2 years vomits for more than 1 day, has severe diarrhea (passing large amounts of loose or watery poop every 1-2 hours), or has a fever over 104 F that lasts more than 2-3 days.
  • Your child under age 2 has vomiting or diarrhea for more than 12 hours or has a fever with vomiting and diarrhea.
  • You or your child have any signs or symptoms of dehydration.
  • Your vomit or diarrhea turns bloody or tarry (black and thick).
  • You have kidney, liver, or heart disease and you can't hold anything down.
  • You have sudden, severe abdominal pain.
  • Your symptoms last longer than about 5 days.

Call 911 if you or your child has dehydration. Signs and symptoms of dehydration include:

  • Feeling very thirsty
  • Not needing to pee or only needing to pee a little
  • Crying without producing any tears
  • Dry mouth
  • Sunken eyes
  • Dizziness or lightheadedness
  • Rapid breathing and heartbeat
  • Lack of alertness
  • Blurred or double vision
  • Trouble swallowing or breathing
  • Muscle weakness

There’s no guaranteed way to prevent the types of infections that lead to gastroenteritis. However, you can take steps to reduce your risk of getting sick and spreading germs to others, such as:

Wash your hands. This is one of the most important and easiest ways to prevent getting an infection. Wash your hands with soap and water for at least 20 seconds.

Clean surfaces thoroughly. Clean and disinfect all shared surfaces where germs can linger.

Handle food safely. Wash your hands before and after you handle food. Wash fresh fruits and vegetables before you eat them. Cook, serve, and store food safely.

Eat safe when you travel. When you travel, you come into contact with germs that you may not otherwise. This can give you a case of traveler's diarrhea. To avoid this, drink bottled water, and only eat food that is packaged, peeled, or cooked.

Take your medicines as prescribed by your doctor or follow package directions for over-the-counter drugs.

Get vaccinated. Vaccines are available for kids to prevent rotavirus infection.

Gastroenteritis is inflammation from an infection in your stomach and intestines. It can cause nausea, diarrhea, and vomiting, which may cause dehydration. How long your symptoms last depends on what's causing your infection. Most people's immune systems will clear the infection in a few days.