Stomach upset has dozens of possible causes, but most cases trace back to a handful of common triggers: infections, food reactions, stress, medications, or an underlying digestive condition. The cause often reveals itself through timing. Symptoms that hit within hours of a meal point toward food-related triggers, while a gradual onset over days may suggest an infection or medication side effect.
Infections: Viruses and Bacteria
Viral and bacterial infections are among the most frequent causes of acute stomach upset. The CDC estimates that just four common pathogens cause 1.9 million foodborne illnesses in the United States each year, and that only accounts for a fraction of all gut infections.
Viruses like norovirus work by infecting the cells lining your small intestine, disrupting their ability to absorb fluid and nutrients. The unabsorbed material draws extra water into the gut, producing watery diarrhea. Norovirus symptoms typically appear 12 to 48 hours after exposure, with a median of about 33 hours. You catch these viruses through contaminated food or surfaces, and sometimes through tiny respiratory droplets from a sick person nearby.
Bacterial infections can behave differently depending on the organism. Some bacteria, like certain strains of E. coli, attach to the intestinal wall and release toxins that force your gut to secrete water and electrolytes. Others physically invade the lining of the intestine, causing inflammation, bleeding, and protein-rich fluid to leak into the gut. This invasive type of infection tends to produce more severe symptoms, sometimes including bloody stool, whereas viral infections almost always cause plain watery diarrhea without blood.
How quickly you get sick is one of the best clues to the culprit. Staphylococcus aureus toxins, often found in improperly stored prepared foods, can cause nausea and vomiting in as little as 30 minutes, usually within 2 to 4 hours. Salmonella takes longer, typically 6 to 48 hours. If your symptoms start more than a day after a suspect meal, a virus is the more likely cause.
Food Intolerances
Unlike infections, food intolerances aren’t caused by germs. They happen when your body can’t properly break down a specific component of food. The most common example is lactose intolerance: your small intestine doesn’t produce enough of the enzyme that digests lactose, the sugar in milk and dairy products. When undigested lactose reaches your large intestine, bacteria ferment it, producing gas, bloating, cramping, and diarrhea.
Gluten sensitivity works through a different pathway. In non-celiac gluten sensitivity, your digestive system struggles to process gluten, the protein found in wheat, barley, and rye. Symptoms overlap with lactose intolerance (gas, diarrhea, abdominal pain) but may also include fatigue and brain fog. Celiac disease is a more serious form where gluten actually damages the lining of the small intestine over time, interfering with nutrient absorption.
The tricky part about food intolerances is that symptoms can be delayed by several hours, making it hard to connect the discomfort to a particular food. If you notice a pattern of stomach upset after meals, keeping a food diary for a few weeks can help you identify which ingredients are responsible.
Medications That Irritate the Stomach
Several common medications cause stomach upset as a side effect. NSAIDs (ibuprofen, naproxen, aspirin) are the most well-known offenders. These painkillers reduce inflammation throughout the body, but they also weaken the protective mucus layer that shields your stomach lining from its own acid. Over time, this can cause direct mucosal damage, ranging from mild irritation to ulcers.
Antibiotics are another frequent cause. They can irritate the stomach lining directly, but they also disrupt the balance of bacteria in your gut, which often leads to diarrhea, nausea, or cramping during a course of treatment. Iron supplements cause a distinctive type of irritation to the stomach and esophagus, which is why doctors often recommend taking them with food. Other medications linked to stomach upset include certain blood pressure drugs, antidepressants, and opioid painkillers, though the exact mechanism varies and isn’t always well understood.
Stress and the Gut-Brain Connection
That churning feeling before a big presentation or a difficult conversation isn’t imaginary. Your digestive tract contains its own nervous system, sometimes called the “second brain,” made up of more than 100 million nerve cells lining the entire length of your gastrointestinal tract from esophagus to rectum. This network communicates constantly with your brain, and the conversation goes both ways.
When you’re anxious or under acute stress, your brain sends signals that can alter gut motility (how fast food moves through your system), increase acid secretion, and change blood flow to the intestines. The result can be nausea, cramping, diarrhea, or that familiar “butterflies” sensation. For some people, chronic stress doesn’t just trigger occasional discomfort. It can amplify existing digestive conditions or contribute to ongoing symptoms that resist other treatments. Therapies that address the psychological side of gut problems, including cognitive behavioral therapy, have been shown to improve digestive symptoms in some patients, precisely because the two systems are so closely linked.
Chronic Digestive Conditions
When stomach upset keeps coming back over weeks or months, it may reflect a chronic condition rather than a one-time trigger.
Gastroparesis is a condition where the stomach empties too slowly because the nerves or muscles controlling stomach contractions are damaged. The most common cause is diabetes: roughly one-third of people with Type 1 or Type 2 diabetes develop gastroparesis as a form of nerve damage from prolonged high blood sugar. Surgery on or near the stomach can also injure the vagus nerve, which coordinates stomach movement. Even certain viral infections like norovirus or rotavirus can trigger gastroparesis that lingers after the infection clears. Symptoms include persistent nausea, feeling full after only a few bites, bloating, and vomiting of undigested food.
Irritable bowel syndrome (IBS) is another common culprit. It involves recurring abdominal pain tied to changes in bowel habits, without visible damage to the intestinal lining. Acid reflux, or GERD, causes a burning sensation in the upper stomach and chest when stomach acid flows backward into the esophagus. Both conditions tend to flare and fade, often worsened by stress, certain foods, or hormonal changes.
When Stomach Upset Signals Something Serious
Most stomach upset resolves on its own within a day or two. Certain patterns, however, warrant urgent attention. Sudden, severe abdominal pain that doesn’t ease within 30 minutes can signal a surgical emergency like appendicitis or a perforated ulcer. Appendicitis often starts as vague pain around the navel and migrates to the lower right abdomen, accompanied by nausea, vomiting, loss of appetite, or fever.
Continuous vomiting paired with severe abdominal pain may indicate acute pancreatitis, which typically produces pain in the middle upper abdomen that worsens after eating. Vomiting blood, or stool that looks black and tarry, suggests bleeding somewhere in the digestive tract. Severe abdominal pain with vaginal bleeding in a woman of reproductive age can be a sign of an ectopic pregnancy, which requires immediate care. In any of these situations, the emergency room is the right call.

