This is an archived article that was published on in 2017, and information in the article may be outdated. It is provided only for personal research purposes and may not be reprinted.

College grads must soon begin the daunting task of starting their first job and trying not to go broke on their meager paychecks.

It's not going to be easy.

In a recent report from the real-estate website Trulia and the job posting site Indeed, researchers crunched the numbers on what grads are likely to face when it comes to job prospects and housing costs in major cities. Unfortunately, the cities that tend to have the most job opportunities for recent college graduates are also typically the most expensive.

"It turns out that new grads are going to have a very difficult decision to make," said Ralph McLaughlin, chief economist at Trulia. "It's very difficult to have both" jobs and a low cost of living.

The report estimates what share of apartment listingswould take up less than 30 percent of the typical millennial's paycheck — which is what financial advisers often say should be the cap for how much people spend on rent. The ratio was based on the median monthly paycheck earned by 20-somethings in each city. The study also looked at the share of jobs openings in each city that would be a good fit for new college grads who have degrees but very little work experience.

Take a look at San Jose, where nearly 32 percent of the job postings could be a good fit for recent college grads — the highest of the 104 cities studied. However, only 2.5 percent of apartments listed would be affordable to a worker earning the median monthly paycheck of $3,333 collected by 22- to 30-year-olds in that city.

Someone prioritizing affordability, on the other hand, may really struggle to find a job. In Dayton, Ohio, for example, only about 16 percent of the jobs are a good fit for recent grads, according to the report. But nearly 43 percent of the apartments would be affordable for a millennial — more than any other city on the list. The median monthly income for millennials there is $2,503 a month.

Then there are places that strike a better balance between affordability and share of jobs available.

In Seattle, for example, 24 percent of job listings might be good for recent grads, ranking third in terms of job opportunities. Nearly 8 percent of the apartments there would be affordable for millennial workers, three times as many as in San Francisco.

Young people looking for jobs in the tech industry may also want to consider cities such as San Antonio, Austin, Texas, or Salt Lake City, says Katie Bardaro, vice president of data analytics for PayScale, a compensation data and software company.

These areas have growing tech hubs, but have a lower cost of living than the typical tech centers in the Bay Area, Bardaro says. For instance, the cost of living in San Antonio is 14 percent below the national average, according to an analysis by PayScale. In Salt Lake City, the cost of living is 6 percent below the national average.

Compare that to San Francisco, where the cost of living is 64 percent higher than the national average, or New York City, where it's 76 percent higher, according to PayScale. However, younger workers may have an easier time finding jobs in those pricier cities.

You don't necessarily have to give up on your goal of living in New York or San Francisco, especially if you've landed a job that you think will help you kick off your career. Just be prepared to live with roommates, or in a neighborhood that isn't exactly hip, until you're making the bigger bucks.