Stomach Ulcer Diagnosis: Why a Gastric Ulcer Needs a Biopsy and Repeat Endoscopy, and How Long Famotidine or a PPI Takes

🔍 Most people expect an ulcer to be treated with a box of acid tablets and forgotten. A stomach ulcer is the one type of ulcer where doctors insist on looking twice. Unlike an ulcer in the duodenum, an ulcer in the stomach itself can, in a small share of cases, be an early cancer that looks benign at first glance, and it also heals more slowly. 📋 This guide follows the path of a gastric ulcer from the first symptoms to the final check: when an endoscopy is needed, why biopsies are taken from the edge of the ulcer, how H. pylori is tested without false results, how long a course of famotidine or a proton pump inhibitor (PPI) takes to heal it, why a repeat endoscopy at 8 to 12 weeks is often booked, and what happens if the ulcer has not closed.
🧭 Why a stomach ulcer is handled differently
📖 Peptic ulcers come in two main types: duodenal ulcers in the first part of the small bowel and gastric ulcers in the stomach. Both are caused mostly by H. pylori infection and by anti-inflammatory painkillers. The big difference is the cancer question: duodenal ulcers are almost never malignant, while a small proportion of ulcers in the stomach turn out to be cancer or lymphoma. That single fact explains the biopsy, the repeat scope and the longer course. 🔗 If your ulcer is in the duodenum, the treatment path is covered in H. pylori eradication for a duodenal ulcer and how long to take a PPI after a duodenal ulcer heals.
🧬 How a gastric ulcer forms
🛡️ The stomach lining protects itself from its own acid with a layer of mucus, a bicarbonate buffer and a rich blood supply, all kept in shape by substances called prostaglandins. An ulcer appears when this defence is weakened faster than the lining can repair itself. In the stomach, acid is often normal or even low; the problem is usually a damaged barrier rather than too much acid, which is one reason why stomach ulcers can be slower to close.
🤕 Symptoms that point to the stomach
🍽️ The classic symptom is a burning or gnawing pain in the upper middle of the abdomen. With a gastric ulcer, the pain often comes on soon after eating, while duodenal ulcer pain tends to ease with food and return at night. These patterns overlap a lot, and many people, especially older adults and those on painkillers, have no pain at all until the ulcer bleeds.
- 📌 Burning pain under the breastbone or in the upper abdomen, often within an hour of a meal
- 📌 Feeling full quickly, bloating, nausea, burping
- 📌 Eating less because food brings on the pain, with some weight loss
- 📌 Tiredness and breathlessness from slow, hidden blood loss and anaemia
- 📌 Black, tarry stools or vomit that looks like coffee grounds, which mean bleeding and need urgent care
🔎 Causes the work-up has to find
🧩 Healing the ulcer is only half the job. If the cause is not found and removed, the ulcer usually comes back. The doctor will ask about every painkiller, including low-dose aspirin and products bought without a prescription, and will test for H. pylori in every patient.
📖 H. pylori can also cause a rare stomach lymphoma, which sometimes looks like an ulcer on endoscopy; see gastric MALT lymphoma and what causes it.
✅ Who should go straight to endoscopy
🩺 Younger people with indigestion and no warning signs are often tested for H. pylori and treated without a camera test. Anyone with alarm features should have an endoscopy rather than a trial of tablets, because acid medicine can heal the surface of a malignant ulcer for a while and hide it.
📹 What happens during the gastroscopy
💡 A gastroscopy takes about 5 to 15 minutes. It is the only test that shows the ulcer, lets the doctor take biopsies and treats bleeding at the same time. You can choose a throat spray alone or add light sedation; with sedation, someone must take you home.
🔬 Why biopsies come from the ulcer edge
🧫 The base of an ulcer is mostly dead tissue and debris, so a sample from the centre can miss cancer cells. Doctors take several small pieces from the rim of the ulcer, all around it, because that is where a malignant ulcer shows its true nature. Even an ulcer that looks clearly benign is usually sampled, since appearance alone is not reliable enough. Extra biopsies from the antrum and body of the stomach check for H. pylori and for changes in the lining, such as atrophy or intestinal metaplasia, which may need their own follow-up.
👁️ Benign look or worrying look
📷 Endoscopists describe what they see in fairly standard terms. A smooth, round crater with a clean base and folds running right up to the edge looks benign, while heaped-up, irregular edges or a mass suggest something else. These are clues, not proof, which is why the tissue result matters more than the picture.
| 🔎 Feature | 🟢 Usually benign | 🔴 Raises concern |
|---|---|---|
| Shape | Round or oval, punched out | Irregular, ragged |
| Edge | Smooth, flat, regular | Raised, nodular, heaped up |
| Base | Clean white or yellow fibrin | Dirty, bumpy, bleeds easily |
| Surrounding folds | Run smoothly to the crater edge | Club-shaped, fused or stop short |
| Size | Often under 2 cm | Large ulcers need extra care |
🦠 Testing for H. pylori without false results
⏸️ The two common non-invasive tests, the urea breath test and the stool antigen test, look for live bacteria. PPIs, antibiotics and bismuth suppress the bacteria and can make these tests falsely negative. Famotidine and other H2 blockers interfere much less, which is why some doctors switch a patient to famotidine for the two weeks before a breath test. Active bleeding can also hide the infection, so a negative biopsy test taken during a bleed is often repeated later.
| 🧪 Test | 📋 How it works | ⏳ Stop before the test |
|---|---|---|
| Urea breath test | Breath sample after a labelled drink | PPI 2 weeks, antibiotics and bismuth 4 weeks |
| Stool antigen test | Small stool sample to a lab | PPI 2 weeks, antibiotics and bismuth 4 weeks |
| Rapid urease test | Biopsy placed in a gel during the scope | Same pauses where possible |
| Histology | Bacteria seen on the biopsy under a microscope | Less affected, still best off PPI |
| Blood antibodies | Shows past or present contact | Not affected, but cannot prove cure |
📅 How long healing takes
⏳ Gastric ulcers are usually treated for 8 weeks, and larger ones for longer. The pain often settles within the first one to two weeks, long before the crater has closed. Stopping early because you feel well is one of the most common reasons an ulcer fails to heal or comes back quickly.
Scope, biopsies, start acid medicine
Pain eases, biopsy results back
H. pylori treatment if positive
Most ulcers have healed
Repeat scope and new biopsies
💊 The proton pump inhibitors
⚙️ PPIs switch off the acid pumps in the stomach wall and are the first choice for healing a gastric ulcer. All of them work well at standard doses; the choice depends mainly on other medicines, price and what is available. Doses below are the usual adult doses for a benign gastric ulcer; your doctor may adjust them.
🌙 Where famotidine fits
💊 Famotidine blocks histamine H2 receptors on the acid-making cells. It was a standard ulcer treatment before PPIs and is still licensed for active benign gastric ulcer. The usual dose is 40 mg once at bedtime, or 20 mg twice daily, for up to 8 weeks, with a lower dose when kidney function is reduced. It controls night-time acid very well but daytime acid after meals less strongly than a PPI, so healing tends to be slower. ✅ Pepcid (Famotidine) is a reasonable choice when a PPI is not tolerated, when an H. pylori breath test is coming up, or as a bedtime add-on in people who still have night symptoms.
⏰ Taking the tablets the right way
📋 Timing changes how well acid medicines work. A PPI taken after breakfast or at random times can lose a large part of its effect, because the pumps it blocks are switched on by food. More on timing errors is in why PPIs sometimes seem not to work.
🦠 When H. pylori is found
💉 If any test is positive, the infection is treated with a PPI plus two or three antibiotics for 10 to 14 days, usually followed by the rest of the PPI healing course. Clearing H. pylori is what stops most infection-related ulcers from coming back. Common combinations include amoxicillin, clarithromycin, metronidazole, or bismuth quadruple therapy where clarithromycin resistance is common. Cure is checked with a breath or stool test at least 4 weeks after the antibiotics and 2 weeks off the PPI, or with biopsies at the repeat scope.
Backbone of most regimens; Amoxil (Amoxicillin)
Only where resistance is low; Biaxin (Clarithromycin)
No alcohol during and 2 days after; Flagyl (Metronidazole)
📖 The full choice between triple and quadruple therapy, and what to do if the first course fails, is covered in H. pylori eradication: triple or quadruple therapy. The same regimens are used for gastric ulcers.
🚦 If the ulcer came from painkillers
💊 NSAIDs cause gastric ulcers more often than duodenal ones, and many of these ulcers are silent until they bleed. The best treatment is to stop the NSAID; the ulcer then heals faster and is less likely to return. When that is not possible, the decision path below is the usual approach. Painkiller choices for people with a stomach history are covered in which painkiller to choose and who should avoid NSAIDs.
📖 The trade-offs of celecoxib for the stomach, heart and kidneys are explained in celecoxib for knee and hip osteoarthritis.
🔁 The repeat endoscopy at 8 to 12 weeks
🔍 Many guidelines advise a second gastroscopy for gastric ulcers, especially when the ulcer was large, looked unusual, the first biopsies were not adequate, or the patient is older. The repeat scope confirms healing and allows fresh biopsies from the scar, which catches the rare cancer that partly healed on acid medicine and fooled the first look. Some doctors skip it for a small, clearly benign NSAID ulcer in a young patient with good biopsies and no symptoms, so ask what applies to you.
⚠️ When the ulcer has not healed
🧩 An ulcer still open after 8 to 12 weeks of proper treatment is called refractory. The first step is not a stronger tablet but a careful search for the reason. Most refractory ulcers have a simple cause that can be fixed.
💉 After these are checked, doctors often double the PPI dose and continue for another 8 weeks, with another scope and more biopsies afterwards. A fasting gastrin blood test is considered for multiple or unusual ulcers. Surgery for a non-healing benign ulcer is now uncommon.
🚨 The complications to know
🩺 Bleeding is the most common serious complication. Most bleeding ulcers are now treated at endoscopy with injections, clips or heat, followed by high-dose PPI, first by drip and then by mouth. Perforation is a surgical emergency. Obstruction from scarring near the stomach outlet is less common than in the past and is usually treated with acid control and balloon stretching.
🥗 Food, alcohol and smoking while it heals
🍴 No special ulcer diet has been shown to speed healing, and bland milk diets of the past can even raise acid. Eat normally, avoid what clearly brings on your pain, and stop smoking, since smoking is the lifestyle factor most clearly linked to slow healing and relapse.
🟢 Simple rules that help:
🔹 Regular meals rather than one huge evening meal; a light supper at least 2 to 3 hours before bed.
🔹 Alcohol kept low, and none at all during metronidazole treatment.
🔹 Coffee and spicy food are fine if they do not trigger pain.
🔹 Read the labels of cold, flu and pain products: many contain aspirin or ibuprofen.
📋 Side effects and interactions of acid medicines
💊 PPIs and famotidine are well tolerated for an 8-week course. Headache, diarrhoea, constipation and nausea are the usual minor effects. The concerns linked to years of PPI use, such as low magnesium, low vitamin B12, bone fractures and gut infections, matter less for a short healing course but are a reason not to stay on treatment without a clear need.
| ⚠️ Situation | 📝 What to know |
|---|---|
| Clopidogrel | Omeprazole and esomeprazole can weaken it; pantoprazole is usually preferred |
| Reduced kidney function | Famotidine dose is lowered; confusion is possible in older people if it is not |
| Methotrexate at high doses | PPIs can raise levels; doctors may pause the PPI |
| Some antifungals and HIV medicines | Itraconazole, ketoconazole, atazanavir and rilpivirine need acid to be absorbed |
| Iron tablets | Absorption falls on acid medicine; the dose or form may need review |
| Severe liver disease | PPI doses are often capped |
📖 Stopping a PPI after the course can bring a few weeks of rebound acid; a gentle taper is described in how to stop a PPI without rebound acid.
🧷 Who stays on acid medicine afterwards
📆 For most people the PPI stops after the ulcer is confirmed healed and the cause is removed. Long-term protection is advised when the risk factor cannot be removed.
Healed ulcer, H. pylori cured, no NSAIDs
Ongoing NSAID, aspirin, or aspirin with clopidogrel or an anticoagulant
Recurrent ulcers with no cause found, or a past serious bleed
🗿 Myths about stomach ulcers
📝 Questions to ask at each visit
💬 Useful questions for your doctor:
🔹 Where exactly is the ulcer, how big is it, and were biopsies taken from the edge?
🔹 Was H. pylori tested, by which method, and was I on a PPI at the time?
🔹 Which painkillers can I use safely from now on?
🔹 Do I need a repeat endoscopy, and when?
🔹 After healing, do I stop the acid medicine, taper it, or stay on it?
🏥 When to see a doctor
⛔ Call emergency services or go to hospital now if you have:
🔹 Vomit with blood or material like coffee grounds.
🔹 Black, sticky, tarry stools, or fainting, dizziness and a racing heart.
🔹 Sudden, severe abdominal pain that does not ease, especially with a hard belly.
🔹 Repeated vomiting and inability to keep food down.
⚠️ Book a prompt appointment for weight loss, trouble swallowing, anaemia, or ulcer pain that returns after treatment.
❓ Frequently asked questions
How is a stomach ulcer diagnosed?
By gastroscopy, a camera test through the mouth. It shows the ulcer, allows biopsies from its edge and tests for H. pylori at the same time.
Why do doctors biopsy a stomach ulcer?
Because a small share of gastric ulcers are cancer or lymphoma that can look benign. Samples from the ulcer edge settle the question.
Why is a repeat endoscopy needed?
At 8 to 12 weeks it confirms that the ulcer has healed and allows new biopsies from the scar. It is advised especially for large or unusual ulcers.
How long does a stomach ulcer take to heal?
Usually about 8 weeks of acid medicine, longer for large ulcers or if an NSAID must continue. Pain often settles in 1 to 2 weeks.
Can famotidine heal a stomach ulcer?
Yes. The usual dose is 40 mg at bedtime for up to 8 weeks. A PPI tends to heal faster, so famotidine is mostly used when a PPI is not suitable.
Which PPI is best for a gastric ulcer?
All standard PPIs work well. Pantoprazole is often chosen for people on clopidogrel because it interacts least.
Do I need to stop my PPI before an H. pylori test?
Yes, for breath and stool tests: stop the PPI 2 weeks before, and antibiotics or bismuth 4 weeks before. Famotidine can be used in the meantime if your doctor agrees.
Can I keep taking ibuprofen with a stomach ulcer?
It is best avoided. If an NSAID is truly needed, it should be at the lowest dose, with a PPI and under medical advice.
What if the ulcer has not healed at the second scope?
The doctor checks for missed tablets, hidden NSAIDs, persistent H. pylori and smoking, takes more biopsies and usually extends treatment at a higher dose.
Is a stomach ulcer usually cancer?
No. Most gastric ulcers are benign. Biopsies and a repeat scope are done to find the small number that are not.
📑 Sources and editorial
- 📘 Clinical guidelines on the management of peptic ulcer disease and dyspepsia
- 🔬 Gastroenterology society guidance on endoscopy, biopsy and follow-up of gastric ulcers
- 🦠 Consensus reports on the diagnosis and treatment of H. pylori infection
- 💊 Product information for famotidine, omeprazole, esomeprazole, pantoprazole, lansoprazole and rabeprazole
- 🩸 Guidance on NSAID and aspirin use after peptic ulcer bleeding
- 📖 Related reading: H. pylori eradication, stopping a PPI after an ulcer, which painkiller to choose, gastric MALT lymphoma
- 🛒 Related products: Pepcid (Famotidine), Prilosec (Omeprazole), Protonix (Pantoprazole), Nexium (Esomeprazole), Prevacid (Lansoprazole), Aciphex (Rabeprazole)
- 🩺 RXshop Editorial Team — reviewed by Emily Chen, MD — Internal medicine
Medical Disclaimer: The information in this article is for educational and informational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment. Always seek guidance from a qualified healthcare provider with any questions you may have regarding a medical condition, and before starting, stopping or changing any medication.