Stomach pain has dozens of possible causes, ranging from something as simple as eating too fast to conditions that need medical attention. Most episodes are short-lived and harmless, but where the pain sits, how it feels, and how long it lasts all offer clues about what’s going on inside. Understanding those clues can help you figure out whether to wait it out, change something in your routine, or get checked out.
Why Stomach Pain Feels Different Depending on the Cause
Your abdomen contains two different pain-signaling systems, and which one fires determines what you feel. The organs themselves, like the stomach, intestines, and gallbladder, are wired with slow nerve fibers that produce a dull, achy, hard-to-pinpoint sensation. This is why gas pain or an upset stomach often feels like a vague cramping somewhere in the middle of your belly rather than a precise spot you can point to.
The lining of your abdominal wall, on the other hand, has a dense network of fast nerve fibers that detect pressure, touch, friction, and temperature with precision. When inflammation or infection spreads from an organ to this lining, the pain sharpens and localizes. That shift from vague discomfort to a specific, sharp pain in one spot is often a sign that something more serious is developing.
The Most Common Everyday Causes
The majority of stomachaches come from a short list of culprits that resolve on their own or with minor changes.
Indigestion and gas. Eating too quickly, swallowing air, or consuming gas-producing foods like beans, carbonated drinks, or cruciferous vegetables stretches the stomach or intestinal walls. The result is bloating, pressure, and crampy pain that usually passes within a few hours.
Gastritis. This is inflammation of the stomach lining, and it’s one of the most common reasons for a burning or gnawing pain in the upper-middle abdomen. A bacterial infection called H. pylori is the leading infectious cause. The initial infection is typically silent, but over weeks the immune system mounts a chronic inflammatory response that damages the stomach lining. Long-term use of common pain relievers like ibuprofen and aspirin is the other major cause. Over-the-counter acid reducers can ease symptoms, but if the burning lasts more than three months, that’s a signal to get evaluated rather than keep self-treating.
Stomach ulcers. When gastritis goes far enough, it can erode through the protective mucus layer and create an open sore. About 25% of people who regularly use anti-inflammatory pain relievers develop ulcers. H. pylori also plays a major role: the bacteria impair the stomach’s ability to produce the mucus and bicarbonate that shield it from its own acid. Ulcer pain is often a burning sensation in the upper abdomen that may get better or worse with eating, depending on where the ulcer sits.
Constipation. One of the most underestimated causes of belly pain. When stool builds up in the colon, it causes distension and cramping that can radiate across the lower abdomen or even feel like it’s coming from higher up.
Food Reactions: Allergy vs. Intolerance
If your stomach hurts after eating certain foods, the timing and type of symptoms reveal whether you’re dealing with an allergy or an intolerance. A true food allergy triggers an immune response involving antibodies that react to a specific protein in food. Symptoms appear quickly, often within minutes, and can include itching, hives, or throat swelling alongside stomach pain.
Food intolerance is far more common and has nothing to do with the immune system. It happens when your body can’t properly break down a food component, like the lactose in dairy or the fructose in certain fruits. Symptoms are limited to the gut: bloating, gas, cramps, and diarrhea, typically showing up within a few hours. Celiac disease falls somewhere in between. It is immune-mediated but involves a different, slower pathway, so symptoms can develop hours or even days after eating gluten.
Irritable Bowel Syndrome
Roughly 11 to 13% of the global population has irritable bowel syndrome, making it one of the most common causes of recurring stomach pain. IBS involves cramping, bloating, and changes in bowel habits (diarrhea, constipation, or both) without any visible damage to the intestines. Pain often improves after a bowel movement and worsens during periods of stress.
IBS is a disorder of how the gut and brain communicate rather than a structural problem. That distinction matters because it means imaging and blood tests come back normal, which can be frustrating if you’re looking for answers. Diagnosis is based on symptom patterns: recurring abdominal pain at least one day per week for three months, associated with changes in stool frequency or appearance.
How Stress Causes Real Stomach Pain
Stress-related stomach pain is not imagined. Your gut has its own nervous system containing hundreds of millions of nerve cells, and it’s in constant two-way communication with your brain. When you’re under chronic stress, elevated stress hormones trigger changes in the nerve cells and immune cells lining the gut. Research published in 2023 showed that sustained stress hormones generate an inflammatory type of support cell in the gut, promoting inflammation through immune signaling molecules. Those same stress hormones also reduce the gut’s ability to produce a key chemical messenger that controls muscle contractions, leading to slowed or disordered movement of food through the intestines.
The practical result: stress can cause nausea, cramping, diarrhea, or constipation even when nothing is structurally wrong. For people with IBS or other gut conditions, stress reliably makes symptoms worse.
What the Location of Your Pain Can Tell You
Pain location isn’t a perfect diagnostic tool, but it narrows the possibilities significantly.
- Upper-middle abdomen (below the breastbone): Gastritis, ulcers, acid reflux, pancreatitis. In rare cases, a heart attack can present as upper abdominal pain rather than chest pain.
- Right upper abdomen (under the ribs): Gallstones, gallbladder inflammation, or liver-related issues. Gallbladder pain often flares after fatty meals.
- Left upper abdomen: Spleen problems, though these are uncommon. More often this area aches from gas trapped in the colon’s left bend.
- Right lower abdomen: Appendicitis is the classic concern. The pain often starts around the belly button and migrates to the lower right over several hours. That said, only about 6% of appendicitis cases follow this textbook pattern, so unusual presentations are actually the norm.
- Left lower abdomen: Diverticulitis is the most characteristic cause in adults over 40, though constipation and colon spasms are far more frequent explanations.
- Lower abdomen generally: Urinary tract infections, menstrual cramps, ovarian issues, or hernias all produce pain here.
When Stomach Pain Signals an Emergency
Most stomachaches don’t require urgent care, but certain features change that calculation. Severe pain that comes on suddenly and keeps getting worse, especially if your abdomen feels rigid or extremely tender to touch, can indicate a perforated organ or internal bleeding. Pain that started vague and then sharpened into one specific spot suggests inflammation has spread to the abdominal wall lining.
Other warning signs that warrant prompt evaluation: a fever above 101°F alongside abdominal pain, bloody or black stools, persistent vomiting (especially if it contains blood or looks like coffee grounds), pain so intense you can’t stand up straight, or abdominal pain following an injury. For women of childbearing age, severe one-sided lower abdominal pain with dizziness or missed periods could indicate an ectopic pregnancy, which is a time-sensitive emergency.
Simple Steps That Help Most Stomachaches
For garden-variety stomach pain, a few practical measures cover most situations. Stop eating until the pain settles, then start with bland, small portions. Sip water or clear fluids to stay hydrated, especially if you’ve been vomiting or have diarrhea. A heating pad on your abdomen can relax cramped muscles and ease discomfort.
Over-the-counter antacids neutralize stomach acid quickly and work well for occasional heartburn or mild gastritis. Acid-reducing medications that lower acid production offer longer relief for persistent burning, but they’re designed for short-term use. If you find yourself reaching for them regularly for more than two weeks, that’s a sign the underlying cause needs attention rather than continued suppression.
Avoid anti-inflammatory pain relievers like ibuprofen or aspirin when your stomach already hurts. These drugs reduce the protective mucus layer in the stomach and can worsen gastritis or trigger ulcers. Acetaminophen is a safer choice for pain relief when your gut is irritated.