Gastroenteritis is an infection or irritation of the stomach and intestines that causes diarrhea (loose motions), vomiting and belly cramps. Many people call it a stomach bug or stomach flu, though it has nothing to do with influenza. In healthy adults it usually clears up on its own within 1 to 3 days. The main job is to replace the fluid you lose, so you don’t get dehydrated.
Key points
- Viruses cause most cases, with norovirus at the top of the list. Bacteria from food or water cause many others.
- Small, frequent sips of fluid are the most important treatment.
- You can eat as soon as you feel like it. Start with plain foods.
- Antibiotics don’t help viral gastroenteritis and are needed only for some bacterial infections.
- Washing hands with soap and water is the best way to keep it from spreading.
What causes gastroenteritis
Viruses
Norovirus is the most common cause in adults. It spreads very easily through tiny bits of stool or vomit on hands, surfaces and food, and it causes outbreaks on cruise ships, in nursing homes and in households. Rotavirus, astrovirus and adenovirus are other causes. Rotavirus mostly affects young children, but adults can catch it too, usually with milder illness.
Bacteria
Bacterial gastroenteritis usually comes from food or water. Common causes are Salmonella (raw eggs, poultry), Campylobacter (undercooked chicken), E. coli (undercooked ground beef, raw produce), Shigella, and Vibrio (raw shellfish). C. difficile can cause diarrhea after a course of antibiotics. Some bacteria leave toxins in food that cause sudden vomiting within a few hours of eating.
Parasites
Giardia and Cryptosporidium can come from lakes, streams and swimming pools. They tend to cause diarrhea that lasts a week or longer.
Symptoms of gastroenteritis
- Watery diarrhea, which may be yellow or green
- Nausea and vomiting
- Cramping belly pain
- Low fever and chills
- Headache, muscle aches and tiredness
Norovirus symptoms start 12 to 48 hours after exposure, often with sudden vomiting. Bloody diarrhea and a high fever point more to a bacterial infection.
Watch for dehydration: peeing less or dark yellow urine, a dry mouth, extreme thirst, dizziness when standing, and a fast heartbeat. Older adults, pregnant people and people with weak immune systems become dehydrated faster.
How it’s diagnosed
Most people don’t need tests. A doctor can usually tell from your symptoms. A stool test may be done if you have bloody diarrhea, a high fever, severe illness, symptoms longer than a week, recent travel abroad, or recent antibiotics or a hospital stay. Blood tests help check for dehydration and kidney strain in people who are very sick.
Treating gastroenteritis at home
What to drink
- Oral rehydration solution (ORS) replaces water, salt and sugar in the right balance. You can buy it at a pharmacy as a ready-made drink or a powder.
- Water, clear broth and soup also help. For mild illness, healthy adults can drink sports drinks or juice mixed half and half with water.
- Take small sips every few minutes. If you vomit, wait 15 to 30 minutes, then start again with sips.
- Avoid alcohol, and limit coffee and sugary sodas until you feel better.
What to eat during loose motions
Eat once you feel hungry. Start with small portions of plain foods such as rice, bananas, toast, crackers, oatmeal, boiled potatoes, noodles, soup, plain chicken or eggs. Plain yogurt is fine for most people. Go back to your normal diet over a day or two. Fatty, fried, spicy and very sweet foods can make diarrhea worse for a few days, and milk can be harder to digest for a short time.
Medicines
- Loperamide (Imodium) slows diarrhea in adults. Don’t use it if you have bloody diarrhea or a high fever, because it can keep germs in the gut longer.
- Bismuth subsalicylate (Pepto-Bismol) can ease diarrhea and an upset stomach. It turns stool and the tongue black.
- Acetaminophen helps fever and aches.
- Ondansetron, a prescription medicine, can stop vomiting so you can drink.
- Antibiotics are used only for certain bacterial or parasite infections, severe illness or some travel-related cases. They are avoided for some E. coli infections, because they can raise the risk of a serious kidney problem.
People who are very dehydrated may need fluids through a vein (IV) in an urgent care center or hospital.
Recovering and not spreading it
- Wash your hands with soap and water after using the toilet and before handling food. Alcohol hand gel doesn’t kill norovirus well.
- Don’t cook for others while sick and for at least 2 days after symptoms stop.
- Clean surfaces touched by vomit or stool with a bleach-based cleaner.
- Wash soiled clothes and bedding on a hot cycle.
- Stay home from work or school until 48 hours after the last episode of vomiting or diarrhea.
To lower your risk of catching it, cook meat, poultry and eggs well, keep raw meat away from other foods, refrigerate leftovers quickly, and drink safe water when you travel.
When to see a doctor
- You can’t keep any fluids down for 24 hours
- Diarrhea lasts more than 3 days, or vomiting more than 2 days
- Fever is 102°F (38.9°C) or higher
- Diarrhea is bloody or black
- You recently traveled abroad, took antibiotics or stayed in a hospital
- You are pregnant, over 65 or have a weak immune system
Get emergency care for severe belly pain, confusion, fainting, no urine for 8 hours or more, or vomit that is bloody or green.
Common questions about gastroenteritis
How long is gastroenteritis contagious?
You are most contagious while you have symptoms and for the first few days after you feel better. Norovirus can stay in stool for 2 weeks or more, so keep washing your hands well. Most health departments advise staying away from work, especially food handling, until 48 hours after symptoms end.
How can I stop loose motions fast?
There is no instant cure, because diarrhea is partly your body clearing the infection. For adults without bloody stool or high fever, loperamide can slow diarrhea within a few hours. Keep drinking an oral rehydration solution, which treats the dehydration that makes you feel worst.
Why is my diarrhea yellow and watery?
Stool moves through the gut so fast during gastroenteritis that bile, a yellow-green digestive fluid, doesn’t have time to break down and turn brown. Yellow, watery diarrhea is common with stomach bugs and usually isn’t a concern. Greasy, foul-smelling yellow diarrhea lasting over a week can mean Giardia, so see a doctor.
Can adults get rotavirus?
Yes, though it is much more common in young children. Adults often catch it from a sick child and usually have milder illness, with watery diarrhea, nausea and cramps for a few days. Older adults and people with weak immune systems can get sicker. Treatment is the same: fluids and rest.
Questions to ask your doctor
- Is this likely a virus or bacteria?
- Do I need a stool test or antibiotics?
- Can I take loperamide?
- How do I know if I’m getting dehydrated?
- When can I go back to work?
Learn more
- Viral gastroenteritis (“stomach flu”) (National Institute of Diabetes and Digestive and Kidney Diseases)
- Gastroenteritis (MedlinePlus, U.S. National Library of Medicine)
This guide is general information and doesn’t replace advice from your own doctor. Last updated October 2026.



