* Your school's specific attendance policy: Each school district and even individual schools within a district have their own rules. Some might allow a certain number of excused absences, while others might have stricter limits. Unexcused absences almost always have stricter limitations.
* State laws: Some states have laws that dictate minimum attendance requirements.
* Whether the absences are excused or unexcused: Excused absences (due to illness, doctor appointments, family emergencies) are generally treated more leniently than unexcused absences (skipping school without a valid reason).
To find out how many days you can miss at *your* middle school without facing consequences, you should check your school's student handbook or contact your school's attendance office or guidance counselor. They will have the most accurate and up-to-date information.