According to a recent study by finance website NerdWallet, six of the top 10 places for young families in New York are on Long Island.

NerdWallet says it considered home affordability, prosperity and growth, family friendliness and quality of education in putting together its list. In total, 158 towns and cities (with populations over 10,000) across the state were ranked. New York City came in dead last on the list.

Here is how each Long Island town on the list ranked: