Background: There was a challenge for teaching hospitals to accept residents for educational goals due to their training costs. Objectives: The present study aimed to estimate the actual costs of residency training in hospitals for policymaking, budgetary impact, and negotiation. Methods: This retrospective study was performed in eight teaching hospitals affiliated with the Iran University of Medical Sciences, Tehran, Iran, in 2018. This study was based on the estimation of the actual costs of residency training for an academic year. Two scenarios were designed to estimate the costs of education per resident. All of the resources used by residents in the hospitals were identified. Cost items attributed to the training goals were allocated to the internal medicine and surgical fields; however, for cost items that were used for treatment and education, such as disposables and consumables and equipment, the cost drivers were used. Therefore, the difference between the scenarios was related to the cost drivers. In the first scenario, the expert panel defined the portion of residents of hospital resources. For the second scenario, the clinical staff-to-resident ratio was considered. Excel software (version 2010) was used for cost analysis. Results: Overall, the selected hospitals had spent $ 586,720.35 and $ 572,358.10 based on scenarios 1 and 2, respectively. The residency training per surgical resident in the hospitals was about 1.2 times higher than an internal medicine resident. Surgery, neurology, urology, and anesthesiology were the fields with the highest costs in the hospitals; nevertheless, psychiatry, occupational medicine, and geriatrics and gerontology were the fields with the lowest costs in the hospitals, respectively. Conclusion: Although residency training accounts for a large proportion of hospital costs, employing residents reduces the costs of human resources. Monitoring and controlling costs, as well as resource quotas for resident training, can be a way to reduce educational course costs in hospitals. Universities can cover some parts of the educational costs to motivate hospitals to make an appropriate setting for residents.