This study evaluated changes over the academic year in the cost and the outcome of inpatient care to investigate the effect of housestaff experience in teaching hospitals. Patients with 25 preselected discharge diagnoses, admitted between January 1, 1983 and December 31, 1987 to acute-care, nonfederal, non-pediatric hospitals in the Minneapolis/St. Paul metropolitan area (total number available for analysis 240,467) were examined. Level of housestaff experience was measured as the number of days (1 to 365) into the academic year when the patient was admitted. Linear and logistic regression analyses were used to evaluate the different effects of experience on patient care in teaching hospitals compared with nonteaching hospitals. For the subset of patients with internal medicine diagnoses, the expected "July Phenomenon" was observed, with significant relative declines in diagnostic and pharmaceutical charges in teaching hospitals over the academic year. In contrast, surgery patients showed an increase in length of stay and various charges over the academic year in teaching hospitals. There were no meaningful effects of housestaff experience on mortality, operative complications, or nursing home discharge. These results indicate that housestaff training is significantly related to the use of hospital resources for inpatients, but that the degree and direction of the effects differ by specialty. These findings may reflect important differences among training programs in the process of physician education and its effects on patient care.