How many years do you have to take of math in high school?

It all depends on where you live. The state in which you live determines that. For example, I live in Ohio, and to graduate students need 3 math credits which translates into 3 years of math, but we just passed legislation stating that now students need 4 math credits to graduate. So now it looks like students will take math every year in high school. Check with your own state's Deptartment of Education to find out or ask a high school guidance counselor in your area.