(Photo by Tim Boyle/Getty Images)

If you’re in the market for your first house, WalletHub has conducted a study ranking the best, and worst, cities in the U.S. for first-time home buyers.

To determine the metrics, WalletHub compared a sample of 300 U.S. cities, in different sizes, in affordability, the real-estate market and quality of life.

So, how does Michigan stack up?

The top city for new home buyers, according to the study, is Sterling Heights, coming in at No. 52.

Other Michigan cities on the list include Grand Rapids (94), Livonia (98), Dearborn (104), Warren (111), Flint (142), Detroit (166), Ann Arbor (210) and Lansing (218).

The best city in the U.S. for first-time home buyers was Chesapeake, Virginia, and the worst was Berkeley, California, at No. 300.

View the full list here.

Anne Erickson's love for music drew her into radio, and she started shortly after graduating from MSU. She has a passion for rock and metal, plus local music. She also fronts the band Upon Wings. Email Anne at erickson@WRIF.com, follow her on Instagram at @EricksonAnne and tweet at her @AnneErickson!