Most people who get gastroenteritis — what many call “stomach flu” — feel better within a few days, and the cause matters more than most people realize. Viral gastroenteritis usually clears up in about one to three days. Bacterial gastroenteritis often lasts longer, sometimes up to a week or more, and in some cases needs medical treatment. The germ behind your illness shapes how long you are sick, how severe it gets, and whether you need to see a doctor.
How Long Does Gastroenteritis Last Viral Vs Bacterial?
Viral gastroenteritis typically runs its course in one to three days. Bacterial gastroenteritis tends to last longer — often several days to a week — and may improve more slowly.
These are general patterns, not fixed rules. Some viral cases drag on for a few extra days. Some bacterial cases resolve quickly on their own. How much you rest, how well you stay hydrated, and your overall health all affect the timeline.
Here is the key difference in how they behave:
| Viral gastroenteritis | Bacterial gastroenteritis | |
|---|---|---|
| Typical duration | 1 to 3 days | Several days to a week or more |
| Onset | Often sudden | Can be gradual or sudden |
| Fever | Common, usually mild | Common, sometimes high |
| Bloody stool | Rare | More likely with certain bacteria |
| Antibiotics needed | No — antibiotics do not treat viruses | Sometimes, depending on the cause and severity |
One detail worth knowing: the severity of your symptoms does not reliably tell you whether the cause is viral or bacterial. A mild bacterial infection and a rough viral one can look almost identical. That is why doctors often rely on how long symptoms last and whether warning signs appear, rather than symptoms alone.
What Causes Viral Gastroenteritis?
Viruses are the most common cause of acute gastroenteritis in the United States. Several different viruses can trigger it, and they spread easily from person to person.
The main culprits include norovirus, rotavirus, adenovirus, and astrovirus. Norovirus is the leading cause of outbreaks in closed settings like schools, cruise ships, and nursing homes. Rotavirus was once a major cause of severe diarrhea in young children, though vaccination has reduced its impact substantially in countries where the vaccine is widely used.
These viruses spread through contaminated food and water, touching contaminated surfaces, and close contact with an infected person. They are highly contagious. A small number of viral particles can be enough to make someone sick.
Viral gastroenteritis usually comes on fast. You may feel fine and then develop nausea, vomiting, watery diarrhea, and stomach cramps within hours. Vomiting often settles within a day or two, while diarrhea may take a little longer to stop.
What Causes Bacterial Gastroenteritis?
Bacterial gastroenteritis comes from eating or drinking something contaminated with harmful bacteria, or from contact with infected animals or people. It is less common than viral gastroenteritis in the general population, but it tends to cause more severe illness when it does occur.
Common bacteria include Salmonella, Campylobacter, Shigella, E. coli, and Vibrio. These are often linked to undercooked meat, raw eggs, unpasteurized dairy, contaminated produce, and untreated water.
Some bacterial infections produce toxins that cause symptoms quickly. Others invade the lining of the gut and cause inflammation that takes longer to heal. This difference helps explain why bacterial cases often last longer than viral ones.
Bloody diarrhea, high fever, and severe abdominal pain are more common with bacterial infections, though they do not happen in every case. When they do appear, they are a signal to seek medical care rather than wait it out.
Why Do Bacterial Infections Last Longer?
The longer timeline for bacterial gastroenteritis comes down to how the bacteria interact with your gut.
Viruses usually infect the cells lining the small intestine, cause them to malfunction for a short time, and then the immune system clears them. The damage is temporary and the gut lining recovers quickly.
Bacteria can do more. Some attach to and invade the intestinal lining directly, causing inflammation and tissue damage that takes longer to repair. Others release toxins that disrupt normal fluid absorption. Your immune system has to mount a bigger response, and your gut has to heal more tissue.
Antibiotics can shorten some bacterial infections, but not all of them. Many bacterial cases get better on their own without antibiotics, and using antibiotics when they are not needed can cause harm. Whether antibiotics help depends on the specific bacteria, how sick you are, and your risk factors. This is a decision for a doctor, not something to manage at home.
When Should You See a Doctor?
Most gastroenteritis gets better without medical care. But some signs mean you should not wait.
Seek medical attention if you notice:
- Blood or pus in your stool
- High fever (above 102°F or 39°C)
- Severe abdominal pain that does not ease
- Signs of dehydration — dry mouth, little or no urine, dizziness, or rapid heartbeat
- Symptoms that last more than a week
- Persistent vomiting that prevents you from keeping fluids down
Dehydration is the main danger with any type of gastroenteritis, and it can become serious quickly in young children, older adults, and people with weakened immune systems. If you cannot keep fluids down, that alone is a reason to get medical help.
You should also see a doctor if you recently traveled outside the country, took antibiotics, or were hospitalized — these situations raise the chance of a specific bacterial cause that may need testing and treatment.
How Do You Manage Symptoms While You Wait It Out?
The main goal during any bout of gastroenteritis is to replace lost fluids and let your gut rest.
Drink small amounts of clear fluids often. Oral rehydration solutions, which balance water with salts and sugar, are more effective than plain water for replacing what you lose through vomiting and diarrhea. These are widely available at pharmacies. Sports drinks are not a substitute — they contain too much sugar and too little sodium for this purpose.
Eat when you feel able. Bland foods like crackers, rice, bananas, and toast are often easier to tolerate, but there is no strong evidence that any specific diet speeds recovery. The old advice to avoid all food until symptoms stop is not supported by current understanding.
Avoid anti-diarrheal medications if you have bloody diarrhea or a high fever. These drugs can slow the clearing of bacteria from your gut and may make a bacterial infection worse. For mild viral cases, some people find them helpful, but they do not treat the cause and should be used with care.
Antibiotics do not help viral gastroenteritis at all. Taking them for a viral illness does nothing for your symptoms and adds risks like side effects and antibiotic resistance.
Can You Prevent Gastroenteritis?
Handwashing is the single most effective step. Wash your hands with soap and water for at least 20 seconds, especially after using the bathroom, changing diapers, and before preparing food. Alcohol-based hand sanitizers work against many germs but are less effective against norovirus, so soap and water are preferred when available.
Other steps that reduce risk:
- Cook meat, poultry, and eggs thoroughly
- Wash fruits and vegetables before eating
- Avoid unpasteurized milk and untreated water
- Clean and disinfect surfaces, especially in kitchens and bathrooms
- Stay home while you are sick to avoid spreading the infection
Rotavirus vaccines are recommended for infants in the United States and have greatly reduced severe cases in young children. There is no vaccine for norovirus or most other causes of viral gastroenteritis.
What Is the Bottom Line on Recovery Time?
Viral gastroenteritis usually resolves in one to three days. Bacterial gastroenteritis often lasts longer — several days to a week or more — and may need medical evaluation.
Your body does most of the work. Rest, fluids, and time handle the majority of cases. The most important thing you can do is watch for warning signs like blood in the stool, high fever, or dehydration, and get help if they appear.
If your symptoms are mild and improving, you can usually manage them at home. If they are severe, lasting, or getting worse, that is your signal to check in with a doctor.
Frequently Asked Questions
How long does viral gastroenteritis usually last?
Viral gastroenteritis typically lasts one to three days. Vomiting often stops first, while diarrhea may take a little longer to fully settle.
How long does bacterial gastroenteritis last?
Bacterial gastroenteritis often lasts several days to a week or more. Some cases improve on their own, while others may need antibiotics or medical care.
Can you tell the difference between viral and bacterial gastroenteritis by symptoms alone?
Not reliably. Bloody stool and high fever are more common with bacterial infections, but many cases look similar, so testing may be needed to confirm the cause.
Should you take antibiotics for gastroenteritis?
No, not unless a doctor prescribes them. Antibiotics do not treat viral gastroenteritis and are only sometimes helpful for bacterial cases.

