Two Massachusetts cities ranked among the Top 20 best places to live in U.S.

For those looking to settle down, there’s fewer places better than the Bay State, according to a new ranking.

According to the online financial magazine, Money, both Somerville and Milton are two of the country’s most desirable locations, ranking seventh and seventeenth on their Top 50 list of the greatest cities to live in the United States.

Money cites Somerville’s proximity to Boston, low crime rates and great education as the hallmarks of a great city.

“For residents, Somerville offers more than just a wide array of activities. The town claims some of the most affordable home prices in the area, its school district is well-rated, and according to the crime and safety experts at Safewise, it’s actually one of the safest cities in the country — No. 40, to be exact,” writes the magazine.

Money also states that Milton is a bustling metro suburb, despite its small-town feel.

“Compared to other Boston suburbs, Milton real estate is on the affordable end (though higher than the national median). Still, residents say the area’s worth the price tag. Crime is extremely low, the schools (both public and private) are highly rated, and jobs are plentiful — especially if you’re willing to commute into Boston. By car, Bean Town is just 25-minutes away,” Money says.

Economic opportunities, quality of life and diversity were among the primary deciding factors when assembling the list, according to the magazine.

Download the FREE Boston 25 News app for breaking news alerts.

Follow Boston 25 News on Facebook and Twitter. | Watch Boston 25 News NOW