Updated

Long before you start asking yourself what type of house you want -- condo or house? Craftsman or Ranch style? -- you should ask yourself a more pragmatic question: How much home can I afford?

After all, it's no secret that your dream home can quickly turn into a living nightmare if you're struggling to make your monthly house payments. And while lenders these days are less likely than ever to loan you more than you can easily manage, you should take charge of coming up with an affordable figure for your own sake. Don't rely on others to do this critical step for you. Plus, it's helpful to know how much you can afford just so you're shopping within your price range -- because nothing's more of a downer than finding your dream home, only to discover after the fact that it's out of reach.

All of this means it's good to determine from the get-go what price you can pay for a home. We're on the case! Here's how to find that magic number for you.

What is debt-to-income ratio?

One of the most basic equations you can use to figure out home affordability is your debt-to-income ratio. This is essentially a way for you (and lenders) to compare how much money you make with how much you owe -- and how a house can fit into that picture.

As a general rule, your debt-to-income ratio should remain below 36%, says David Feldberg, broker/owner of Coastal Real Estate Group in Newport Beach, CA.

Here's how to figure it out: Calculate how much you're paying in debt per month -- that's things like car payments and college loans. Then divide that amount by your monthly income. Let's say, for instance, that every month you're paying $500 to debts and pulling in $6,000. Divide $500 by $6,000 and you've got a debt-to-income ratio of 0.083 or 8.3%. That's well below 36%, but then again, you don't own a home yet.

Once you know your income and debt, you can plug those numbers into a home affordability calculator to see how much you can shell out for a new house while still remaining below that 36% debt-to-income threshold. Let's take the aforementioned example where you make $6,000 a month and pay $500 in debts. Now let's assume you've got around $30,000 for a down payment and can get a 30-year fixed-rate mortgage at a 5% interest rate. So this will put you in the ballpark of affording a home worth $248,800.

So what does this amount to, month to month? To know that, you'll want to factor in more than just your mortgage. There are other expenses, including property taxes and home insurance. Add those in, and you'll be paying about $1,573 for the privilege of owning this house.

How to calculate how much home you can afford

Of course, these numbers will change with your circumstances. Let's say you got a raise and now make $8,000 per month. Take those same numbers above (a down payment of $30,000 on a 30-year fixed-rate mortgage at 5%) and you'd be able to afford a home worth $274,600, with a monthly housing payment of $2,073. Or let's say you make $8,000 per month and are able to whittle your debt in half, down to $250 per month. That would mean you can afford a home worth $313,100, with monthly payments of $2,201 per month.

As you can see, when you're trying to figure out how much home you can afford, the details matter, so be sure to take all of them into account. In other words, don't look at just your salary, or just how much your mortgage payments will be. The clearer the picture you have of your financial commitments, the easier it will be to figure out how much home you can afford without getting in over your head.