This study aimed to identify an association between serum calcium (Ca) and phosphate (P) levels, tested during the pre- and postoperative period, with hospital costs and length of hospital stay (LOS) of patients who underwent major abdominal surgery. This retrospective cohort study analyzed the medical records of patients who underwent major abdominal surgery. A total of 3893 patients were included in the analysis, and multivariable linear regression analysis was performed. For a 1 mg/dL increase in preoperative Ca, total hospital costs decreased by 3997.9 dollars (coefficient: −3997.9, 95% confidence interval (CI): −4900.5, −30,953; p-value < 0.01), and for a 1 mg/dL increase in postoperative P, total hospital costs decreased by 702.5 dollars (coefficient: −702.5, 95% CI: −1274.5, −67.3; p-value = 0.03). Furthermore, for a 1 mg/dL increase in preoperative Ca, LOS decreased by 2.9 days (coefficient: −2.9, 95% CI: −3.7, −2.1; p-value < 0.01). For a 1 mg/dL increase in postoperative P, LOS decreased by 3.4 days (coefficient: −3.4, 95% CI: −4.2, −2.6; p-value < 0.01). This study suggested preoperative Ca and postoperative P could be useful indicators for the reduction of hospital costs and decrease in LOS from the perspective of enhanced recovery after surgery.