Why Is My Stomach Hurting? Causes and Red Flags

Stomach pain has dozens of possible causes, ranging from something you ate a few hours ago to conditions that need medical attention. The key to narrowing it down is paying attention to where exactly the pain is, what it feels like, when it started, and what makes it better or worse. Most stomach pain resolves on its own within a day or two, but certain patterns point to specific problems worth knowing about.

Where the Pain Is Matters

Your abdomen houses many organs packed into a relatively small space, and pain in different areas often points to different sources. Upper belly pain, especially on the right side, is commonly linked to gallbladder or liver issues. Upper left pain can come from the stomach itself, the pancreas, or occasionally the heart. Lower right pain is the classic location for appendicitis, while lower left pain in adults over 40 often signals diverticulitis, a condition where small pouches in the colon become inflamed.

Pain that’s hard to pinpoint, or that seems to move around, is more typical of conditions affecting the intestines broadly: gas, bloating, food intolerance, or irritable bowel syndrome (IBS). Pain that starts around your belly button and migrates to the lower right over several hours is a well-known pattern for appendicitis and worth taking seriously.

The Most Common Culprits

For most people searching this question, the cause falls into one of a few everyday categories.

Indigestion and gastritis. Inflammation of the stomach lining causes a burning or gnawing ache in the upper belly. It’s often triggered by anti-inflammatory painkillers (like ibuprofen), alcohol, or a bacterial infection called H. pylori. The pain tends to feel worse on an empty stomach and better after eating or taking an antacid.

Food intolerance. If your pain shows up a few hours after eating, a food intolerance is a likely suspect. Lactose and gluten are common triggers, but fructose, certain artificial sweeteners, and high-fat meals can also cause cramping, bloating, and diarrhea. The timeline is the giveaway: symptoms from an intolerance typically appear within a few hours of eating the problem food, not immediately.

Gas and bloating. Trapped gas can produce surprisingly sharp, intense pain that shifts location as it moves through your intestines. It often comes with visible bloating and relief after passing gas or having a bowel movement. Carbonated drinks, beans, cruciferous vegetables, and eating too quickly are frequent triggers.

Constipation. When stool backs up, it causes cramping and pressure, usually in the lower left abdomen. The pain often builds over days and resolves once you have a bowel movement.

Irritable bowel syndrome. IBS is diagnosed when you have recurring belly pain at least one day per week for three months, with symptoms that started at least six months earlier. The pain is typically tied to bowel movements and often accompanied by changes in stool frequency or consistency. IBS is a disorder of how the gut and brain communicate, not structural damage, which is why imaging tests come back normal.

Peptic Ulcers Feel Different From Acid Reflux

People often confuse ulcer pain with general heartburn, but the timing is distinct. Peptic ulcer pain is a dull, gnawing ache that typically shows up two to three hours after eating, or in the middle of the night when the stomach is empty. Eating something or taking an antacid usually brings relief. The pain can come and go for days or weeks before becoming persistent.

Acid reflux, by contrast, tends to flare during or shortly after meals and causes a burning sensation that rises up toward the chest and throat, especially when lying down. If your pain follows the ulcer pattern, particularly if you take anti-inflammatory painkillers regularly, it’s worth getting evaluated.

Gallbladder and Pancreas Pain

Gallstone attacks produce intense pain in the upper right abdomen, often after a fatty meal. The pain can radiate to the right shoulder blade and last anywhere from 30 minutes to several hours. Nausea and vomiting are common. Gallbladder problems are more prevalent in women, people over 40, and those with a family history.

Pancreatitis, often caused by gallstones or heavy alcohol use, creates pain in the upper belly that spreads to the back. Acute pancreatitis comes on suddenly with severe pain, nausea, vomiting, fever, and a rapid heartbeat. Chronic pancreatitis produces ongoing upper belly pain that worsens after eating, along with unintentional weight loss and foul-smelling stools. Both forms need medical evaluation.

Pain That Isn’t From the Gut

Not all belly pain originates in the digestive system. Kidney stones cause sharp, stabbing pain in the back or side of the lower torso that can radiate to the groin. Blood in the urine is a telltale sign. The pain tends to come in waves and can be excruciating.

Urinary tract infections produce a different pattern: pressure and pain in the lower abdomen around the pubic bone, along with a burning sensation during urination and the frequent urge to go. Both conditions cause belly pain, but the location and accompanying symptoms help distinguish them.

In women, ovarian cysts, fibroids, ectopic pregnancy, and pelvic inflammatory disease can all cause lower abdominal pain. A pregnancy test is a standard early step in evaluating abdominal pain in premenopausal women, even for those using contraception, because ectopic pregnancy can be life-threatening.

Red Flags That Need Prompt Attention

Most stomach pain is benign, but certain combinations of symptoms suggest something more serious:

  • Severe pain with fever can indicate an infection or inflammation like appendicitis, diverticulitis, or peritonitis (infection of the abdominal lining).
  • Pain with blood in your stool needs evaluation quickly, as it can signal anything from inflammatory bowel disease to a more urgent surgical condition.
  • Pain that steadily worsens over hours rather than coming and going is more concerning than pain that fluctuates.
  • Pain with an inability to keep food or water down raises the risk of dehydration and may point to a blockage or severe inflammation.
  • Pain so severe it prevents you from standing or walking warrants emergency care.

If the pain is a new kind of sensation you haven’t experienced before, or if it interferes with your ability to go about your day, that alone is reason enough to get checked.

What You Can Do at Home

For mild, non-alarming pain, a few strategies can help. If the pain is crampy and related to bloating or gas, a heating pad on the belly and gentle movement like walking can help things move through. Avoiding the foods that triggered the episode is obvious but worth noting: keep a mental log of what you ate in the hours before the pain started.

Over-the-counter antacids can relieve upper belly pain related to acid or gastritis. For cramping and spasm-type pain, antispasmodic medications work by relaxing the smooth muscle in the intestines. These are commonly used for IBS and similar conditions. Avoid anti-inflammatory painkillers like ibuprofen for stomach pain, as they can irritate the stomach lining and make things worse.

If your pain follows a pattern, that information is the most useful thing you can bring to a doctor’s visit. Track when the pain happens (before meals, after meals, at night), where exactly it is, what makes it better or worse, and whether it comes with other symptoms like changes in bowel habits, nausea, or fever. These details help distinguish between conditions that look similar on the surface but require very different approaches.