yes , there is an equal formula* : A school with x amount of students gets x amount of teachers  (not money). The formula for elementary schools is different than for high schools.  Theoretically, schools can decide to prioritize electives at the expense of larger class sizes or choose fewer electives to maintain class size.  * There is also $ that comes from different sources  (state & federal grants), to different schools, for different purposes (such as special education or English Language Learners).