A new school accountability system for Michigan schools that requires A-F letter grades is almost official.

The Michigan Senate passed the legislation outlining it Tuesday night, despite widespread opposition from many education groups and the state’s top educator. Gov. Rick Snyder, who’s been advocating for an A-F system, is expected to sign it, though his spokesperson said he’s still reviewing the final version.

Under the bill, schools will get up to five grades and three rankings. Here’s how they will work:

The A-F grade will be based on … What we know
Grade 1 The number of students whose scores on state exams indicate they are proficient in math and English language arts. This would be based on the M-STEP exam given in grades 3-8 and the SAT in 11th grade.
Grade 2 The percentage of students who improve by a certain amount in math and English language arts on state exams. The bill lays out ways the state can determine students have made adequate growth, based on performance on state exams:
  1. Improving between the fall and the spring of the same school year; or from the spring of one school year to the spring of the next school year.
  2. Scoring high enough to be deemed proficient on one exam and maintaining that status the next time they take the exam.
  3. Missing the proficiency bar, but showing they’re on track to become proficient in the next three years.
Grade 3 The percentage of students still learning English and who also achieve an adequate amount of improvement toward becoming proficient in the language. This would be based on a state assessment.
Grade 4 Graduation rates. Would only apply to high schools.
Grade 5 The school’s overall academic performance and how it compares to schools across the state with similar demographics. This would be based on state exams. The state education department would determine which schools have similar populations.

The state education department will also be required to issue one of five rankings (significantly above average, above average, average, below average, or significantly below average) in these three categories:

The ranking will be based on … What we know
Category 1 The share of students who are chronically absent The state defines chronic absence as missing 10 percent of the number of possible days of attendance in a school year.
Category 2 The percentage of students who took state exams The state is not required to include students who receive special education services and are not required to take the state exams.
Category 3 The performance of certain “subgroups” of students, and how that compares to statewide results for those groups Subgroups in Michigan include students of color, students from low-income homes, students learning English, and students with disabilities.

The A-F grades developed by the state education department are likely to supersede a city grading system that has been developed over the last few months. It’s not clear yet whether the commission that developed the city-wide system will continue with the plan. Here’s a look at the Detroit plan.