What Causes a Stomach Ache and When Is It Serious?

Stomach aches have dozens of possible causes, but most fall into a handful of common categories: something you ate, an infection, stress, a medication side effect, or an underlying digestive condition. The location, timing, and type of pain all offer clues about what’s going on inside your body.

How Your Gut Actually Produces Pain

Your digestive tract is lined with specialized nerve endings that detect stretching, pressure, and chemical irritation. When your stomach or intestines stretch too far, contract too hard, or encounter something irritating, these nerve endings fire pain signals up to your brain. Chemical triggers like histamine and serotonin, released by cells in the gut lining, can activate these nerves directly.

What makes gut pain tricky is that these nerves can become sensitized over time. Once that happens, the threshold for triggering pain drops. Stretching or contractions that wouldn’t normally hurt start to feel painful, and stimuli that were mildly uncomfortable become intensely so. This is one reason chronic stomach problems tend to feel worse the longer they go on.

Food Poisoning vs. Stomach Flu

These two get confused constantly because the symptoms overlap: diarrhea, nausea, vomiting, and cramping. The key difference is timing. Food poisoning hits fast, typically two to six hours after eating contaminated food. A stomach virus (viral gastroenteritis) has a longer incubation period of 24 to 48 hours before symptoms begin.

Stomach flu also tends to produce more whole-body effects like fever, chills, and muscle aches, because a virus is actively replicating in your system. Food poisoning is more often a reaction to bacterial toxins already present in the food. Both cause watery diarrhea that can occasionally be bloody, and both typically resolve on their own within a few days. Dehydration is the main risk with either one.

Pain Medications That Hurt Your Stomach

Over-the-counter painkillers like ibuprofen, aspirin, and naproxen are among the most common medication-related causes of stomach pain. These drugs are weak acids that dissolve into the fatty lining of your stomach wall. Once there, they block enzymes that normally help maintain your stomach’s protective mucus barrier. Without that protection, your stomach acid and digestive enzymes start eating into the tissue itself.

Short-term use might cause mild irritation or a burning sensation. Regular use, especially on an empty stomach, can lead to erosions and ulcers. The serious complications of these ulcers include bleeding, and in rare cases, a hole through the stomach wall. If you notice dark or tarry stools, or sharp pain that doesn’t go away, that’s worth urgent attention. Taking these medications with food reduces but doesn’t eliminate the risk.

Where It Hurts Matters

The location of your pain narrows down the list of possible causes considerably.

Upper right abdomen, under the ribs: This is classic gallstone territory. Gallstone pain (biliary colic) comes on suddenly, builds to a sharp, intense peak, then gradually fades. It often radiates to the right shoulder or back. Despite the word “colic,” it doesn’t come and go in waves during an episode. It’s a steady, squeezing pain that can last anywhere from 15 minutes to several hours. Other causes in this area include liver problems and certain types of pneumonia.

Upper left abdomen: Stomach inflammation (gastritis), acid reflux, and peptic ulcers are the usual suspects here. Pancreas problems also show up in this region, often with pain that bores straight through to the back.

Lower right abdomen: Appendicitis is the headline concern. It often starts as vague pain near the belly button that migrates to the lower right over several hours and gets progressively worse. Inflammatory bowel disease, irritable bowel syndrome, and in women, ovarian or reproductive issues can also cause pain here.

Lower left abdomen: Diverticulitis is common in this quadrant, especially in adults over 50. Constipation, IBS, and reproductive conditions also cause lower-left pain.

Stress and the Gut-Brain Connection

Stress-related stomach pain is not imaginary. Your brain and gut are in constant two-way communication. Psychological stress, anxiety, and depression directly affect the physical movements and contractions of your digestive tract. Stress can speed up or slow down digestion, trigger cramping, and increase acid production.

The connection works in the other direction too. A distressed gut sends alarm signals to the brain, which can worsen anxiety and mood. People with functional gut disorders (conditions where the digestive tract looks normal but doesn’t work properly) often perceive pain more intensely because their brains are more responsive to pain signals from the GI tract. Stress amplifies this further, creating a feedback loop where worry about stomach pain makes the stomach pain worse.

Food Intolerances

Lactose intolerance is one of the most common food-related causes of recurring stomach pain. People who are lactose intolerant don’t produce enough of the enzyme needed to break down the sugar in milk. The undigested lactose ferments in the intestines, producing gas, bloating, cramps, and diarrhea. This is different from a true dairy allergy, where the immune system reacts to milk proteins (casein or whey) and can cause more serious symptoms like wheezing and difficulty breathing.

Other common intolerances include fructose (found in many fruits, honey, and high-fructose corn syrup), gluten, and certain fermentable carbohydrates collectively known as FODMAPs. If your stomach aches follow a pattern tied to specific foods, keeping a food diary for two to three weeks can help you identify the trigger.

Irritable Bowel Syndrome

IBS is one of the most common causes of chronic, recurring stomach pain. It’s diagnosed when someone has abdominal pain at least one day per week for three months, and that pain is connected to bowel movements, changes in how often they go, or changes in stool consistency. Symptoms must have started at least six months before diagnosis.

IBS doesn’t cause visible damage to the intestines, which is why it’s classified as a functional disorder. But the pain is real and can be debilitating. It likely involves that nerve sensitization process described earlier, where the gut’s pain receptors become hypersensitive. Triggers vary from person to person but commonly include certain foods, hormonal changes, and stress.

Signs That Need Immediate Attention

Most stomach aches are uncomfortable but not dangerous. A few warning signs change that equation. Sudden, severe abdominal pain that comes on like a switch being flipped can indicate serious problems: a burst appendix, a bowel obstruction, a perforated ulcer, or interrupted blood flow to the intestines. Pain that gets significantly worse when you gently press on your abdomen, then let go (rebound tenderness), suggests inflammation of the abdominal lining.

Other red flags include a visibly swollen and rigid abdomen, rapid heart rate with low blood pressure, confusion or sweating alongside the pain, fever with worsening abdominal tenderness, and vomiting blood or passing black stools. Lying completely still because any movement makes the pain worse is also a concerning pattern. These situations call for emergency care, not a wait-and-see approach.