The Orono and Bangor school districts are listed among the best in Maine in 2020, according to a new study.

Each year, Niche.com ranks the best school districts in the nation and the state. Niche uses government data and opinion-based surveys from students, alumni and parents to determine its rankings.

Orono ranks No. 6 among Maine districts for 2020, receiving an overall A grade. Bangor ranks No. 12 with an A- grade.

Other area school districts also earned spots among the top 25. Hampden comes in at No. 16 and Hermon at No. 23.

Yarmouth was named the best school district in the state.

In a separate ranking of the best high schools for 2020, the Maine School of Science & Mathematics in Limestone was named the best high school in the state. John Bapst Memorial High School in Bangor ranked No. 12 on the list among public and private high schools. Orono High School ranked No. 21 and MDI High School ranked No. 23 on that list. Bangor High School was No. 34. Bangor Christian Schools came in at No. 39.

The ranking system is based on eight categories: Academics, Teachers, Culture & Diversity, Parent/Student Surveys on Overall Experience, Health & Safety, Resources & Facilities, Clubs & Activities, and Sports.