PORTSMOUTH, Va. (WAVY) — New findings by WalletHub ranked the nation’s best spots for first-time home owners, some of which include local cities. The data ranked over 300 cities of varying sizes in order to help Americans narrow their search of the best city to purchase their first home.

The rankings were determined on the basis of affordability, real-estate market and quality of life. Chesapeake and Virginia Beach both ranked in the top 20 of the nation’s best locations, with Chesapeake at No. 9 and Virginia Beach at No. 15.

Source: WalletHub

Also in the top 50 are Newport News and Hampton at No. 34 and 37, respectively. Norfolk ranked at No. 54 with Portsmouth making the list at No. 108.

The data also showed rankings based on the size of the city: large, midsized and small as shown below.

Rankings by City Size

RankingCityCity Size
4Virginia BeachLarge
4ChesapeakeMid
5Newport NewsMid
14NorfolkMid
15HamptonSmall