You have had a gnawing, burning ache in your upper belly for weeks. It shows up between meals, sometimes wakes you at 2 a.m., and a few crackers or an antacid takes the edge off for an hour or two. A coworker tells you it is stress. Your uncle blames the hot sauce. Both are almost certainly wrong. Most peptic ulcers are caused by one of two things: a common stomach bacterium called Helicobacter pylori, or the regular use of anti-inflammatory painkillers like ibuprofen and naproxen.
That distinction matters more than it sounds. Stress and spicy food can irritate an ulcer that already exists, but they do not create the sore in the first place. An ulcer caused by a bacterial infection can usually be cleared with a course of antibiotics. An ulcer caused by pain relievers usually improves once the drug is stopped and acid is suppressed. Either way, guessing at the cause and living on antacids leaves the real problem in place.
Here is what a peptic ulcer is, how it is tested for, what treatment involves, which symptoms mean go to the emergency room now, and what the whole process typically costs in the United States.
What a Peptic Ulcer Actually Is
A peptic ulcer is an open sore in the lining of your digestive tract. Your stomach makes strong acid and digestive enzymes, and it protects itself with a layer of mucus. When something damages that protective layer, acid reaches the tissue underneath and erodes it. The result is a crater in the lining, usually somewhere between a few millimeters and a couple of centimeters across.
These sores are common. Most estimates suggest that a meaningful share of American adults will develop one at some point, and many more carry the bacteria that can cause them without ever getting an ulcer. The good news is that peptic ulcer disease is far more treatable now than it was a generation ago, when it was managed as a chronic condition rather than an infection.
Stomach Ulcers vs. Duodenal Ulcers
Ulcers in the stomach itself are called gastric ulcers. Ulcers in the duodenum, the first stretch of small intestine just past the stomach, are called duodenal ulcers. They behave a little differently, and the pattern of your pain can hint at which one you have.

Duodenal ulcer pain often improves briefly when you eat, then returns two to three hours later, and it commonly wakes people overnight. Gastric ulcer pain is more likely to get worse with eating, which is why some people with them start avoiding meals and lose weight. Neither pattern is reliable enough to diagnose on its own, and plenty of ulcers cause vague indigestion or no symptoms at all until they bleed.
What Really Causes Peptic Ulcers
Two causes account for the large majority of cases. Understanding which one you have determines the entire treatment plan.
H. pylori Infection
H. pylori is a spiral-shaped bacterium that has adapted to survive in stomach acid. It burrows into the mucus layer and produces an enzyme that neutralizes acid immediately around it. Over years, it causes chronic inflammation of the stomach lining, and in some people that inflammation progresses to an ulcer.
It is one of the most widespread human infections in the world. Most people who carry it never develop an ulcer or any symptoms at all. Transmission is thought to happen person to person, often in childhood and often within households, through saliva or contaminated food and water. Prevalence is higher in parts of the world with more crowded living conditions and less treated water, and in the US it is more common in older adults and in some immigrant communities.
Long-term H. pylori infection is also the single biggest known risk factor for stomach cancer, which is a large part of why doctors treat it when they find it rather than leaving it alone.
NSAID Pain Relievers
Nonsteroidal anti-inflammatory drugs, or NSAIDs, include ibuprofen, naproxen, aspirin, diclofenac and several prescription versions. They work by blocking enzymes that produce inflammation, but those same enzymes help maintain the stomach’s protective mucus layer. Block them day after day and the lining gets thinner and more vulnerable.
Risk goes up with higher doses, longer use, older age, taking more than one NSAID at a time, and combining NSAIDs with blood thinners, steroids or certain antidepressants. People managing chronic joint pain are especially exposed, which is one reason it is worth reviewing arthritis treatment options that go beyond daily painkillers with your doctor if you have been on ibuprofen for months.
Acetaminophen is not an NSAID and does not damage the stomach lining the same way, though it has its own limits, especially for the liver.
Less Common Causes
A small number of ulcers come from other sources: severe physical stress from critical illness or major burns, certain rare acid-producing tumors, some other medications, and heavy alcohol or tobacco use as contributing factors. Smoking in particular slows ulcer healing and raises the chance of recurrence.
Symptoms of a Peptic Ulcer
The classic symptom is a burning or gnawing pain in the upper middle abdomen, between the breastbone and the navel. Beyond that, symptoms vary widely.
- A dull, burning ache in the upper abdomen that comes and goes over weeks, often on an empty stomach or in the middle of the night.
- Feeling uncomfortably full after a small amount of food, or bloated and gassy after ordinary meals.
- Nausea, occasional vomiting, or a loss of appetite that you cannot explain.
- Belching and heartburn that overlaps with reflux symptoms, which is why ulcers are often mistaken for ordinary indigestion.
- Unintended weight loss, particularly if you have started skipping meals because eating hurts.
- Fatigue and shortness of breath on exertion, which can signal slow blood loss and low iron.
Because these overlap heavily with reflux, it helps to know how acid reflux and GERD typically present so you can describe your symptoms accurately. Ulcer pain tends to be more localized and more clearly tied to an empty stomach, while reflux burns upward behind the breastbone and worsens lying down. Only testing can separate them reliably.
Warning Signs of a Bleeding Ulcer That Need Emergency Care
An ulcer that erodes into a blood vessel can bleed, sometimes heavily. A deep ulcer can also perforate the wall of the stomach or duodenum. Both are medical emergencies. Do not wait to see whether they pass.
- Vomiting blood, or vomit that looks like dark coffee grounds.
- Black, tarry, foul-smelling stools, or visible blood in the stool.
- Sudden, severe, unrelenting abdominal pain, especially if your belly becomes rigid and painful to touch.
- Feeling faint, lightheaded or clammy, with a racing heart, which can indicate significant blood loss.
- Persistent vomiting with an inability to keep fluids down, which can mean the outlet of the stomach is blocked by swelling or scarring.
Call 911 or go to an emergency department for any of these. Slow, quiet bleeding is easier to miss and often turns up as iron deficiency anemia on a routine blood test, which is one reason an unexplained low iron result in an adult deserves a real workup rather than just a supplement.
How Peptic Ulcers and H. pylori Are Tested
Testing has two jobs: find out whether you have the bacteria, and if the picture is worrying, look directly at the lining. Which test comes first usually depends on your age and whether you have alarm features like bleeding, weight loss, difficulty swallowing or anemia.
Comparing the Main Tests
| Test | What it involves | Strengths | Limitations |
|---|---|---|---|
| Urea breath test | You drink a small labeled solution and breathe into a bag before and after | Non-invasive, accurate, detects active infection, can confirm cure | Requires stopping acid-reducing drugs and antibiotics beforehand |
| Stool antigen test | A small stool sample collected at home and sent to a lab | Non-invasive, accurate, also confirms whether treatment worked | Same medication washout rules; some people find collection inconvenient |
| Blood antibody test | A standard blood draw | Widely available and inexpensive | Can stay positive for years after cure, so it cannot confirm active infection |
| Upper endoscopy with biopsy | A sedated procedure using a thin flexible camera through the mouth | Sees the ulcer directly, takes tissue samples, can treat bleeding | Invasive, needs sedation and a driver, highest cost |
Two practical points get missed often. First, proton pump inhibitors suppress the bacteria enough to cause a false negative, so most clinicians ask you to stop them for about two weeks before a breath or stool test, and to stop antibiotics and bismuth for about four weeks. Second, a blood antibody test is the weakest option for deciding whether you currently have an infection, and it should never be used to check whether treatment succeeded.
When Endoscopy Is Recommended
Doctors generally move straight to endoscopy when there are alarm features, when symptoms start later in life, when there is bleeding or anemia, or when symptoms persist despite treatment. Endoscopy also lets the gastroenterologist biopsy a gastric ulcer to rule out cancer, which is standard practice because a small percentage of stomach ulcers are malignant. Gastric ulcers are usually rechecked with a repeat endoscopy after healing time.
How Peptic Ulcers Are Treated
Eradication Therapy for H. pylori
If testing finds the bacteria, treatment means clearing it. In general terms, standard regimens combine two or more antibiotics with a strong acid-suppressing medication, and some regimens add bismuth. Courses typically run about ten to fourteen days. The acid suppression matters because the antibiotics work better in a less acidic stomach.
Your doctor chooses the specific combination based on local antibiotic resistance patterns, whether you have had these antibiotics before, and any allergies. Do not attempt to piece together a regimen on your own or reuse leftover antibiotics. Incomplete or mismatched treatment is a major driver of resistant infection, and it is the most common reason a second attempt is needed.
Finishing the full course matters enormously. Side effects like a metallic taste, nausea, loose stools or dark stools from bismuth are common and usually temporary, but tell your prescriber if they are severe rather than quietly stopping. Because these regimens disrupt normal bacteria, some people ask about probiotics; the evidence there is mixed, and it is worth understanding what is actually supported by research on gut supplements before spending money on them.
Confirming the Infection Is Gone
This step is skipped far too often. Guidelines generally recommend retesting with a breath or stool test at least four weeks after finishing treatment, and after being off acid-suppressing drugs for the required window. Roughly speaking, first-line therapy fails in a noticeable minority of people, and the only way to know which group you are in is to retest.
When NSAIDs Are the Cause
If pain relievers caused the ulcer, the core of treatment is stopping or reducing them and taking an acid-suppressing medication for several weeks while the lining heals. If you genuinely need an NSAID long term, for example for inflammatory arthritis, your doctor may prescribe a protective acid-reducing drug alongside it, choose a lower-risk NSAID, or shift you toward other pain strategies.
Surgery
Surgery is now uncommon for uncomplicated ulcers. It is reserved for complications: bleeding that endoscopy cannot control, perforation, or an obstruction from scarring. Most bleeding ulcers today are managed during endoscopy itself.
Diet Myths and What Actually Helps
The old advice was bland food and milk. Milk briefly buffers acid, then triggers more acid production, so it is not the answer. There is no evidence that spicy food causes ulcers, and for most people it does not slow healing either.
- Eat what you tolerate. If chili, coffee, citrus or tomato reliably makes your pain worse, limit those while you heal, then reintroduce them.
- Cut back on alcohol during treatment, since it irritates an already damaged lining and interacts poorly with some antibiotic regimens.
- Stop smoking if you smoke. This is one of the few diet-and-lifestyle changes with a clear effect on ulcer healing and recurrence.
- Try smaller, more regular meals if long gaps between eating trigger pain, rather than fasting through the discomfort.
- Skip the unregulated “ulcer cure” supplements. Some, like certain broccoli sprout compounds, have early research behind them, but none replaces antibiotic treatment for a confirmed infection.
General digestive health still matters for how you feel day to day, and a steady, fiber-adequate eating pattern supports a healthier gut microbiome during and after treatment. Just do not confuse supportive habits with the treatment itself.
What Peptic Ulcer Testing and Treatment Cost in the US
Costs vary widely by state, facility, whether the site is a hospital outpatient department or an independent clinic, and what your plan has negotiated. The figures below are typical estimated ranges, not quotes, and your own bill can fall outside them.
| Service | Typical self-pay estimate | Usual insurance treatment |
|---|---|---|
| Office visit with primary care | Roughly $100 to $250 | Covered as a standard visit, subject to copay or deductible |
| Stool antigen or blood test | Roughly $50 to $200 | Generally covered as diagnostic lab work |
| Urea breath test | Roughly $150 to $400 | Usually covered when medically indicated |
| Upper endoscopy with biopsy | Roughly $1,500 to $4,000 or more all-in | Covered as a diagnostic procedure; facility and anesthesia billed separately |
| Eradication drug regimen | Roughly $40 to $400 depending on generics vs. branded packs | Generics usually low-tier; combination packs may need prior authorization |
Two cost traps are worth knowing. Endoscopy bills arrive in pieces: the gastroenterologist, the facility, the anesthesia provider and the pathologist may all bill separately, so ask for estimates from each. And some H. pylori regimens come as convenience packs that cost far more than the same drugs prescribed individually as generics. Ask your pharmacist to price both.
Medicare Part B generally covers medically necessary diagnostic testing and endoscopy, with the usual deductible and coinsurance, while the drugs fall under Part D. Commercial plans typically cover the same services, but your out-of-pocket share depends heavily on plan design. If you are weighing plan choices, the differences between HMO, PPO and high-deductible plans change what a procedure like endoscopy actually costs you. You can also check current program rules directly at Medicare.gov.
Recovery and What to Expect
Most people notice symptom improvement within one to two weeks of starting treatment, though the sore itself takes longer to close. Duodenal ulcers commonly heal in about four weeks with acid suppression; gastric ulcers often need eight weeks or more. Feeling better is not proof the ulcer has healed, which is why your doctor may keep you on medication past the point where pain stops.
Expect a follow-up plan: a confirmation test for the bacteria, a repeat endoscopy if you had a gastric ulcer, and a conversation about long-term pain management if NSAIDs were involved. If symptoms come back after successful treatment, that deserves a fresh evaluation rather than a refill.
Preventing Peptic Ulcers From Coming Back
- Confirm the infection is actually cleared with a breath or stool test rather than assuming the antibiotics worked.
- Use the lowest effective dose of NSAIDs for the shortest time, and ask whether acetaminophen, topical options or physical therapy could cover part of your pain needs.
- Tell every prescriber about your ulcer history, especially before starting a blood thinner, a steroid or daily aspirin.
- Quit smoking, which improves healing and lowers recurrence more than most dietary changes do.
- Keep alcohol moderate, and avoid drinking on an empty stomach if you are prone to symptoms.
- Do not stay on a proton pump inhibitor indefinitely without a reason your doctor has reviewed, and do not stop one abruptly if you have been on it a long time.
When to See a Doctor
Book an appointment if upper abdominal pain has lasted more than a couple of weeks, if you are buying antacids regularly, if you have a family history of stomach cancer, or if over-the-counter treatment stops working. Go to an emergency department immediately for vomiting blood, black or tarry stools, fainting, or sudden severe abdominal pain. General background on digestive conditions is available from MedlinePlus and Mayo Clinic, but neither replaces an evaluation of your own symptoms.
Frequently Asked Questions
Can stress cause a peptic ulcer?
Ordinary life stress does not create the sore. The great majority of peptic ulcers trace back to H. pylori infection or regular NSAID use. Stress can increase acid production and make an existing ulcer feel worse, and severe physiological stress from critical illness can cause a different kind of stomach injury in hospitalized patients. If you have persistent symptoms, get tested rather than assuming stress management alone will fix it.
How do I know if I have H. pylori without an endoscopy?
A urea breath test or a stool antigen test can identify active infection without any procedure. Both are accurate when done correctly, and both require stopping acid-reducing medication for about two weeks and antibiotics or bismuth for about four weeks beforehand. A blood antibody test is easier but cannot tell a current infection from a past one, so it is a poor choice on its own.
Is H. pylori contagious between family members?
It does appear to spread person to person, most likely through saliva and contaminated food or water, and infections often cluster within households. Most transmission is thought to happen in childhood. Routine testing of every household member is not standard in the US, but tell your doctor if a partner or family member has been treated or has ongoing symptoms, since that may change the recommendation for you.
Will an ulcer heal on its own if I just take antacids?
Antacids relieve pain but do not address the cause. If bacteria are driving the ulcer, it is likely to persist or come back until the infection is treated. If NSAIDs are the cause, masking the pain while continuing the drug can allow the ulcer to deepen or bleed. Antacids are reasonable for short-term relief while you get evaluated, not as a long-term plan.
Does having H. pylori mean I will get stomach cancer?
No. Long-term infection is the leading known risk factor for stomach cancer, but the large majority of infected people never develop it. Risk depends on the bacterial strain, how long the infection has been present, genetics, diet and smoking. Clearing the infection is generally thought to lower future risk, which is a main reason doctors treat it when it is found. Discuss your personal risk with your clinician.
The Bottom Line
Peptic ulcers are not a personality problem or a punishment for eating chili. They are usually caused by a treatable bacterial infection or by anti-inflammatory painkillers, and both causes have clear paths forward. If you have had upper abdominal pain for more than two weeks, ask specifically about a urea breath test or stool antigen test rather than settling for another round of antacids. If bacteria are found, finish the full course and retest to confirm it is gone. If NSAIDs are involved, work out a pain plan that protects your stomach. And treat black stools, bloody vomit or sudden severe pain as an emergency, not something to sleep on. Getting the cause right is what turns a recurring problem into a solved one.
This article is for general information only and is not a substitute for professional medical advice, diagnosis, or treatment. Always talk to a qualified healthcare provider about your own symptoms, medications, and treatment options.







