An ulcer is an open sore that forms in the lining of your digestive system. The most common types are peptic ulcers, which occur in the stomach or the first part of the small intestine called the duodenum. According to the National Institute of Diabetes and Digestive and Kidney Diseases, peptic ulcers affect approximately 1 in 10 Americans at some point in their lives.
Learn About 24 Hour Fitness Senior Membership Options →
Ulcers develop when the protective mucus layer that shields the stomach and intestinal lining breaks down. This allows stomach acid to damage the underlying tissue, creating an open wound. Two main culprits cause most ulcers: the bacterium Helicobacter pylori (H. pylori) and nonsteroidal anti-inflammatory drugs (NSAIDs) like ibuprofen and aspirin. Less commonly, severe stress or certain medical conditions can contribute to ulcer formation.
The symptoms of ulcers vary from person to person. Some people experience no symptoms at all, while others notice significant discomfort. The most common symptom is a burning pain in the stomach area, typically felt between the breastbone and belly button. This pain may occur when the stomach is empty, particularly between meals or at night. Many people find that eating food or taking antacids temporarily relieves this pain.
Additional symptoms that may indicate an ulcer include bloating, heartburn, nausea, and loss of appetite. In more severe cases, ulcers can cause vomiting (sometimes with blood), dark or bloody stools, unexplained weight loss, and severe abdominal pain. If you experience any of these warning signs, it's important to contact your healthcare provider promptly, as complications from untreated ulcers can be serious.
Practical Takeaway: Keep a symptom diary for one to two weeks, noting when pain occurs, what you ate, and what relieved the discomfort. Share this information with your doctor, as it helps identify patterns and supports accurate diagnosis.
Helicobacter pylori is a bacterium that colonizes the stomach lining and is responsible for approximately 60% of ulcers worldwide. According to the Centers for Disease Control and Prevention, more than one-third of the world's population carries H. pylori, though most infected people never develop symptoms or ulcers. Testing for this bacterium is often the first step in diagnosing ulcer-related problems.
Free Guide to Early Pregnancy Signs and Symptoms →
Several testing methods exist to detect H. pylori infection, each with different levels of accuracy and convenience. The breath test, also called the urea breath test (UBT), is one of the most accurate and non-invasive options. During this test, you swallow a capsule or drink a liquid containing urea marked with a harmless tracer. If H. pylori is present, the bacteria break down the urea, and the tracer is absorbed into your bloodstream and exhaled through your breath. You then breathe into a collection bag, which is analyzed to detect the tracer. This test has an accuracy rate of 95-98% and is often preferred because it's simple and doesn't require sedation.
The stool antigen test detects H. pylori proteins in your feces. Your doctor provides a collection container, and you provide a sample at home. This test is non-invasive, inexpensive, and approximately 94% accurate. However, results can take several days to a week.
Blood tests look for antibodies your body produces in response to H. pylori infection. A simple blood draw is all that's required. The main limitation is that antibodies remain in your blood even after successful treatment, making it difficult to determine if an active infection exists. For this reason, blood tests are typically used only for initial screening.
For the most definitive diagnosis, doctors may recommend an upper endoscopy, where a thin tube with a camera is passed down your throat to visualize the stomach. During this procedure, the doctor can take small tissue samples (biopsies) to test directly for H. pylori. While more invasive than other tests, endoscopy provides visual information about ulcer severity and location.
Practical Takeaway: Ask your doctor which H. pylori test they recommend based on your symptoms and medical history. If you test positive, follow-up testing after treatment is important to confirm that the infection has been cleared.
Upper endoscopy, also called esophagogastroduodenoscopy (EGD), is a procedure where a specialist examines the inside of your upper digestive tract. A thin, flexible tube called an endoscope, which is about the thickness of a finger and equipped with a light and camera, is carefully passed down your throat. This allows the doctor to directly view the esophagus, stomach, and first part of the small intestine on a monitor.
Learn What Medicare Covers for Fitness Programs →
During an endoscopy, your doctor can observe the size, location, and severity of any ulcers present. They can also identify whether the ulcer is actively bleeding. If biopsies are needed, the doctor can collect tissue samples through a channel in the endoscope to test for H. pylori or other conditions. Additionally, if an ulcer is bleeding during the procedure, the doctor can often treat it right away using various techniques, such as injecting medication or applying heat or clips to seal the blood vessel.
The procedure typically takes 15 to 30 minutes. Most patients receive sedation to make the experience more comfortable, which means you cannot drive yourself home afterward. You'll need to arrange for someone to pick you up and stay with you for several hours. Common side effects include a sore throat for a few days and temporary bloating from air introduced during the procedure.
While endoscopy is more invasive than breath or stool tests, it provides invaluable information when symptoms are severe, bleeding is suspected, or other complications are possible. The American College of Gastroenterology recommends endoscopy for patients with alarm symptoms such as persistent vomiting, difficulty swallowing, signs of bleeding, or unexplained weight loss.
In some cases, doctors may also recommend imaging tests like CT scans or ultrasound to assess whether an ulcer has perforated (created a hole through the stomach wall) or caused other complications. These imaging tests are particularly important if surgery is being considered.
Practical Takeaway: Before scheduling an endoscopy, discuss with your doctor whether the procedure is necessary for your situation. If it is recommended, prepare by following pre-procedure instructions carefully, arranging transportation, and clearing your schedule for recovery time.
Proper preparation for ulcer testing significantly affects the accuracy of results and your comfort during the procedure. The specific preparation depends on which test you're undergoing, but several general principles apply to most tests.
Find a Family Doctor Who Takes New Patients →
For breath tests and stool tests, your doctor will likely ask you to stop taking certain medications for one to two weeks before testing. Medications that reduce stomach acid—such as proton pump inhibitors (PPIs) like omeprazole or H2-receptor blockers like famotidine—can interfere with H. pylori detection. Antibiotics and bismuth-containing products (such as Pepto-Bismol) should also be discontinued before testing. Your doctor provides specific instructions about when to stop and which medications are safe to continue.
For a breath test, you'll be asked to fast (avoid food and drinks) for several hours before the test. You'll then take the urea capsule or drink with minimal liquid. Avoid smoking, chewing gum, and vigorous exercise during the test period, as these can affect results. The entire procedure takes about 10 to 20 minutes, including instruction, baseline breath samples, waiting time for the tracer to work, and final breath samples.
Stool test preparation is simpler. You collect a sample in a provided container, seal it, and return it to your doctor's office or a lab. Your doctor explains the specific collection method and whether multiple samples are needed. Store the sample according to instructions until you can deliver it to the lab.
Endoscopy requires more extensive preparation. Most procedures are performed with sedation, so you must fast completely—no food, liquids, or even water—for 6 to 8 hours beforehand. Your doctor will provide a detailed preparation sheet. On the day of the procedure
This guide is for general information only and is not medical, financial, legal, or other professional advice. For decisions specific to your situation, consult a qualified professional. See our Editorial Policy.