Skip to main content

Stomach and digestive health

Upper abdominal pain: causes, how long it lasts and when to get help

Pain in the upper part of the tummy is usually caused by indigestion, gastritis, a stomach ulcer or gallstones. Mild pain that settles within a few days is often not serious. Sudden severe pain, vomiting blood or black sticky poo needs 999 or A&E. Pain that keeps coming back, or lasts longer than a week, needs a GP appointment.

Last checked: 2026-10-11

Key facts

At a glance.

  • What it usually is

    The NHS says tummy pain is common and has lots of possible causes, and most stomach aches are not serious and go away after a few days. In the upper tummy the common culprits are indigestion, gastritis, ulcers and gallstones.

  • How long it lasts

    Gallstone pain can last longer than 30 minutes and up to several hours, the NHS says. Ulcer treatment usually lasts 1 week to 2 months, and gastritis with pain for longer than 1 week needs a GP.

  • Ulcer pain

    The NHS says the pain of a stomach ulcer is usually in the upper part of the tummy, may feel like burning, and is often worse at night.

  • Gallstone pain

    The NHS says gallstone pain can be severe and constant, and sits in the middle of the tummy or just under the ribs on the right side, sometimes with sickness.

  • Pancreatitis is an emergency

    The NHS describes acute pancreatitis as a serious condition where the pancreas suddenly becomes swollen and painful and needs urgent treatment in hospital.

  • Call 999 or go to A&E

    Vomiting bright red blood or vomit that looks like ground coffee, black sticky poo, or sudden severe tummy pain means 999 or A&E, the NHS says.

  • See a GP

    The NHS advises seeing a GP for indigestion that does not go away with treatment, or tummy pain that keeps coming back or lasts longer than 1 week.

What is upper abdominal pain?

The upper abdomen is the area of the tummy below the ribs and above the navel. It contains the stomach, the first part of the small intestine, the liver, the gallbladder and bile ducts, and the pancreas. Pain here can arise from any of them, and sometimes from structures that sit nearby, such as the lower chest or the back.

NICE Clinical Knowledge Summaries uses the term dyspepsia for a complex of upper gastrointestinal symptoms, typically present for four or more weeks, which includes upper abdominal pain or discomfort, heartburn, acid reflux, nausea and vomiting. It adds that reported symptoms are a poor predictor of significant disease, which is why doctors pay close attention to alarm features and not just to the type of pain.

What causes pain in the upper tummy?

The table summarises pain patterns described on NHS pages. Descriptions overlap, so it is not a way to diagnose yourself.

Common causes of upper abdominal pain according to NHS pages
CauseTypical features described by the NHS
Indigestion (dyspepsia)Upper abdominal pain or discomfort, heartburn, acid reflux, nausea; most common causes include reflux, ulcers and functional dyspepsia (NICE CKS)
GastritisIrritated stomach lining causing tummy pain, indigestion, feeling full and bloated, nausea, being sick and reduced appetite
Stomach (peptic) ulcerBurning pain in the upper tummy, often worse at night, with indigestion, heartburn, bloating and sickness
GallstonesSevere, constant pain lasting from 30 minutes up to several hours, in the middle of the tummy or under the right ribs, with sickness
Acute pancreatitisSudden, severe pain in the upper tummy that may spread to the back, with fever, nausea and vomiting; eases leaning forward

Causes in more detail

Gastritis, the NHS says, is caused by infection with Helicobacter pylori, anti-inflammatory painkillers such as ibuprofen and aspirin, drinking too much alcohol, being very stressed and unwell, or surgery on the stomach. Stomach ulcers have the same two main causes, H. pylori infection and regular use of anti-inflammatory painkillers, and are also more common in people who smoke and in older people.

Gallstones are common and often cause no symptoms, the NHS explains. When a stone blocks a bile duct it can cause the pain called biliary colic. Acute pancreatitis is a different problem again, and symptoms can resemble appendicitis or a stomach ulcer.

The NHS also reminds people that tummy pain has many other possible sources, so persistent or unexplained pain deserves a proper assessment.

How long does upper abdominal pain last?

It depends on the cause, and the NHS gives different time frames for different conditions. For an ordinary stomach ache the NHS says most are not serious and go away after a few days. If pain lasts longer than that, keeps coming back or is getting worse, it is worth having checked.

NICE Clinical Knowledge Summaries describes dyspepsia as upper gastrointestinal symptoms that are typically present for four or more weeks. That is the point at which doctors start thinking about testing and treatment rather than simple lifestyle measures.

Time frames the NHS and NICE give for common causes
CauseHow long it tends to last, according to the sources
Simple stomach acheMost are not serious and go away after a few days (NHS)
GastritisSee a GP if tummy pain or indigestion lasts longer than 1 week, or keeps coming back (NHS)
Stomach ulcerTreatment usually lasts from 1 week to 2 months, depending on the cause; symptoms that return after treatment need a GP review (NHS)
Gallstone pain (biliary colic)Longer than 30 minutes and up to several hours per attack (NHS)
Acute pancreatitisMost people start to get better within a week and leave hospital in 5 to 10 days, longer if severe (NHS)
Dyspepsia (indigestion)Typically present for four or more weeks when the term is used clinically (NICE CKS)

What helps at home? Self-care and remedies

If the pain is mild and none of the warning signs below apply, the NHS pages on gastritis and stomach ulcer suggest a number of practical steps. Which ones help depends on the cause, so they are a starting point rather than a cure, and they do not replace a GP review if the pain persists.

A pharmacist can help with mild indigestion. The NHS says they can recommend antacids and alginates to stop stomach acid irritating the stomach and food pipe, or medicines such as proton pump inhibitors that reduce the amount of acid your stomach makes. Some indigestion medicines are taken after eating and some before, so check the leaflet.

Keeping a short diary of when the pain comes on, its relationship to meals, and any other symptoms helps the GP work out the cause.

  • Eat smaller meals, and eat your evening meal 3 to 4 hours before going to bed (NHS stomach ulcer and gastritis pages).

  • Cut back on drinks containing caffeine, such as tea, coffee, cola and energy drinks (NHS gastritis page).

  • Avoid food and drink that triggers symptoms, which can include fatty or spicy foods, coffee and chocolate, and acidic or fizzy drinks (NHS).

  • Do not smoke, and do not drink too much alcohol (NHS).

  • Aim for a healthy weight, and take steps to manage stress (NHS).

  • Speak to a doctor before taking anti-inflammatory painkillers such as ibuprofen if you have stomach symptoms, and talk to your doctor if you regularly take them or aspirin (NHS).

When to get urgent help: warning signs

The NHS pages on stomach ulcer, gastritis, gallstones and pancreatitis set out similar levels of urgency.

  • Call 999 or go to A&E: vomiting bright red blood or vomit like ground coffee; black, sticky and smelly poo or blood in the poo; sudden severe tummy pain; a tummy that is painful to touch; sudden chest pain; severe pain spreading to the back with being sick; yellow skin or eyes; a very high temperature or feeling hot, cold or shivery; a fast heartbeat or difficulty breathing.

  • Ask for an urgent GP appointment or call NHS 111: pain that is getting worse or does not go away; loss of appetite; feeling full after a very small amount of food; losing weight without trying; a feeling of a lump in the tummy; painful or difficult swallowing; repeated vomiting; feeling tired all the time; pain lasting longer than 30 minutes that could be gallstone pain.

  • See a GP in the usual way: indigestion that does not go away with treatment, tummy pain that keeps coming back, or tummy pain or indigestion lasting longer than 1 week with gastritis.

What a GP may do

The NHS says that if a GP thinks you might have a stomach ulcer they may arrange a breath test, stool test or blood test for H. pylori, weigh you and feel your tummy, and may refer you for a gastroscopy, where a thin flexible tube with a camera passes into the stomach. Gallstones are usually checked with an ultrasound scan and a blood test. Acute pancreatitis is usually diagnosed using blood tests and sometimes a CT scan.

NICE CKS describes the assessment of unexplained dyspepsia as asking about alarm symptoms, lifestyle factors, stress, anxiety or depression, reviewing medicines such as NSAIDs, and sometimes arranging a full blood count to check for anaemia. If symptoms persist, a full-dose proton pump inhibitor for one month or testing for H. pylori may be offered, with referral for endoscopy if symptoms are refractory or recur.

Treatment depends on the cause

For stomach ulcers the NHS lists antibiotics for H. pylori and acid-reducing medicines such as proton pump inhibitors, usually for 1 week to 2 months. For gastritis it lists antacids, proton pump inhibitors, alginates and antibiotics, and stopping or changing anti-inflammatory painkillers or alcohol where relevant. The main treatment for gallstones that cause symptoms is surgery to remove the gallbladder, with painkillers and a low-fat diet while waiting.

Acute pancreatitis needs hospital treatment with fluids, nutrients, painkillers and antibiotics if infection is present, plus treatment for the cause. The NHS says most people start getting better within a week and leave hospital in 5 to 10 days.

NHS pathway or a private specialist

On the NHS most people with upper abdominal pain are first assessed by a GP, with referral for ultrasound, endoscopy or gastroenterology if needed. Urgent referral pathways exist for alarm symptoms such as swallowing difficulty or weight loss. Private gastroenterology clinics can offer faster access to gastroscopy and scans. In either route, the tests are the same, and anyone with sudden severe pain, vomiting blood or black stools should go to A&E rather than wait for a routine appointment.

Frequently asked

Questions people ask.

Plain-English answers to the questions people most often ask.

  • What causes pain in the upper stomach?

    Common causes include indigestion, gastritis, stomach ulcers and gallstones. Less commonly it is acute pancreatitis, which is an emergency. The NHS says tummy pain is common and can be caused by lots of different things, so persistent pain deserves a proper assessment rather than guesswork.

  • How long does upper abdominal pain last?

    It varies. The NHS says most stomach aches go away after a few days. Gallstone pain lasts longer than 30 minutes and up to several hours per attack. See a GP if tummy pain or indigestion lasts longer than 1 week, gets worse or keeps coming back.

  • What helps upper abdominal pain at home?

    The NHS suggests smaller meals, eating the evening meal 3 to 4 hours before bed, cutting back on caffeine, fatty and spicy food, not smoking and limiting alcohol. A pharmacist can recommend antacids or alginates for mild indigestion. Persistent pain still needs a GP review.

  • When should I go to A&E with upper abdominal pain?

    The NHS says call 999 or go to A&E for vomiting bright red blood or coffee-ground vomit, black sticky poo, sudden severe tummy pain, a tummy that is painful to touch, or sudden chest pain. Severe pain spreading to the back with being sick, or yellow skin, also needs an emergency response.

  • How do I know if it is gallstones?

    Gallstone pain, the NHS says, can be severe and constant, last longer than 30 minutes and sit in the middle of the tummy or just under the right ribs, often with sickness. Many gallstones cause no symptoms. An ultrasound scan and a blood test are used to check.

  • Is burning pain in the upper tummy an ulcer?

    It can be. The NHS says ulcer pain is usually in the upper tummy, may feel like burning and is often worse at night, but gastritis and indigestion can feel similar. A GP can arrange a breath, stool or blood test for H. pylori bacteria, a main cause of ulcers.

  • Can painkillers cause upper abdominal pain?

    Yes. The NHS lists regular use of anti-inflammatory painkillers such as ibuprofen, and aspirin, as causes of gastritis and a main cause of stomach ulcers. Tell your GP or pharmacist which painkillers you take, and do not stop prescribed medicines without advice.

  • Is upper abdominal pain a sign of cancer?

    It can be, which is why doctors ask about alarm symptoms. NICE CKS says reported symptoms are a poor predictor of significant disease. The NHS lists weight loss, painful or difficult swallowing, feeling full after a very small meal and repeated vomiting among signs needing an urgent appointment.

  • Can stress cause upper abdominal pain?

    It can contribute. The NHS lists being very stressed and unwell as a cause of gastritis, and says stress, anxiety and depression can make stomach ulcer symptoms worse. NICE CKS includes stress, anxiety and depression in its assessment of indigestion that has no clear cause.

  • What tests might a GP arrange?

    Depending on the cause: a breath, stool or blood test for H. pylori, a blood count to check for anaemia, an ultrasound scan for gallstones, blood tests and sometimes a CT scan for pancreatitis, and a gastroscopy to look inside the stomach if symptoms persist.

Where this comes from

Sources and checking.

This guide is for information, not medical advice.

Your GP or consultant knows your history and can tell you which parts apply to you. If your symptoms are severe, rapidly worsening, or come with red-flag features, seek urgent medical care. Figures and availability change, so treat them as a guide and confirm with the provider.

Published 2026-10-11, next review 2027-10-11.