Buying versus renting is a tough dilemma for a lot of people. This predicament doesn’t only face young people just starting out, but it also puzzles professionals relocating for a job and empty nesters who want to sell the big family home and get something smaller.

According to the real estate website Trulia, new research shows that homeownership is less expensive than renting in all of the country’s 100 largest metropolitan areas. Their data shows that the average cost of homeownership, including insurance, taxes, mortgage and maintenance is 38 percent less than the cost of renting.

Rent prices are rising, especially in areas where renters are already stretching their paycheck to afford their rent. In the five least affordable markets, rent has risen 7.8 percent higher than 2013. Rent is increasing because of strong demand that supply hasn’t kept up with. Almost all new households are renters including young people moving out of their parents’ homes. This will keep the rental demand high.

It is generally suggested to pay no more than about 30 percent of your income on housing (rent or mortgage interest, principal, taxes, insurance). Renters in cities such as San Francisco, San Diego, Boston, Baltimore, Washington, D.C., and even Chicago are paying more than that for a two bedroom rental. So why don’t more renters buy?

Here are a few questions you should consider:

How long do you expect to stay? The longer you plan to live in one place, the better off you are buying. It’s best to buy if you plan to stay there at least five years.

Are you buying for investment? People like to think of their homes as a store for wealth – something they can liquidate in retirement and downsize.

Are your life and job secure? If your job is not very stable due to a declining industry, you may want to find a new job before you buy. Buying a house and selling it a year later to relocate is likely to cost you some money.

Have you calculated all the costs? Do some realistic math. Make sure you consider all the monthly costs of owning, including principal interest, insurance, maintenance, property taxes, homeowner or condo fees and other regular costs. Utilities may also cost more when you buy.

Can you afford a down payment? It’s possible to buy a house with as little as 3.5 percent down payment with a Federal Housing Administration mortgage. FHA loans require upfront and monthly mortgage insurance premiums, and build equity slower.

Do you have money for repairs and maintenance? All homes, including new homes, sometimes need repairs. Water heaters break, pipes leak, air conditioners stop working and bad weather happens. You will no longer have a maintenance guy to call to fix all your problems.