Stomach pain has dozens of possible causes, ranging from something you ate a few hours ago to a condition that needs medical attention. The single most useful clue is where exactly the pain is and what it feels like. A dull ache spread across your midsection points to very different problems than a sharp, localized stab under your right ribs. Understanding a few key patterns can help you figure out what’s going on and whether you need to act quickly.
Where the Pain Is Matters Most
Your abdomen contains organs stacked on top of each other, and each one tends to announce trouble in a predictable spot. Pain in the upper middle area, between your ribs, is most often linked to acid reflux, stomach lining irritation (gastritis), or a stomach ulcer. Pain under your right ribs usually involves the gallbladder or liver. Pain under your left ribs can point to the spleen or, again, the stomach.
Pain around your belly button is trickier. It can signal early appendicitis, a small bowel obstruction, an ulcer, or inflammation of the pancreas. Lower right pain is the classic location for appendicitis once it progresses. Lower left pain is the signature spot for diverticulitis, a condition where small pouches in the colon become inflamed. Pain on either side of the lower abdomen in women may involve the ovaries, while flank pain that wraps from back to front often comes from kidney stones or a kidney infection.
Pain that shows up in an unexpected place is called referred pain. Your brain sometimes maps organ distress to the wrong location because internal organs have fewer nerve endings than your skin and muscles. A stomach ulcer, for instance, can be felt in the chest. Gallbladder problems can send pain to the right shoulder. Pancreas inflammation often radiates straight through to the mid-back.
What the Pain Feels Like
The quality of your pain is as telling as its location. A deep, crampy, hard-to-pinpoint ache is called visceral pain. It comes from the organs themselves, which have relatively few pain-sensing nerves spread far apart. Your brain knows something is wrong but can’t give you a precise address. This is typical of gas, bloating, menstrual cramps, and early stages of many abdominal conditions.
Sharp, well-localized pain that gets worse when you press on it or move is somatic pain. It involves the abdominal wall or the lining of the abdominal cavity. This type of pain is more concerning because it often means irritation or inflammation has spread beyond the organ itself, as happens when an appendix is close to rupturing or when an ulcer has perforated.
Gastritis, Ulcers, and Acid-Related Pain
These are among the most common reasons for upper stomach pain. Gastritis is a general inflammation of the stomach lining. An ulcer is a specific eroded patch in that lining. Both cause a burning or gnawing feeling, but ulcers tend to produce more intense, localized pain. A hallmark of an ulcer is feeling very hungry one to three hours after eating, while gastritis more often flares between meals or at night as a broader burning sensation.
Ulcers carry additional risks, including bleeding, so dark or tarry stools alongside upper abdominal pain warrant prompt attention. Acid reflux (GERD) overlaps with both conditions and adds heartburn and regurgitation to the picture, especially after meals or when lying down.
Gallbladder and Pancreas Pain
Gallstone pain, sometimes called biliary colic, is an ache under the right rib cage that often kicks in after a fatty meal. It can last minutes to hours and may radiate to the right shoulder blade. If a gallstone blocks the duct leading to the pancreas, it can trigger pancreatitis, which causes severe upper left or upper middle abdominal pain that may feel like squeezing and radiate to the chest, shoulder, or back. Pancreatitis pain typically worsens after eating and can persist for days.
Food Poisoning vs. a Stomach Bug
Both cause nausea, vomiting, diarrhea, and cramping, but the timeline is different. Food poisoning hits fast, usually two to six hours after eating contaminated food, and tends to resolve relatively quickly. A stomach virus (viral gastroenteritis) has a longer incubation period of 24 to 48 hours and typically lasts about two days, sometimes longer. If multiple people who ate the same meal get sick within hours, food poisoning is the likely cause. If symptoms creep in a day or two after contact with someone who was ill, a virus is more probable.
Food Intolerance vs. Food Allergy
If your stomach hurts predictably after certain foods, you may have an intolerance or an allergy, and the distinction matters. A food intolerance is a digestive problem, often caused by a missing enzyme. Lactose intolerance is the classic example: your body can’t fully break down milk sugar, so it ferments in the gut and causes bloating, cramps, and diarrhea. Symptoms are uncomfortable but not dangerous.
A true food allergy involves the immune system and can cause symptoms beyond the gut, including hives, swelling, and in severe cases, difficulty breathing. If abdominal pain after a specific food is your only symptom, intolerance is far more likely.
When Pain Keeps Coming Back: IBS
Irritable bowel syndrome is one of the most common causes of chronic, recurring stomach pain. The current diagnostic standard requires abdominal pain at least one day per week for three months, with symptom onset at least six months before diagnosis. The pain is typically linked to bowel movements and accompanied by changes in stool frequency or consistency. IBS doesn’t damage the intestines, but it can significantly affect quality of life. It’s diagnosed after other conditions have been ruled out.
Appendicitis: A Pain Pattern Worth Knowing
Appendicitis follows a distinctive migration pattern. Pain typically starts as a vague ache around the belly button. It may hover there or come and go for several hours. Then nausea and vomiting develop. After several more hours, the nausea eases and the pain shifts to the lower right abdomen, becoming sharper and more constant. The most tender spot ends up about two inches along an imaginary line drawn from the bony point of your hip toward your belly button. Not every case follows this textbook progression, but when pain migrates from center to lower right, appendicitis should be on your radar.
Signs You Need Emergency Care
Most stomach pain resolves on its own or with simple treatment. But certain patterns signal something serious. According to the American College of Emergency Physicians, you should seek emergency care if:
- The pain is sudden and severe, or does not ease within 30 minutes.
- You can’t stop vomiting, especially if vomit contains blood or looks like coffee grounds.
- Your abdomen is rigid or extremely tender to touch.
- You have a high fever alongside abdominal pain.
- You notice bloody or black stools.
- You’re pregnant and experiencing severe abdominal pain or vaginal bleeding, which could indicate an ectopic pregnancy.
What Happens if You Get It Checked Out
If your pain is persistent or concerning enough to see a provider, the workup depends on where it hurts. For upper right pain, an ultrasound is typically the first imaging test because it’s excellent at spotting gallstones and liver issues. For lower right or lower left pain, a CT scan is generally preferred because it can identify appendicitis, diverticulitis, and other conditions in that area more reliably. For pregnant patients, ultrasound and MRI are used instead of CT to avoid radiation. In many cases, blood work and a physical exam are enough to narrow things down before any imaging is needed.
For pain that’s vague or spread across the abdomen with no obvious cause from the history and exam, a CT scan is typically the go-to if there’s concern about something serious. If the pain is chronic and no red flags are present, your provider may start with lab tests and dietary changes before moving to imaging.