The state is considerably underestimating the number of educators needed to run Tennessee schools according to its own requirements, says a state comptroller’s report released Wednesday.

And local governments are paying the difference. Statewide, districts employ about 12,700 more educators than the state funds, according to the comptroller’s Office of Research and Education Accountability, or OREA.

The report analyzed the cost of staffing the state’s schools and found that almost all of Tennessee’s 146 districts had to hire more educators than were provided under the state’s funding formula, called the Basic Education Program, or BEP.

Tennessee’s largest school system in Memphis was an exception. Shelby County Schools has been losing enrollment annually and is one of only three districts to stick to the number of state-funded teachers. However, the cash-strapped district dips into local funding to pay its teachers the highest average weighted salary in the state, $54,187.

OREA reports that many districts were especially shorted when it comes to receiving state money to pay for assistant principals, considered school workhorses who oversee everything from discipline to attendance to transportation. The BEP provides money for only a third of the state’s assistant principals, and 22 districts don’t get state money for a single assistant principal.

Still, the vast majority of educators in Tennessee are classroom teachers. The median percentage of additional teachers funded with local money was 22 percent. That translated to 686 more teachers in Knox County and 499 more in Rutherford County in 2014-15.

The reason for the gap? The BEP calculates the number of state-funded positions based on student enrollment for the district as a whole, but districts still have to meet state class size requirements within each school building — a maximum of 25 students for grades K-3, 30 for 4-6, and 35 for 7-12.

The report comes months after Tennessee codified revisions to the BEP, a hybrid of funding formulas crafted in 1992 and 2007. However, many critics say the formula is unfair and does not pay for the true cost of educating students. The state is fighting separate funding lawsuits from districts in Memphis, Nashville and Chattanooga.

Gov. Bill Haslam’s administration has been adamant that the formula is fair, even while acknowledging that the state doesn’t fully fund its own formula.

This spring, the Tennessee General Assembly voted to increase K-12 education spending by $223 million, with a large portion going to increase teacher pay. Districts have received about $194 million of the allocation; state officials say the remaining $29 million will be spent on teachers’ insurance.

The amount that teachers have felt in their paychecks has varied. In Memphis, Shelby County Schools’ has budgeted for a 3 percent raise for top teachers, which is to begin showing up in paychecks this month.

You can find the full OREA report here.