Pain at the top of your stomach, the area doctors call the epigastrium, sits right below your breastbone and above your belly button. It is one of the most common reasons people visit a doctor, and the list of potential causes ranges from a heavy meal to a heart attack. The most frequent culprits are acid-related conditions like gastritis and peptic ulcers, but functional problems, gallbladder disease, pancreatitis, and even stress-driven gut sensitivity can produce nearly identical pain in the same spot. Sorting out what is going on usually depends less on the pain itself and more on the pattern around it.
Gastritis and Peptic Ulcers
The single most recognized cause of upper stomach pain is irritation or damage to the lining of the stomach or the first part of the small intestine. Gastritis refers to inflammation of the stomach lining, while a peptic ulcer is a deeper break in that lining. Both produce a gnawing or burning ache in the upper abdomen that often flares after eating or on an empty stomach, depending on where the damage sits. Peptic ulcer disease is driven by an imbalance between the acid your stomach produces and the protective mucus layer that normally shields the tissue.1Journal of Research in Pharmaceutical Science. Peptic Ulcer Disease: Etiology, Epidemiology, and the Evolving Role of Helicobacter Pylori and NSAIDs
Two factors tip that balance more than anything else. The first is infection with a bacterium called H. pylori, which burrows into the mucus layer and triggers chronic inflammation. The second is regular use of nonsteroidal anti-inflammatory drugs like ibuprofen and aspirin, which suppress the chemicals that help maintain the mucus barrier. Genetic predisposition, smoking, and heavy alcohol use also play a role, but H. pylori and NSAIDs account for the vast majority of cases. If your upper stomach pain is worse on an empty stomach and improves briefly after eating, or if you notice dark or tarry stools, an ulcer is high on the list of suspects.
Functional Dyspepsia
Sometimes all the tests come back normal. No ulcer, no inflammation, no obvious damage anywhere. The pain or discomfort persists anyway. This is functional dyspepsia, and it is surprisingly common. The defining feature is chronic or recurring pain or fullness in the upper abdomen without a clear structural explanation.
What seems to go wrong in functional dyspepsia is that the stomach becomes hypersensitive to normal events like stretching after a meal. Research using a device called a barostat, which measures the stomach’s response to being gently inflated, has found that people with functional dyspepsia can experience discomfort at lower levels of distension than healthy volunteers do, particularly after eating.2PubMed Central. Patients with headache and functional dyspepsia present meal-induced hypersensitivity of the stomach The stomach is not damaged; it simply reports normal signals as painful. That finding matters practically because it means acid-reducing drugs often help only partially or not at all. Treatments that address nerve sensitivity or gut-brain communication tend to be more effective.
How Fatty Foods Make It Worse
If your upper stomach pain reliably gets worse after rich, greasy meals, there is a specific mechanism behind that. Fats sitting in the stomach and upper small intestine trigger the release of a hormone called cholecystokinin, or CCK. In people with functional dyspepsia, CCK amplifies the stomach’s sensitivity to being stretched, making nausea, bloating, and pain feel more intense than they otherwise would. Studies have shown that lipids are a major trigger of dyspeptic symptoms during stomach distension and that this effect is dose-related, meaning fattier meals produce proportionally more discomfort.3PubMed Central. The role of fat and cholecystokinin in functional dyspepsia
This does not mean fat is the only dietary trigger. Carbonated drinks, very spicy food, caffeine, and alcohol can all irritate the upper stomach. But fat is uniquely potent because of how directly it manipulates the hormonal signaling that governs stomach sensation. If you notice a clear pattern with fatty foods, reducing portion sizes and fat content at meals is one of the simplest first steps, and it sometimes resolves the problem without any medication at all.
Gallbladder Trouble
The gallbladder sits tucked under the liver in the upper right part of your abdomen, but the pain it produces often localizes to the upper middle stomach or radiates around to the back and right shoulder blade. Classic gallbladder pain, called biliary colic, comes in waves. A typical attack starts within an hour of eating, builds to a steady ache, and lasts anywhere from twenty minutes to several hours before gradually fading.
Gallstones are the usual cause, but not the only one. Some people have all the symptoms of biliary colic with completely normal ultrasound scans. Surgeons have studied this scenario and found that a subset of these patients still benefit from gallbladder removal, suggesting that the gallbladder can malfunction without visible stones.4PubMed. Laparoscopic cholecystectomy for symptoms of biliary colic in the absence of gallstones If your pain is episodic, triggered by meals, and located in the upper right or upper center of your abdomen, gallbladder disease is worth investigating even if an initial ultrasound looks clean. A specialized test called a HIDA scan, which tracks how the gallbladder contracts, can sometimes catch problems that ultrasound misses.
Pancreatitis
The pancreas sits behind the stomach, and when it becomes inflamed the pain tends to be severe, steady, and located in the upper middle abdomen with a characteristic radiation straight through to the back. People often describe it as boring or drilling. Leaning forward sometimes helps, and lying flat usually makes it worse.
Acute pancreatitis can be triggered by gallstones blocking the pancreatic duct, heavy alcohol use, high triglyceride levels, or certain medications. The pain mechanism is complex, involving enzymatic autodigestion of the pancreas itself, inflammation, swelling, and reduced blood flow to the tissue.5IntechOpen. Causes and Management of Acute Pancreatitis Pain in the Intensive Care Unit Severe acute pancreatitis is a medical emergency, but milder forms can sometimes present as persistent upper stomach pain that a person might mistake for a bad case of indigestion. If the pain is unusually intense, accompanied by vomiting, and not improving within a few hours, get it evaluated promptly. Blood tests measuring pancreatic enzymes can usually confirm or rule out pancreatitis quickly.
Gastroparesis
Gastroparesis means the stomach empties its contents into the small intestine more slowly than normal, even though there is no physical blockage. Food sits in the stomach longer than it should, leading to early fullness after just a few bites, nausea, bloating, and upper abdominal pain. The condition is diagnosed after other structural causes have been excluded and a gastric emptying test confirms the delay.6Gastrointestinal Disorders. Role of Gastric Emptying in Symptoms of Gastroparesis
Diabetes is the most commonly identified cause, because long-standing high blood sugar can damage the vagus nerve, which controls stomach contractions. But many cases have no identifiable cause at all. If your upper stomach pain comes with a persistent feeling of fullness long after eating, or if you feel nauseated after meals that used to be a normal size for you, gastroparesis is worth discussing with a doctor. The reliable way to diagnose it is a four-hour gastric emptying study using either scintigraphy or a breath test, since shorter tests can miss milder delays.
Stress and the Gut-Brain Connection
The link between stress and stomach pain is not just psychological folklore. The gut and the brain are in constant two-way communication through what researchers call the gut-brain axis, and stress is a major risk factor for visceral pain as well as a factor that keeps it going once it starts.7PubMed Central. Connecting dots in disorders of gut-brain interaction: the interplay of stress and sex hormones in shaping visceral pain Chronic stress can alter the bacterial makeup of the gut, change how the vagus nerve functions, and dysregulate the body’s hormonal stress response, all of which can ramp up inflammation and make the nervous system more sensitive to pain signals coming from the gut.8PubMed Central. The brain-gut axis and chronic pain: mechanisms and therapeutic opportunities
What makes this frustrating is that the pain can persist long after the original stressor has passed. The nervous system essentially learns to interpret ordinary gut signals as threatening, a process sometimes called central sensitization. This is one reason why people with chronic upper stomach pain often find that it worsens during stressful periods and improves during vacations, yet never fully goes away. Treatments targeting the brain side of the equation, including certain low-dose antidepressants, cognitive behavioral therapy, and gut-directed hypnotherapy, can be surprisingly effective for this type of pain, even when acid-reducing medications have failed.
When the Problem Is Actually Your Heart
This is the one people do not expect. A heart attack does not always present with crushing chest pain radiating down the left arm. In some cases, the main symptom is epigastric pain, the exact same location as a bad case of indigestion. International guidelines have noted that atypical symptoms like epigastric pain, a feeling of indigestion, or breathlessness are more common in women.9PubMed Central. Atypical Presentations of Myocardial Infarction: A Systematic Review of Case Reports But men can present this way too, particularly older men and people with diabetes, whose nerve damage can blunt the classic chest pain signal.
The practical takeaway is simple: if your upper stomach pain is sudden, severe, accompanied by sweating, lightheadedness, jaw or arm discomfort, or shortness of breath, do not assume it is your stomach. Call emergency services. An electrocardiogram and a blood test for cardiac enzymes can sort this out in minutes. The overlap between cardiac pain and stomach pain is real enough that emergency departments routinely check the heart first in anyone over a certain age who comes in with upper abdominal pain.
Abdominal Wall Pain and Nerve Entrapment
Not all upper stomach pain comes from inside the abdomen. The abdominal wall itself contains nerves that can become trapped or irritated, producing localized pain that mimics an internal problem. This condition, known as abdominal cutaneous nerve entrapment syndrome, or ACNES, is widely considered to be underdiagnosed. People with ACNES tend to have a small area of tenderness, usually about the size of a fingertip, that can be pinpointed precisely. The pain often worsens with movements that tense the abdominal muscles, like rolling over in bed or crunching forward.
A useful bedside test is Carnett’s sign: the doctor presses on the sore spot, then asks you to tense your abdominal muscles by lifting your head off the table. If the pain gets worse rather than better with tensing, it suggests the problem is in the abdominal wall rather than deeper inside. This matters because ACNES can be treated with a simple local anesthetic injection into the trigger point, sometimes resolving months or years of pain in a single visit. Many people with ACNES go through extensive and expensive workups for internal problems before someone thinks to check the abdominal wall.
Median Arcuate Ligament Syndrome
This is a rare one, but worth mentioning because it is notoriously difficult to diagnose and often only identified after everything else has been ruled out. Median arcuate ligament syndrome occurs when a fibrous band near the diaphragm compresses the celiac artery, the blood vessel that supplies the stomach, liver, and spleen. The compression restricts blood flow and can cause upper abdominal pain, nausea, and vomiting, typically worsening after meals when the gut demands more blood.10PubMed Central. Chronic Abdominal Pain in Median Arcuate Ligament Syndrome: A Diagnostic and Therapeutic Challenge
The symptoms are maddeningly nonspecific, which is why many patients endure years of investigation before the diagnosis is made. CT angiography during exhalation can reveal the characteristic compression of the celiac artery, but even that finding can be incidental in people without symptoms. In severe cases, the restricted blood flow can lead to the formation of aneurysms in smaller arteries that try to compensate for the reduced flow through the celiac trunk.11PubMed Central. A Case of a Right Gastric Artery Aneurysm Caused by the Collateral Flow Changes Due to the Coexistence of Median Arcuate Ligament Syndrome and a Celiac Artery Anomaly Surgical release of the ligament is the definitive treatment when the diagnosis is confirmed and symptoms are significant.
Why Visceral Pain Is So Hard to Pinpoint
One of the frustrating aspects of upper stomach pain is that it all feels roughly the same regardless of the cause. A peptic ulcer, a gallbladder attack, pancreatitis, and cardiac ischemia can all produce pain in the same general area, sometimes with similar quality. This is because the organs in your upper abdomen share overlapping nerve pathways that converge on the same segments of the spinal cord. Your brain receives the signal and interprets it as “something hurts up there” without much ability to distinguish which organ sent it.12PubMed Central. Visceral pain: the ins and outs, the ups and downs
This convergence is also why visceral pain from the stomach or pancreas can be felt in the back, shoulders, or chest. The brain misattributes the signal to areas of the body surface that share the same spinal nerve segments. Knowing this helps explain why doctors rely so heavily on the timing, triggers, and accompanying symptoms of the pain rather than its exact location. “It hurts right here” is useful information, but “it started two hours after eating, it radiates to my back, and I’ve been vomiting” tells the clinician far more about which organ is involved.
Red Flags That Warrant Urgent Evaluation
Most upper stomach pain turns out to be something manageable: acid reflux, mild gastritis, functional dyspepsia, dietary indiscretion. But certain accompanying features change the urgency dramatically. A systematic review of serious illness presenting as acute abdominal pain found that low blood pressure, a rapid heart rate relative to blood pressure, and certain physical exam findings substantially increase the likelihood that something dangerous is happening.13PubMed Central. Signs and symptoms of serious illness in adults with acute abdominal pain presenting to ambulatory care: a systematic review
Beyond what the research identifies, there are practical warning signs anyone can watch for:
- Vomiting blood: bright red or dark, coffee-ground-like material suggests bleeding in the stomach or esophagus.
- Black, tarry stools: another sign of upper gastrointestinal bleeding.
- Unintended weight loss: dropping weight without trying, especially alongside new upper stomach pain, warrants investigation for ulcers or malignancy.
- Sudden, severe pain: especially if it starts abruptly and does not let up within an hour or two.
- Pain with fever and chills: suggests infection, possibly from a perforated ulcer, cholecystitis, or an abscess.
- Pain with sweating or breathlessness: raises the possibility of a cardiac event, as discussed above.
If your pain is mild, comes and goes, and has been present for weeks without any of these features, a scheduled visit to your doctor is appropriate. If any of the red flags above are present, do not wait for a convenient appointment.
Common Medications That Irritate the Upper Stomach
Sometimes the cause of upper stomach pain is sitting in your medicine cabinet. NSAIDs like ibuprofen, naproxen, and aspirin are the most well-known offenders, capable of causing everything from mild irritation to full-blown ulcers with regular use. But they are not the only medications that can irritate the stomach lining. Iron supplements are notorious for causing upper abdominal discomfort and nausea. Certain antibiotics, particularly erythromycin and tetracyclines, can trigger stomach pain. Bisphosphonates prescribed for osteoporosis are known to irritate the esophagus and upper stomach if not taken correctly, meaning with a full glass of water and while remaining upright.
Potassium supplements, some blood pressure medications, and even over-the-counter pain relievers containing caffeine can contribute. If your upper stomach pain started around the same time you began a new medication, that timing is worth mentioning to your doctor. In many cases, switching to a different formulation or adjusting how you take the medication resolves the issue entirely. Taking NSAIDs with food, for instance, reduces stomach irritation for most people, though it does not eliminate the risk with long-term use.
The Age Factor
What causes upper stomach pain shifts somewhat with age. In younger adults, functional dyspepsia and acid reflux account for the majority of cases. The likelihood of peptic ulcer disease rises with age, partly because older adults are more likely to use NSAIDs for joint pain and arthritis. Gallbladder disease becomes increasingly common from the forties onward, particularly in women. Pancreatitis peaks in middle age and is more common in people who drink heavily.
In older adults, the stakes change. The risk of atypical heart attack presentations climbs with age, making the cardiac explanation more important to rule out. Stomach cancer, while uncommon overall, is much more of a concern in someone over sixty with new-onset upper stomach pain, weight loss, or difficulty swallowing than in a twenty-five-year-old with the same symptoms. This is why doctors are generally more aggressive about ordering endoscopy and imaging in older patients with new or changing upper abdominal pain, even when the symptoms sound benign. Age alone does not make a diagnosis, but it meaningfully shifts the probability of what is causing the problem.