Background. The occurrence of stones in the gallbladder or common bile duct and the symptoms and complications they cause is called gallstone disease. The symptoms of gallstone disease range from mild, nonspecific symptoms to a severe right quadrant abdominal pain. Characteristics of gallstone types in an Iranian population have not been well studied before and there are very limited studies on the demographic pattern of stone types in our country, so this study is one of the first studies on its kind on the epidemiology of gallstone types in Iran. As information on chemical components of the stone will help in the management and prevention of gallstones, in this study, we aimed to do chemical component analysis of gallstones including cholesterol, bilirubin, and calcium. Given the conflicting reports about the relationship between H. pylori infections and gallstone formation, this study aimed to investigate the relationship between H. pylori positivity in the bile specimen of Iranian patients with cholelithiasis and formation and type of stone. Methods. This prospective study reviewed a total of 196 patients who underwent cholecystectomy for symptomatic cholelithiasis at Shahid Beheshti Training and Research Hospital affiliated to the Yasuj University of Medical Sciences between September 2015 and May 2018. Chemical analysis of gallstone components performed using the colorimetry method. Microbiological analysis for H. pylori was done using the OnSite H. pylori Ag Rapid Test on the bile sample. For the validation test of bile, the H. pylori Rapid Stool Ag Test on stool was used, and Cohen’s Kappa statistical analysis was done next. Results. There were significant associations between the stone types and age, chemical composition of the stones such as calcium, cholesterol, and bilirubin levels, and also H. pylori positivity and cholesterol and bilirubin levels; however, no significant association was found between the stone types and sex, H. pylori positivity and age, sex, stone types, and calcium level. The main bile and validity tests were matched to the substantial agreement according to Cohen’s Kappa analysis. The most common drugs used were proton pump inhibitors, nonsteroidal anti-inflammatory drugs, antihypertensive drugs, and oral contraceptives. Conclusions. This study suggested that the chemical composition of the stones could predict the presence of bacteria, there is no correlation between H. pylori and gallstone formation, and some of the drugs could be predisposing factors for gallstones. This work provides an objective basis for further research into gallbladder stone formation; meanwhile, it has great significance in the treatment and prevention of gallbladder stones. Trial registration. The project was found to be in accordance to the ethical principles and the national norms and standards for conducting research in Iran with the approval ID IR.YUMS.REC.1399.147 and date 2020.09.23, and this project is the result of a residency dissertation to obtain the specialty in general surgery, which has been registered with the research project number 960159 in the Vice Chancellor for Research and Technology Development of the Yasuj University of Medical Sciences, Yasuj, Iran, URL: https://ethics.research.ac.ir/EthicsProposalViewEn.php?id=160634.