Upper digestive tract tests
H. pylori stool antigen test: how it works, preparation and results
The H. pylori stool antigen test looks for proteins from Helicobacter pylori in a sample of poo. It is one of the two tests that NICE Clinical Knowledge Summaries names as ideal, alongside the urea breath test, and it is commonly used in primary care when indigestion persists or an ulcer is suspected. Its main practical requirement is timing: acid-suppressing tablets and antibiotics taken beforehand can give a false negative. This guide explains the test, the washout periods, the results and what follows.
Last checked: 2026-10-10
Key facts
At a glance.
-
One of two preferred tests
NICE Clinical Knowledge Summaries says that ideally a carbon-13 urea breath test or a stool antigen test should be used to test for H. pylori.
-
Medicines can spoil it
The same guidance says to ensure the person has not taken a proton pump inhibitor (PPI) in the past 2 weeks, or antibiotics in the past 4 weeks.
-
Used in indigestion and ulcers
The NHS says that if a GP thinks you might have a stomach ulcer, tests may include a breath test, a test of a sample of your poo and a blood test.
-
Positive means treatment
NICE CKS says that if the test is positive, first-line eradication therapy should be offered, an antibiotic-based treatment taken with acid suppression.
-
Re-testing is selective
NICE CKS says H. pylori re-testing should not be offered routinely in uninvestigated dyspepsia but may be considered in some circumstances, and is advised after treatment for a proven gastric ulcer.
What the stool antigen test is
Helicobacter pylori is a bacterium that can live in the lining of the stomach. The NHS names infection with H. pylori as one of the main causes of stomach ulcers, alongside regular use of anti-inflammatory painkillers such as ibuprofen. A stool antigen test detects antigens, which are proteins from the bacterium, in a sample of poo. A positive test indicates that the bacterium is currently present.
It is one of several ways to test. NICE Clinical Knowledge Summaries says that, ideally, a carbon-13 urea breath test or a stool antigen test should be used. The breath test, which has its own page on this site, involves taking a tablet or special drink and breathing into a tube, as the NHS describes. The stool test needs no drink or tablet, because the sample is collected at home.
The NHS describes the sample as one of the tests that may be arranged by a GP: a breath test to check for H. pylori bacteria, a test of a sample of your poo, or a blood test. NICE CKS names the breath and stool tests as the ideal methods.
When it is requested
NICE CKS describes dyspepsia as a complex of upper gastrointestinal symptoms, typically present for four or more weeks, including upper abdominal pain or discomfort, heartburn, acid reflux, nausea or vomiting. In unexplained dyspepsia it says initial management includes lifestyle advice and reviewing medicines, and that if symptoms persist a full-dose PPI for 1 month or testing for H. pylori infection should be offered if status is not known or uncertain.
The NHS says to see a GP if indigestion does not go away with treatment or tummy pain keeps coming back. It lists tummy pain that is worse or does not go away, loss of appetite, feeling full after a small amount of food, weight loss without trying, a lump in the tummy, painful or difficult swallowing, persistent vomiting and feeling tired all the time as reasons to ask for an urgent GP appointment or contact 111. Blood in vomit or black, sticky stools are emergencies.
Those alarm features usually lead to a gastroscopy rather than a stool test. A stool antigen test is intended for people without them. NICE CKS advises asking about alarm symptoms as part of the assessment.
Preparing for the test
Preparation is mainly about medicines. NICE CKS says the person should not have taken a proton pump inhibitor in the past 2 weeks or antibiotics in the past 4 weeks. PPIs include omeprazole and lansoprazole, which many people take for indigestion. The washout periods exist because these medicines can interfere with the result, so a test taken too soon after them may not be reliable.
That does not mean you should stop prescribed medicines on your own. If you take a PPI for a reason such as protecting the stomach with other medicines, speak to the GP or pharmacist before changing anything, and say which medicines you take when the test is arranged. The NHS notes in its ulcer advice that you should not take anti-inflammatory painkillers such as ibuprofen without speaking to a doctor first.
None of the NHS or NICE pages used for this guide describes fasting for the stool test, so ask whoever arranges it for any food or drink instructions. You will be given a container, and the collection steps are the same as for any stool sample: avoid water and urine, use the spoon in the lid, do not overfill and return it promptly. The page on how to collect a stool sample gives the detail.
What the results mean and what happens next
A positive result means H. pylori is likely to be present. NICE CKS says that if a person tests positive, first-line eradication therapy should be offered. In someone with a proven ulcer who uses NSAIDs, it says a full-dose PPI should be prescribed for 2 months followed by first-line eradication therapy. The NHS says treatment for a stomach ulcer may include antibiotics to treat H. pylori and medicines to reduce stomach acid, such as PPIs, and usually lasts from 1 week to 2 months depending on the cause.
A negative result means H. pylori was not detected. If you had recently taken a PPI or antibiotics, a negative result may be unreliable, and a clinician may repeat the test after a washout period. If the test is genuinely negative in a person with a proven ulcer, NICE CKS says a full-dose PPI should be offered for 4 to 8 weeks, with the cause of the symptoms reconsidered.
The NHS says you may need tests after treatment to make sure it has worked. NICE CKS says people with a proven gastric ulcer should have a repeat endoscopy and, if appropriate, H. pylori re-testing 6 to 8 weeks after starting treatment. For people treated for unexplained dyspepsia, re-testing should not be routine.
| Medicine | Time without it before testing | Reason |
|---|---|---|
| Proton pump inhibitor (PPI) | At least 2 weeks | Acid suppression can lower bacterial load and cause a false negative |
| Antibiotics | At least 4 weeks | Antibiotics can suppress the bacterium |
Stool test, breath test or gastroscopy?
NICE CKS treats the breath and stool tests as equivalent first choices, so which you are offered often depends on local laboratory arrangements and convenience. The breath test is done at a clinic or hospital, while the stool test is collected at home and returned to the surgery or laboratory.
A gastroscopy is a different kind of test. The NHS describes it as passing a long, thin, flexible tube with a small camera down the throat into the stomach. It looks directly at the lining and can take samples, and is reserved for people with alarm symptoms, persistent or recurrent symptoms despite treatment, or a gastric ulcer needing confirmation of healing. NICE CKS says referral for endoscopy should be considered where symptoms are refractory or recurrent despite optimal primary care management.
Frequently asked
Questions people ask.
Quick, plain-English answers to the questions we hear most.
-
Do I need to stop my stomach acid tablets before an H. pylori stool test?
NICE CKS says the person should not have taken a PPI in the past 2 weeks. Do not stop a prescribed medicine without asking the GP or pharmacist first, and tell them which medicines you take when the test is arranged.
-
Can antibiotics affect the result?
Yes. NICE CKS says the person should not have taken antibiotics in the past 4 weeks, as they can lead to a false negative.
-
Is the stool antigen test as good as the breath test?
NICE CKS names the carbon-13 urea breath test and the stool antigen test as the ideal methods, treating them as the two preferred non-invasive options.
-
Do I need to fast?
None of the NHS or NICE sources used for this page describes fasting for the stool test. The main preparation they describe is the medicine washout, and the collection process is the same as for other stool samples.
-
What does a positive stool antigen test mean?
It indicates H. pylori is present. NICE CKS says first-line eradication therapy should be offered, and the NHS says treatment may include antibiotics and acid-reducing medicines.
-
Will I be re-tested after treatment?
Not always. The NHS says you may need tests after treatment to make sure it has worked. NICE CKS says routine re-testing is not offered in uninvestigated dyspepsia but is considered for proven gastric ulcers 6 to 8 weeks after starting treatment.
-
Is a blood test for H. pylori reliable?
The NHS lists a blood test among the possible tests, but NICE CKS names the breath and stool tests as the ideal methods.
-
What if I have black stools or vomit blood?
The NHS says vomiting bright red blood, vomit that looks like ground coffee, blood in the poo or black sticky poo, severe tummy pain or sudden chest pain need a 999 call or A&E attendance.
-
How long do results take?
Laboratories differ, so ask the service that arranged the test. Most results are returned to the requesting GP, who will explain the next step.
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-10, next review 2027-10-10.
-
NICE CKS: Dyspepsia - unidentified cause, https://cks.nice.org.uk/topics/dyspepsia-unidentified-cause/ , retrieved October 2026
-
NICE CKS: Dyspepsia - proven peptic ulcer, https://cks.nice.org.uk/topics/dyspepsia-proven-peptic-ulcer/ , retrieved October 2026
-
NHS: Stomach ulcer, https://www.nhs.uk/conditions/stomach-ulcer/ , retrieved October 2026
Related guides
Keep reading.
-
H. pylori breath test
The urea breath test and how to prepare for it.
Read guide -
H. pylori blood and breath test
How the different H. pylori tests compare.
Read guide -
Positive H. pylori: next steps
What treatment and follow-up involve.
Read guide -
Helicobacter pylori
The bacterium, how it spreads and what it causes.
Read guide -
Peptic ulcer
Stomach and duodenal ulcers and their treatment.
Read guide -
Dyspepsia
Indigestion lasting weeks and how it is assessed.
Read guide