City life is expensive, especially when raising a family. It's much more doable, though, if you can nail down which city suits your budget best.
Porch, a website that connects homeowners to local home improvement contractors, narrowed down the best cities for young families using data from the U.S. Census Bureau, review site Yelp and online real estate database Zillow. Porch ranked each city based on the number of millennials living there, child day care availability and rental housing options.
Out of the 47 cities ranked, these are the top 10 most family-friendly in the U.S.
However, several cities lacked a large population of millennials, children's day care services and one- or two-bedroom housing options. The five least family-friendly places are Detroit, Michigan; Miami, Florida; Dallas, Texas; Providence, Rhode Island; and Hartford, Connecticut, according to Porch.
Detroit earned the bottom spot on the list due to a lack of available child care, a low population of millennials and high-priced housing, the report says. Additionally, Detroit's population has been on the decline for decades, and given the city's history of economic issues, it's become known as a difficult place to settle down and plant roots.
When deciding where to settle down, it's also important to consider your annual salary and whether it will be enough to sustain your lifestyle in certain cities.
The median income for middle-class U.S. households was $78,442 as of 2016, according to data from the Pew Research Center. However, in some major metropolitan areas, such as New York and San Francisco, raising a family can require hundreds of thousands of dollars per year.
One way to determine whether a city fits your budget is the 50/30/20 rule, in which 50% of your income goes to necessities such as rent, gas, utilities, transportation, healthcare and groceries, 30% goes to fun and 20% is put in savings. If a location's cost of living pushes your budget outside of those boundaries, it might not be the best place for your family.
Another way to figure out if you can afford to live in a certain city is to use an online calculator, such as NerdWallet's cost of living calculator. With this tool, you can quickly compare various costs across different cities and better understand how much you'd need to earn in order to live well in a new place.
Like this story? Subscribe to CNBC Make It on YouTube!