Inguinal hernia repair is a common surgical procedure with significant variability in hospitalization costs. Traditional cost analysis methods often overlook the distribution of costs across patient demographics and clinical factors. This study employs a quantile regression model to explore the determinants of hospitalization costs for adult inguinal hernia surgery, providing a detailed understanding of cost variations across different quantiles. We analyzed data from adult patients who underwent inguinal hernia surgery at Beijing Chaoyang Hospital from January 2015 to June 2023. The study included patient demographics, hernia-related information, surgery-related details, and cost-related data. A quantile regression model was used to assess the impact of various factors on hospitalization costs at different quantiles (10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%). Data were processed using StataSE 15.0 software. Our study included 16,602 patients, predominantly male (91.86%) and Han Chinese (96.48%), with the 51-64 years age group being the largest (26.80%). The quantile regression analysis revealed significant cost variations across different quantiles. Younger patients incurred higher costs, with age coefficients ranging from -40.541 at the 90th quantile to -3.082 at the 10th quantile. Uninsured patients faced higher costs, with coefficients from 214.747 at the 80th quantile to 501.78 at the 10th quantile. Longer hospital stays correlated with increased costs, with coefficients from 342.15 at the 80th quantile to 405.613 at the 90th quantile. Patients hospitalized multiple times(≥3) had lower costs, with coefficients from-767.353 at the 40th quantile to -311.575 at the 80th quantile. Comorbidities significantly raised costs, with coefficients for three or more comorbidities ranging from806.122 at the80th quantile to1,456.02 at the40th quantile. Laparoscopic surgery was more expensive than open surgery, with coefficients from 1,834.206 at the 80th quantile to 2,805.281 at the 10th quantile. Bilateral surgeries and the use of biological mesh also resulted in higher costs, with coefficients for bilateral surgeries ranging from 1,067.708 at the 10th quantile to 2,871.126 at the 90th quantile and for biological mesh from 3,221.216 at the 40th quantile to 6,117.598 at the 90th quantile. Hospitalization costs for inguinal hernia surgery are influenced by multiple factors, with significant variations across different patient groups. Strategies to control costs should be tailored to address the specific needs of patients, optimize surgical methods, and improve perioperative care. Future research should extend these findings across different healthcare settings and consider the latest advancements in medical technology and policy changes.