The present study investigated the prevalence of Helicobacter pylori infection in peptic ulcer patients referred to the endoscopy departments in Khorramabad hospitals during 2013- 2016. The early pool of the study included all patients who had been referred to the endoscopy department and whose endoscopic and pathology reports were available and complete. After recording endoscopic reports, 1224 peptic ulcer (gastric or duodenal ulcer) cases, in which biopsy assays were performed to examine the type of ulcer and the presence of Helicobacter pylori bacteria, were selected. Pathology reports were collected by referring to the pathology departments. The information in the pathology report, including demographic information, was included in a pre-designed questionnaire to match the endoscopic reports, the location of the pathology sample, and other details, including the presence or absence of Helicobacter pylori bacteria. Finally, the data were analyzed using SPSS, version 21. For all the 1224 patients studied, the mean age was 15.5 ± 17.5 years old. A total of 664 (54.2%) cases had gastric ulcers, 445 (36.4%) cases had duodenal ulcers, and 115 (9.4%) had both gastric and duodenal ulcers. Among gastric ulcer patients, 512 (65.7%) had a gastric ulcer in the antrum area, and 74.3% (579 patients) of the gastric ulcers were clean base type. The prevalence of infection was statistically significant in terms of the type, location, and number of peptic ulcers, including both gastric ulcer and duodenal ulcer.