Background: There is currently much debate on the best way to manage dyspepsia in the community and cost effectiveness is often discussed. We aim to perform a cost analysis of a test and treat strategy for Helicobacter pylori versus endoscopy using data based on the breath test service in Leicester. Methods: Retrospective analysis of data acquired over the 1-year period from March 1, 1999, to February 29, 2000, in a university teaching hospital. The main outcome measure was the cost of each management strategy. Results: Referral to the breath test service cost £84.67 per person with dyspepsia (including treatment of positive patients and endoscopy cost of patients endoscoped). If the breath test service had not existed, referral for endoscopy would have cost £98.35 per person. This equates to a cost saving of £8,276 over the year studied for the 605 patients referred. It also resulted in 353 fewer endoscopies being performed. Conclusion: Direct referral to a H. pylori breath test service saves money, avoids an unpleasant test for many people and reduces the endoscopy waiting list.