As the class of 2017 turns in its last papers and takes its finals, the real tests begin: Where can I find a job? Where can I afford to live? Is it possible to have it all? Sorry, graduates: the unfortunate truth is that good job markets go hand in hand with expensive housing. That said, we identified some unlikely sweet spots where job markets are good for new graduates and the housing is relatively affordable.

For new graduates, one option is to move back home: increasingly, young adults are living with their parents, especially if they don’t have a job. For others, though, the post-college launch often starts with relocation: 31% of recent college grads moved to a new home in the past year, compared with 11% of adults overall. These educated young adults are particularly prone to move for a job or a job search. Whereas just 1.4% of all adults moved in the past year to take or look for a new job, 6.2% of young college grads did – that’s more than four times the rate of adults overall.

For those who are looking for a new city, where should they look? We scoured rental listings on Trulia and job postings on Indeed to find the metros that offer both jobs suitable for recent grads and homes to fit the typical college graduate’s budget. The bad news is that the local markets with the most opportunities for young grads are among the least affordable. The good news is that some lower-cost markets also offer numerous opportunities for recent grads, though not as many as the priciest markets. While there’s no place that offers the magic combination of extensive job opportunities and easily affordable housing (and if that place existed, it probably wouldn’t stay affordable for long), we found six metros where you can spend a bit less on housing without giving up too much on the job options.

Where to find the jobs that recent grads typically do

To see where the job opportunities for recent college graduates are, we first identified the jobs that young grads actually do. These aren’t necessarily jobs that require a college degree: in fact, close to half of recent college graduates are considered underemployed in the sense that they have jobs that, according to experts, don’t require a bachelor’s degree. Our measure is the share of employees in each occupation that are 22 to 27 year-olds with a bachelor’s degree only, according to U.S. Census Bureau data. (Throughout this post, we define recent college grads as 22 to 27 year-olds with a bachelor’s degree but not a graduate or professional degree.)

Across all occupations, 3.4% of employed workers are young college grads. But for some occupations, the share is much higher: more than 10% of financial analysts, meeting and convention planners, news reporters, advertising sales agents, and mechanical engineers, for instance, are recent graduates.

What don’t recent graduates do? They account for less than 0.5% of employment in many manual and personal-service jobs, like bus drivers and housekeepers, as well as occupations that require a professional or graduate degree, like doctors, dentists, and lawyers.

To find where opportunities for recent grads are, we looked at all job postings on Indeed during March 2017, and calculated the share of job postings in each metro area in occupations where the share of college grads is at least twice as high as the national average, according to the census. Among the 104 metros with at least 500,000 people, these new-grad-friendly occupations accounted for 18% of all job postings. But the range among metros is huge: only 10% of job postings in metro Youngstown, Ohio, are new-grad-friendly, compared with 32% of jobs in metro San Jose, Calif.

The local markets with the highest share of jobs for new grads are large coastal metros: New York, Washington, Boston, San Francisco, and Los Angeles are all among the top 10. Of course, these are also among the most expensive housing markets in the country — as we’ll see below.

Market Mismatch: High Income Metros are Not the Most Affordable

A dream job isn’t much use if it’s someplace you can’t afford to live. To find the markets recent college graduates can afford, we identified the share of rentals listed on Trulia that are reasonably priced for a typical college grad in that market. Using census data, we calculated the median personal income for employed recent college graduates. The highest median income for new graduates was in metro Washington, followed by San Jose, San Francisco, Houston, and New York.

What might seem like a fat New York or Bay Area salary, though, might not get you far. Looking across all listings on Trulia between Jan. 1, 2017 and April 17, 2017, just 3% of metro New York listings are affordable at the median local recent-grad household personal income; San Jose and San Francisco are even less affordable. In fact, none of the 10 highest-income metros is among the most affordable: where incomes are higher, housing costs are, too. The five most affordable markets for new grads are all in the Midwest. But the second-most affordable, Youngstown, also has the lowest share of job-postings in new-graduate occupations.

The Catch-22 of the Job and Housing Market

Do new grads have to choose between a paycheck in their pocket or a roof over their head? To an extent, yes, and it’s not just San Jose and Youngstown. Nearly all of the metros with the most job opportunities for recent grads are among the least affordable. (The correlation between the new-grad job share and percent affordable listings is -0.46, which is statistically significant.) Some markets, like Riverside – San Bernardino, Calif., and Cape Coral – Fort Myers, Fla. – rank relatively low on both housing affordability and job opportunities for new grads. Yet, no metro is high on both dimensions.

Ultimately, new grads shouldn’t despair. Among metros that offer similar job opportunities for new grads, there are places that offer greater affordability. While there’s no place that offers it all — tons of job opportunities and easily affordable housing — we identified some metros where the combination of jobs and housing comes as close to good as it gets. The Bay Area, New York, and Boston are too pricey to make the list. Instead, six metros stand out: Seattle, Hartford, Conn., Baltimore, Pittsburgh, Detroit, and Dayton, Ohio, all are more affordable than most other markets with similar job opportunities. So new grads take note: your best bet is to do your homework this summer to find a good mix of jobs and affordable rent.

Methodology

In addition to using Trulia rental listings and Indeed job postings, we used Census Bureau data throughout this post. The share of workers in each occupation that is recent graduates is based on the 2013-2015 American Community Survey (ACS), and the median income by metro of recent graduates is based on the 2011-2015 ACS, both downloaded from IPUMS. Data on migration rates are from the Current Population Survey’s 2016 March Supplement.

An alternative metro-level measure of graduate-friendly occupations is the weighted average of new-grad share by occupation within a metro, weighted by the number of job postings in each occupation. The correlation between that alternative and the one we used in the post is 0.93.