From Los Angeles to New York City, the United States is full of big cities. But if you're living in Arizona, there's only one that could even be considered among the "best," according to a new study.

Mesa barely inched its way into the top 20 on a 2017 list compiled by a WalletHub study which ranked the 62 largest U.S. cities from best to worst.

The personal-finance website analyzed the cities using five key categories: affordability, economy, education and health, quality of life, and safety.

Mesa received its highest marks in both affordability and safety. Ranked using those categories Mesa would be 6th among U.S. cities. Overall, Mesa is the 19th best city and 15th according to its economy.

The only other two Arizona cities to make the list were Phoenix (38) and Tucson (45).

The top rated city was Virginia Beach, Virginia followed by Seattle, Pittsburgh, San Diego and Colorado Springs, Colorado.

The worst rated city was Detroit.

To see the full list click here.