Can a physician easily afford a new home in your town? How about a restaurant worker?

Today, real estate portal Trulia released an “affordability calculator,” which the company says will offer homebuyers “an honest look at what they can — and should — spend on their dream home.”

The calculator will give buyers details about their projected debt-to-income ratio — Trulia said that buyers should shoot for 36 percent as a conservative target.

Buyers will need to provide their annual income, credit score, monthly debts, ZIP code, property tax and interest rate for the desired area to achieve the most accurate estimate for whether they can afford the mortgage. Trulia can connect buyers to lenders if they want to get pre-approved, the company added.

In addition, the company also released research on who can afford what in different metro areas around the country. It pulled Bureau of Labor Statistics data for four professions (doctors, first responders, teachers and restaurant workers) in 100 different metro areas, looked at those professions’ median incomes and compared them to home prices in each metro in order to parse affordability.

In Dayton, Ohio, for example, where the median list price is $129,000, doctors (who earn a median wage of $208,000) can afford 99.6 percent of homes on the market.

Teachers and first responders are also in pretty good shape in Dayton; they can afford 83.3 percent and 75 percent of listings, respectively.

And even restaurant workers, with a median income of $19,736, have a shot at homeownership — 32.4 percent of listings would be affordable for an average restaurant worker in Dayton.

San Francisco, however, is a different story. Physicians could only afford 41.6 percent of homes on the market in that metro, and the other professions are even worse off. First responders can afford a mere 2.6 percent of homes on the market; teachers can afford just 0.4 percent of what’s available; and restaurant workers are entirely priced out of the market.

These metrics assume that people are buying homes with a single income, so Trulia also looked at two-income households to see if that alleviated any of the burden.

“When we calculated affordability for two-income households in the same occupation, we see that the pressure of finding an affordable home on the market is reduced — mostly,” wrote Trulia senior economist Cheryl Young in a blog post.

“For first responders, doubling income ensures at least 50 percent of homes on the market are affordable to these households in all markets except in costly San Francisco. Two-income teacher households, however, still feel the crunch in San Francisco, San Jose, Calif., and Honolulu where less than 50 percent of available homes in these markets are within reach,” Young wrote.

“Meanwhile, the number of markets where restaurant workers can afford less than 10 percent of listed homes drops to 12 from 56 by adding an additional income. However, two-income restaurant worker households still face acute affordability challenges in their home markets.”