Forbes magazine has been tracking the number of 20 to 35-year-old professionals in the 40 biggest metro areas in the United States to find out which ones are attracting fresh talent.

Minneapolis came in at number five, bolstered by its highest concentration of top companies status, above average paying jobs, and its low cost of living.

San Francisco displaced New York for the top spot this year. Adjusted for its population, the Bay Area has the highest share of young professionals who graduated from the 1998 class at prestigious schools such as Harvard, Stanford, Duke, Northwestern, and Princeton. Forbes’ methodology tracks where graduates settle 10 years after graduation as a way to find out where the best jobs are for young professionals. Those rankings are combined with Forbes' research on 400 of the best big companies and 200 of the best small companies, median salary data from the Census Bureau, and is adjusted for population (so, for example, cities the size of Minneapolis can compete with New York).

The top-five cities for young professionals are:

1. San Francisco
2. Boston
3. Houston
4. New York
5. Minneapolis