We provide novel evidence on the causal impact of student absences in middle and high school on state test scores, course grades, and educational attainment using a rich administrative dataset that includes the date and class period of each absence. Our identification strategy addresses potential endogeneity due to time-varying student-level shocks by exploiting the fact that in a given year, there exists within-student, between-class variation in absences. We also leverage information on the timing of absences to show that absences that occur after the annual window for state standardized testing do not appear to affect test scores, which provides a further check of our identification strategy. We find that absences in middle and high school harm contemporaneous student achievement and longer-term educational attainment: On average, missing 10 math classes reduces math test scores by 7% of a standard deviation, math course grades by 19% of a standard deviation, the probability of on-time graduation by 8%, and the probability of college enrollment by 7%. Similar results hold for absences in English Language Arts classes. These results suggest that absences in middle school and high school are just as harmful, if not more so, than absences in elementary school. Moreover, the timing of absences during the school year matters, as both the occurrence and the impact of absences are dynamic phenomena.