By Ben Burrows | bburrows@syracuse.com

Less than two weeks after being named among the worst cities to live in by 24/7 WallSt, Syracuse and Rochester have landed among the best based on quality of life in a study by U.S. News & World Report.

Earlier this month, 24/7 WallSt placed Rochester No. 34, Syracuse No. 31 and Buffalo No. 22 in a ranking of the worst cities to live among the 551 cities with more than 65,000 people. The rankings were based on nine major categories including crime, infrastructure, education, housing and more.

U.S. News & World Report's recent ranking placed Albany, Rochester and Syracuse in the top 25 metro areas for quality of life, which includes education, crime and health services.

Check out the rankings below to see why these Upstate NY cities made the list.

Don't Edit

Mike Groll/AP Photo

No. 21 Albany

Median Home Price: $197,213

Median salary: $50,880

College Readiness rank: 49

Health rank: 18

Well-being rank: 52

Crime rank: 18

Average commute time: 22.8 minutes

Don't Edit

Photo via Democrat & Chronicle

No. 20 Rochester

Median Home Price: $131,152

Median salary: $47,590

College Readiness rank: 14

Health rank: 23

Well-being rank: 83

Crime rank: 49

Average commute time: 21.1 minutes

Don't Edit

David Lassman/The Post-Standard

No. 18 Syracuse

Median Home Price: $82,500

Median salary: $47,330

College Readiness rank: 41

Health rank: 17

Well-being rank: 41

Crime rank: 40

Average commute time: 21 minutes

Don't Edit

Top 5

Here are the top 5 cities for quality of life, according to U.S. News & World Report.

5. Sarasota, Florida

4. Portland, Maine

3. Grand Rapids, Michigan

2. McAllen, Texas

1. San Jose, California

Don't Edit

Don't Edit

READ MORE: 12 best cities and towns to visit in the summer in Upstate NY

Here's a list of 12 cities and towns you need to visit this summer to help you plan your next road trip.