(STACKER) — As filmmaker and writer Nora Ephron said during a ’96 commencement address at Wellesley College, “Your education is a dress rehearsal for a life that is yours to lead.” If that’s the case, high school may be one of the greatest dress rehearsals of all.

It’s a place where students explore their interests, dive into extracurricular activities, finally get the freedom to choose their own classes, and prepare for college or the workplace. For many of these students and their families, public education is key: 48.1 million students enrolled in public elementary and secondary schools in 2020; and there are almost 24,000 public high schools in the U.S., according to the National Center for Education Statistics.

Get daily news, weather, breaking news, and sports alerts straight to your inbox! Sign up for the abc27 newsletters here. 

For many anxious parents, getting their kid into the best of these public high schools is of the utmost importance. Some families even move homes to get into better school districts. However, among all of these thousands of schools, a few stand out for their academic excellence, incredible track records, and the future success of their young students.

Stacker compiled a list of the best public high schools in Pennsylvania using rankings from Niche. Here’s how it breaks down: Niche uses eight factors for its rankings, with each factor given a different weight. A whopping 60% of the score is based on academics and grades, which is calculated using state assessment proficiency tests, SAT/ACT scores, and survey responses.

From there, culture and diversity, parent and student surveys on their overall experiences, and teachers each contribute to 10% of the score. Finally, scores for each school’s clubs and activities, health and safety, resources and facilities, and sports constitute 2.5% each.

Keep reading to find out which public high schools are the best in your state.

#25. Plymouth-Whitemarsh Senior High School
– School district: Colonial School District
– Enrollment: 1,524 (15:1 student to teacher ratio)
– Niche grade: A+

#24. Upper Dublin High School
– School district: School District Of Upper Dublin
– Enrollment: 1,291 (13:1 student to teacher ratio)
– Niche grade: A+

#23. Northwest Pennsylvania Collegiate Academy
– School district: Erie City School District
– Enrollment: 860 (16:1 student to teacher ratio)
– Niche grade: A+

#22. Central Bucks High School – South
– School district: Central Bucks School District
– Enrollment: 1,724 (17:1 student to teacher ratio)
– Niche grade: A+

#21. Bayard Rustin High School
– School district: West Chester Area School District
– Enrollment: 1,296 (15:1 student to teacher ratio)
– Niche grade: A+

#20. Garnet Valley High School
– School district: Garnet Valley School District
– Enrollment: 1,569 (14:1 student to teacher ratio)
– Niche grade: A+

#19. Great Valley High School
– School district: Great Valley School District
– Enrollment: 1,337 (15:1 student to teacher ratio)
– Niche grade: A+

#18. Wissahickon Senior High School
– School district: Wissahickon School District
– Enrollment: 1,465 (13:1 student to teacher ratio)
– Niche grade: A+

#17. Central Bucks High School – West
– School district: Central Bucks School District
– Enrollment: 1,503 (16:1 student to teacher ratio)
– Niche grade: A+

#16. State College Area High School
– School district: State College Area School District
– Enrollment: 2,356 (12:1 student to teacher ratio)
– Niche grade: A+

#15. Hershey High School
– School district: Derry Township School District
– Enrollment: 1,225 (15:1 student to teacher ratio)
– Niche grade: A+

#14. Upper St. Clair High School
– School district: Upper St. Clair School District
– Enrollment: 1,392 (16:1 student to teacher ratio)
– Niche grade: A+

#13. Central High School
– School district: Philadelphia City School District
– Enrollment: 2,412 (24:1 student to teacher ratio)
– Niche grade: A+

#12. Central Bucks High School – East
– School district: Central Bucks School District
– Enrollment: 1,517 (15:1 student to teacher ratio)
– Niche grade: A+

#11. Unionville High School
– School district: Unionville-Chadds Ford School District
– Enrollment: 1,324 (14:1 student to teacher ratio)
– Niche grade: A+

#10. Strath Haven High School
– School district: Wallingford-Swarthmore School District
– Enrollment: 1,194 (14:1 student to teacher ratio)
– Niche grade: A+

#9. Mt. Lebanon Senior High School
– School district: Mt. Lebanon School District
– Enrollment: 1,792 (16:1 student to teacher ratio)
– Niche grade: A+

#8. Fox Chapel Area High School
– School district: Fox Chapel Area School District
– Enrollment: 1,333 (13:1 student to teacher ratio)
– Niche grade: A+

#7. North Allegheny High School
– School district: North Allegheny School District
– Enrollment: 2,690 (15:1 student to teacher ratio)
– Niche grade: A+

#6. Lower Merion High School
– School district: Lower Merion School District
– Enrollment: 1,532 (12:1 student to teacher ratio)
– Niche grade: A+

#5. Harriton Senior High School
– School district: Lower Merion School District
– Enrollment: 1,240 (11:1 student to teacher ratio)
– Niche grade: A+

#4. Downingtown STEM Academy
– School district: Downingtown Area School District
– Enrollment: 825 (13:1 student to teacher ratio)
– Niche grade: A+

#3. Radnor Senior High School
– School district: Radnor Township School District
– Enrollment: 1,196 (13:1 student to teacher ratio)
– Niche grade: A+

#2. Conestoga Senior High School
– School district: Tredyffrin-Easttown School District
– Enrollment: 2,243 (16:1 student to teacher ratio)
– Niche grade: A+

#1. Julia R. Masterman Secondary School
– School district: Philadelphia City School District
– Enrollment: 1,207 (24:1 student to teacher ratio)
– Niche grade: A+