WESTPORT — Staples High School and neighboring Weston High School were recently ranked in a U.S. News & World report as some of the top schools in the nation and state of Connecticut.

Weston High was ranked second in the state and No. 169 in the nation, while Staples was ranked seventh in the state and No. 361 in the nation, up 33 spots from last year. Rankings are determined based on each school’s performance on state-required tests, graduation and how well they prepare students for college, according to the report.

Schools were ranked under U.S. News’ revamped methodology, and the highest-ranked public schools are those “whose attendees demonstrated outstanding outcomes above expectations in math and reading state assessments, passed a diverse array of college-level exams and graduated in high proportions,” the report said.

Staples and Weston received overall “scorecards” of 97.7 and 99.02 percent, respectively, averaging the percentages of students who took and passed Advanced Placement exams, and the graduation rate.

Darien High School earned the No. 1 spot this year as best school in Connecticut.