Follow CBSPHILLY Facebook | Twitter

PHILADELPHIA (CBS) — A new study reveals where Pennsylvania, New Jersey and Delaware rank when it comes to the best or worst places to retire.

2018 Most Educated City: Newark Earns Top Award In Delaware

Bankrate, a New York City-based consumer financial services company, says Delaware is the best state out of three to retire as the First State ranks 19th overall. Pennsylvania is one spot ahead of New Jersey as they rank 31st and 32nd respectively.

The study ranks the states based on cost of living, crime, culture, health care quality, taxes, weather and well-being.

South Dakota is the best place to retire, whereas New York ranks at the worst, according to the study.