Stomach pain has dozens of possible causes, ranging from something as simple as trapped gas to conditions that need urgent medical attention. Pain receptors throughout your abdomen respond to both mechanical triggers (stretching, compression, muscle contractions) and chemical ones (acid, inflammation). Understanding where your pain is, how it feels, and what else is happening in your body can help you narrow down what’s going on.
Food and Drink Are the Most Common Triggers
If your stomach hurts after eating, a food intolerance is one of the likeliest explanations. Lactose intolerance is the most common type, where your body can’t properly break down the sugar in milk, cheese, and yogurt. The undigested lactose ferments in your gut, producing gas, bloating, cramps, and sometimes diarrhea. You can also be intolerant to gluten (found in wheat, rye, and barley), caffeine, alcohol, histamine in aged foods like wine and cheese, or food additives like MSG.
Food intolerance is different from a food allergy. An allergy triggers your immune system and can cause hives, swelling, or trouble breathing. An intolerance is a digestive problem: your gut struggles to process something, and the result is pain, bloating, or nausea, usually within a few hours of eating. Keeping a food diary for two to three weeks can help you spot patterns between what you eat and when the pain hits.
Gas, Bloating, and Constipation
Trapped gas is one of the most frequent causes of sharp, cramp-like stomach pain, and it can feel surprisingly intense. Gas builds up when bacteria in your large intestine ferment undigested carbohydrates, or when you swallow excess air from eating too fast, chewing gum, or drinking carbonated beverages. The pain often shifts location and comes in waves as gas moves through your intestines.
Constipation creates a different kind of discomfort: a dull, persistent ache, usually in the lower left abdomen. When stool builds up and stretches the walls of your colon, the pressure activates pain receptors. This is especially common in children, where constipation accounts for a large share of stomach ache complaints.
Stomach Infections
A stomach virus (gastroenteritis) causes cramping, nausea, vomiting, and diarrhea that typically peaks within 24 to 48 hours and resolves on its own. Food poisoning follows a similar pattern but usually comes on faster, often within hours of eating contaminated food.
A more persistent culprit is a bacterium called H. pylori. More than half of all people worldwide carry this infection at some point in their lives. It burrows into the stomach lining and can cause a burning or aching pain that feels worse on an empty stomach, along with bloating, frequent burping, and loss of appetite. About 10% to 15% of people with H. pylori eventually develop a stomach ulcer. The infection is treatable, but it won’t go away on its own.
Stress and Anxiety
Your gut and brain are in constant two-way communication. Stress, anxiety, and depression directly influence the physical movement and contractions of your digestive tract. This isn’t “imagined” pain. Psychological factors change the actual physiology of your gut, speeding up or slowing down digestion, increasing acid production, and tightening muscles in the intestinal wall.
On top of that, people who experience chronic stress often become more sensitive to pain signals from the gut. Their brains are more responsive to those signals, so normal digestive activity that wouldn’t bother someone else registers as genuine discomfort. Stress can also make existing digestive pain feel significantly worse, creating a cycle that’s hard to break without addressing both the physical and emotional sides.
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 weaken the protective lining of your stomach in two ways: they strip away the fatty barrier that shields the stomach wall from acid, and they reduce blood flow to the lining itself. Without that protection, stomach acid eats into the tissue, causing irritation, erosions, or ulcers. Studies show that 15% to 40% of long-term users develop ulcers. Even short-term use can cause burning pain, nausea, or a sense of heaviness after eating.
Taking these medications with food or switching to acetaminophen (which works differently and spares the stomach lining) can reduce the risk. If you rely on anti-inflammatory painkillers regularly and notice stomach discomfort, that connection is worth paying attention to.
Where the Pain Is Matters
The location of your pain offers real clues about the cause. Doctors divide the abdomen into four quadrants, and certain conditions cluster in predictable spots.
- Upper right: Pain here often points to gallbladder problems, especially if it flares after fatty meals. Gallstones or gallbladder inflammation are the most common causes in this area.
- Upper left or upper middle: This region is associated with stomach ulcers, acid reflux, and pancreatitis. Pancreatitis pain is often severe, may radiate to the back, and gets worse after eating.
- Lower right: The classic location for appendicitis. The pain often starts vaguely around the belly button, then migrates to the lower right over several hours, becoming sharper and more localized.
- Lower left: In adults, the most common cause of pain here is diverticulitis, where small pouches in the colon wall become inflamed. Up to 25% of people with these pouches eventually develop diverticulitis. Constipation also frequently causes lower left pain.
Pain that’s hard to pinpoint or feels spread across your whole abdomen is more typical of gas, a stomach virus, IBS, or stress-related digestive issues.
IBS vs. Inflammatory Bowel Disease
Irritable bowel syndrome (IBS) is a syndrome, not a disease. It causes chronic abdominal pain, bloating, gas, and alternating diarrhea and constipation, but it doesn’t damage the intestines. Scans and scopes come back looking normal. Diagnosis is based on symptoms: at least 12 weeks of abdominal discomfort over the past year, linked to changes in how often you go or what your stool looks like, with pain that improves after a bowel movement.
Inflammatory bowel disease (IBD), which includes Crohn’s disease and ulcerative colitis, is a different situation entirely. IBD causes visible inflammation and permanent damage to the intestinal lining, and it shows up clearly on imaging and biopsies. Warning signs that point toward IBD rather than IBS include bleeding, unexplained weight loss, anemia, and fever. IBD also carries an increased risk of colon cancer over time, while IBS does not.
Stomach Pain in Children
Kids complain about stomachaches frequently, and the causes are usually benign: constipation, gas, a stomach virus, swallowing air, food intolerance, or anxiety. In younger children, colic and acid reflux are common. School-age children sometimes develop “abdominal migraines,” recurring episodes of belly pain without a clear structural cause, often linked to the same triggers as head migraines.
More serious possibilities in children include appendicitis, bowel obstruction, and intussusception (where part of the intestine folds into itself, most common under age 3). A child who has severe pain that won’t let up, vomiting that won’t stop, a swollen or rigid belly, or blood in the stool needs prompt evaluation.
When Stomach Pain Is an Emergency
Most stomach pain resolves on its own or with simple changes. But certain patterns signal something that needs immediate attention. Seek emergency care if:
- The pain is sudden and severe, or doesn’t ease within 30 minutes. Sudden abdominal pain can indicate a perforated ulcer, ruptured blood vessel, or twisted bowel.
- You’re vomiting continuously alongside severe, unrelenting pain.
- You have signs of appendicitis: pain that starts near the belly button and moves to the lower right abdomen, with nausea, vomiting, loss of appetite, or fever.
- You’re pregnant and experiencing severe abdominal pain with vaginal bleeding, which may indicate an ectopic pregnancy.
- Your abdomen is rigid or swollen and tender to the touch, especially with fever or a rapid pulse.
Pancreatitis is another condition that can start mild and escalate. The pain sits in the upper middle abdomen, often radiating to the back, and gets worse after eating. If it persists for more than a day or comes with fever, nausea, and a swollen belly, that combination warrants urgent evaluation.

