Final answer:
Amanda will need to buy 85 boxes of rulers.
Step-by-step explanation:
To calculate the number of boxes of rulers Amanda needs to buy, we need to sum up the number of students in each grade level. There are 338 fifth-graders, 326 sixth-graders, 451 seventh-graders, and 400 eighth-graders.
We can add these numbers together to get the total number of students in the middle school:
338 + 326 + 451 + 400 = 1515
Since each box holds 18 rulers, we can divide the total number of students by 18 to find how many boxes Amanda will need to buy:
1515 ÷ 18 ≈ 84.2
Since we cannot have a fraction of a box, Amanda will need to buy 85 boxes of rulers.