There is no consensus on whether the level of debt carried by medical students has a strong effect on their choice of medical specialty. Dr. Herbert Pardes and others have suggested that medical school debt has been a direct cause of the US primary care shortage.  However, the amount of debt carried by medical graduates suggests the opposite. Students in more competitive specialties had significantly less debt on graduation, meaning that they weren't reliant on higher future compensation to repay loans. In 2016, 80% of family medicine residents graduated with debt, while only 74% of anesthesiology residents and 60% of ophthalmology residents graduated with any debt. The mean debt of students that did have debt entering family medicine residencies was $181,000, while the mean debt of those entering dermatology residencies was $153,000. 
According to the Association of American Medical Colleges (AAMC), the median tuition in 2012-2013 was $28,719 for resident students at public institutions, $49,000 for nonresident students at public institutions, and $47,673 for students at private institutions. With fees and insurance, the cost of attendance is $32,197 and $54,625 for resident and nonresident students at public institutions and $50,078 at private institutions. Overall, the four-year median cost of medical school in 2013 was $278,455 for private schools and $207,866 for public institutions.