Our Services
Medical Information
Helpful Resources
Published on: 9/15/2026
Cramping stomach pain that comes in waves along with diarrhea can point to either a viral stomach bug (gastroenteritis) or food poisoning, and timing is the biggest clue: food poisoning often starts within hours of a suspect meal and eases in 1 to 2 days, while a stomach bug tends to develop more gradually, lasts several days, and frequently spreads to others in your home. Fever, vomiting, recent travel, shared meals, and whether symptoms match someone else's illness all help separate the two, and a few warning signs such as bloody stools, high fever, severe dehydration, or pain lasting more than 3 days may signal a bacterial or non-infectious cause that needs care. There are several important distinctions to consider, so see below for the full breakdown of symptoms, timelines, and red flags. Because both conditions overlap so closely and treatment depends on the cause, guessing can delay relief or hide something more serious. Take a free, instant, online symptom check to see which explanation best fits your pattern of pain and diarrhea and to understand what step makes sense next.
Last reviewed for medical accuracy: 09/14/2026
Experiencing stomach pain that comes and goes in waves with diarrhea can be unsettling. You might wonder whether you’ve caught a stomach bug (viral gastroenteritis) or if you’re dealing with food poisoning. Both conditions share similar signs—abdominal cramps, loose stools, nausea—but subtle differences in how they start, how long they last, and what other symptoms you have can help you figure out which one you’re facing.
| Feature | Stomach Bug (Viral Gastroenteritis) | Food Poisoning |
|---|---|---|
| Onset time | 12–48 hours after exposure | 1–6 hours for toxins 6–24 hours for bacteria |
| Duration | 1–3 days (sometimes up to 10 days) | Usually 24–48 hours |
| Common causes | Norovirus, rotavirus, adenovirus | Bacterial toxins (e.g., S. aureus), live bacteria (e.g., Salmonella) |
| Fever | Often present (mild to moderate) | May be absent or low-grade |
| Vomiting | Common | Common |
| Other symptoms | Muscle aches, headache, low appetite | Headache, muscle aches (less common) |
A stomach bug—medically called viral gastroenteritis—is an infection of the intestines caused by various viruses. It’s often called “the stomach flu,” though it isn’t related to influenza.
Causes & transmission
Symptom pattern
When you might suspect a stomach bug
Food poisoning results from eating food contaminated with toxins or live bacteria. Symptoms can appear quickly—sometimes within hours of eating the tainted meal.
Causes & timing
Symptom pattern
When you might suspect food poisoning
Both stomach bugs and food poisoning can cause:
Because symptoms overlap, pinpointing the exact cause at home can be tricky. Use the timing of onset, pattern of symptoms, and possible exposures to guide your guess.
Whether it’s a stomach bug or food poisoning, most people recover with simple home care:
Hydration is key
Rest and recovery
Gradual re-introduction of food
Probiotics (optional)
Over-the-counter remedies
Most cases resolve on their own, but you should speak to a doctor or seek urgent care if you experience:
If you’re unsure how serious your symptoms are, consider a free, online symptom check, using the doctor approved Ubie Symptom Checker.
“Stomach pain that comes and goes in waves with diarrhea” can stem from either a stomach bug or food poisoning. Use the timing of symptom onset, the presence of fever, and recent food exposures to guide your guess. In most cases, rest, hydration, and a bland diet will see you through. However, if you develop worrisome signs or your symptoms persist, please speak to a doctor.
(References)
* Afghani B, Stutman HR. Toxin-related diarrheas. Pediatr Ann. 1994 Oct;23(10):549-50, 553-5. doi: 10.3928/0090-4481-19941001-09. PMID: 7838605.
* Stenfors Arnesen LP, Fagerlund A, Granum PE. From soil to gut: Bacillus cereus and its food poisoning toxins. FEMS Microbiol Rev. 2008 Jul;32(4):579-606. doi: 10.1111/j.1574-6976.2008.00112.x. Epub 2008 Apr 15. PMID: 18422617.
* Pinchuk IV, Beswick EJ, Reyes VE. Staphylococcal enterotoxins. Toxins (Basel). 2010 Aug;2(8):2177-97. doi: 10.3390/toxins2082177. Epub 2010 Aug 18. PMID: 22069679; PMCID: PMC3153290.
* Henry R. Etymologia: campylobacter. Emerg Infect Dis. 2013 Aug;19(8):1313. doi: 10.3201/eid1908.ET-1908. PMID: 23876215; PMCID: PMC3739522.
* Graves NS. Acute gastroenteritis. Prim Care. 2013 Sep;40(3):727-41. doi: 10.1016/j.pop.2013.05.006. Epub 2013 Jul 19. PMID: 23958366; PMCID: PMC7119329.
* Giddings SL, Stevens AM, Leung DT. Traveler's Diarrhea. Med Clin North Am. 2016 Mar;100(2):317-30. doi: 10.1016/j.mcna.2015.08.017. PMID: 26900116; PMCID: PMC4764790.
* Jung C, Steuber B, Schwörer H. [Food poisoning by cucurbitacines]. Dtsch Med Wochenschr. 2020 Jul;145(14):988-990. doi: 10.1055/a-1163-9741. Epub 2020 Jul 15. PMID: 32668470.
* Dietrich R, Jessberger N, Ehling-Schulz M, Märtlbauer E, Granum PE. The Food Poisoning Toxins of Bacillus cereus. Toxins (Basel). 2021 Jan 28;13(2). doi: 10.3390/toxins13020098. Epub 2021 Jan 28. PMID: 33525722; PMCID: PMC7911051.
* Fleckenstein JM, Matthew Kuhlmann F, Sheikh A. Acute Bacterial Gastroenteritis. Gastroenterol Clin North Am. 2021 Jun;50(2):283-304. doi: 10.1016/j.gtc.2021.02.002. Epub 2021 Apr 23. PMID: 34024442; PMCID: PMC8793005.
* Johnson-Arbor KK. Chronic Ciguatera Poisoning: A Case Report. Wilderness Environ Med. 2023 Jun;34(2):222-224. doi: 10.1016/j.wem.2023.01.002. Epub 2023 Mar 2. PMID: 36870862.
We would love to help them too.
For First Time Users
We provide a database of explanations from real doctors on a range of medical topics. Get started by exploring our library of questions and topics you want to learn more about.
Was this page helpful?
Purpose and positioning of servicesUbie Doctor's Note is a service for informational purposes. The provision of information by physicians, medical professionals, etc. is not a medical treatment. If medical treatment is required, please consult your doctor or medical institution. We strive to provide reliable and accurate information, but we do not guarantee the completeness of the content. If you find any errors in the information, please contact us.