To buy or not to buy. ... It sounds rather Shakespearean, doesn't it? And while some might rather read Shakespeare than make that decision, the answer these days is pretty straightforward. The rent versus buy debate seems to oscillate more than Hamlet himself, but right now buying is definitely the way to go.

Don't worry -- we've done copious amounts of research to come to that conclusion.

There are a few exceptions in select metro cities (and you can't ignore the down payment and type of mortgage you're considering), but homeownership remains cheaper than renting nationally in all of the 100 largest metro areas. In fact, buying is 38% cheaper than renting (up from 35% last year) when you consider a 30-year mortgage and the traditional 20% down payment.

There are two main reasons for this: 30-year mortgage rates are lower than they were last year (falling from 4.8% to 4.3%), and rents are rising faster than housing prices year over year (excluding foreclosures). Together, these trends make buying even more affordable versus. renting than it was last year.

Trulia Chief Economist Jed Kolko's method for calculating and comparing the total costs of buying versus renting is pretty comprehensive. He assumed that prospective buyers will:

  1. Get a 30-year fixed rate mortgage at a 4.3% interest rate
  2. Make a 20% down payment
  3. Itemize their federal tax deductions and be in the 25% income tax bracket
  4. Stay in their home for seven years

So if you're putting less money down, paying all cash or getting a 15-year mortgage, your situation or your area of the country might change the results. Our interactive Rent vs. Buy map shows you how the math changes if any of the above factors change.

Your region matters
Some areas are clear "Buy now!" winners, but others are not as straightforward, so it definitely depends on what section of the country you're in.

In a nutshell: It's a much closer call on the coasts (most notably New York and California), and in Honolulu. Different areas affect typical home prices and rents, property taxes, and home-price appreciation. So buying versus renting percentages range from 17% cheaper in Honolulu to 63% cheaper in Detroit.

But even if you're in a close-call market, the good news is that buying probably won't become more expensive than renting anytime soon; low interest rates will keep that from happening. (They'd have to rise above 6% to negatively affect Honolulu and 7% for Orange County, Calif., and a 30-year fixed rate mortgage hasn't been at 6.1% since 2008.) In areas where rent prices are at an all-time high (such as San Francisco and San Jose), the gap favoring buying over renting has increased from 10% to 25% since last year at this time.

Your mortgage type matters
If you can't swing 20% down, or if you can secure a 15-year fixed rate loan, the game changes, as does your equity. So we looked at how different options might play out, depending on your mortgage type. The gap is widest for the 15-year loan, where it's 43% cheaper to buy. The margin gets slimmer for the 3.5% FHA loan, but buying is still 25% cheaper. In all scenarios, buying beats renting.

Mortgage Type Graphic

Your life stage matters
So we've pointed out that in all scenarios, buying beats renting. But it's also important to think about how you would be investing this money if you weren't using it to buy a home -- otherwise known as "opportunity cost." The 15-year loan tops the list because equity builds up faster and more of the mortgage payment goes to principal than interest. Paying all cash comes in third because you lose the tax benefit of deducting mortgage interest, and you need to factor in what you could have earned if you didn't tie up your money in a lump sum payment. And if you're using a 3.5% FHA loan, think twice about buying in Honolulu, San Francisco, New York, or Los Angeles, where it only beats out renting by a mere 10% or less.

If you're just leaving the nest, it could actually be much more expensive to buy than to rent. If you're a 20-something with little savings, relying on a 3.5% FHA loan, not in the 25% tax bracket (that makes itemizing worthwhile), and only stay in your home for five years, buying ends up costing more than renting in 27 of the 100 largest metros -- even in otherwise seemingly good markets like PhoenixLas Vegas, and Colorado Springs.

And if you're thinking about buying in a hot spot on the coast, forget about it. In this scenario, you'll be out 30% more in Orange County if you buy than if you rent.

Bottom line: Falling mortgage rates and rising rent prices put buying on top of renting nationwide as compared to last year for most financial scenarios.

But if you live in a market that's a close call, don't plan to stay for at least seven years, don't itemize your taxes, or if you need an FHA loan to make it happen, buying might not be the clear-cut winner. No matter what path you take, it's worth spending some time to find out whether renting or buying is best for you.

Note: the detailed methodology and assumptions behind our Rent Versus Buy model are here. Additionally, for our comparison of financing options, we used mortgage rates from the Mortgage Bankers Association, along with our own mortgage-rate estimate for the 10% down scenario.

We used an annual private mortgage insurance premium rate of 0.71% (1.31% for larger loans) for the 10% down payment scenario based on the MGIC rate table. We assumed mortgage insurance premiums -- unlike mortgage interest and property taxes -- are not tax deductible, in line with current law, though that might change.

In the FHA scenario, we used a 1.35% annual mortgage insurance premium and amortized the 1.75% upfront mortgage insurance premium. In a handful of markets many homes are above the local FHA loan limit. Nevertheless, we included all metros in the FHA scenarios.

This article originally appeared on Trulia.

Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.