How much house can you afford? Knowing you want to buy a home is one thing; knowing how much of a mortgage payment you can handle is quite another. Too often, dreams and reality collide: You’re yearning for a four-bedroom Colonial, but given your income and debt owed to credit cards and beyond, the best monthly loan payment you can manage is for a two-bedroom bungalow in a sketchy party of town. So how do you pinpoint a house where the monthly mortgage payment is financially within your reach, and one that won’t drive you deep into debt? Allow us to help you paint your payment profile picture and find that magic number.

Why your mortgage payment depends on your income

Getting a ballpark estimate of how much house you can afford starts with looking at your income, or how much money you’re pulling in.

“The general rule of thumb is that you can purchase a home that costs two or three times your annual income,” says Harrine Freeman, a financial expert and the owner of H.E. Freeman Enterprises.

So if you’re earning $80,000 per year (and you have a reasonable amount of job security and don’t expect wild fluctuations in your income anytime soon), you can afford a house up to three times that, or $240,000.

That said, income isn’t everything, and this is just a ballpark figure to get you started.

“Tripling your income is only an estimate and does not account for your monthly bills,” says Freeman. So let’s dive into more specifics on what makes your payment pass muster.

Why your mortgage payment depends on your income and debt

Your income is only half the picture of what determines the monthly mortgage payment you can afford. The other half is your debt—meaning the debt you owe to credit cards, college loans, and other credit sources. Even if your income is high, having high credit debt means you have less money to put toward a monthly mortgage.

One way to factor your income and credit debt into how much mortgage you can afford is to follow the 28/36 rule, a simple but effective ratio for mortgage affordability.

The “28″ refers to your monthly housing payment—things such as mortgage, home insurance, and property taxes—which shouldn’t be more than 28% of your gross monthly income (ideally this payment should be less). This payment is easy to calculate, because all you need to do is multiply. For example, if your gross (meaning before taxes are taken out) monthly income is $6,000, you would multiply that by 28% (or 0.28), which equals $1,680—this is the maximum amount of your monthly housing payment.

The “36″ refers to your debt-to-income ratio. This ratio compares your debt, or how much money you owe (to credit cards, colleges, car loans, and—hopefully soon—a home loan) to your income. This ratio should be “no more than 36%,” says Freeman; ideally, this ratio should be much lower.

Think about this ratio in terms of your monthly expenses: If you have a monthly income of $6,000 but also spend $500 paying off credit cards or other debt, you would divide $500 by $6,000 to get a debt-to-income ratio of 8.3%. This ratio is great, but adding $1,680 in monthly mortgage payments would push up your debt load to $2,180 and your debt-to-income ratio to 36%. This ratio is exactly the maximum experts say you can afford. Going past this threshold is a risky move. Ignore this ratio, and you could end up with a house that, over time, could drive you even deeper into debt.

How a down payment fits into the picture

Last but not least, the amount you have for a down payment matters, too. Ideally, to get the best mortgage rates and terms, you’ll want a down payment amounting to 20% of the price of the house. But if you don’t have that much, rest assured you can put down less. FHA loans, for instance, need a down payment of only 3.5%.

Once you know both the down payment you plan to contribute as well as your monthly income and debt, you can easily work out the maximum monthly mortgage payment you can afford—and by extension, the priciest house you should buy.

If you earn $6,000 monthly, pay $500 monthly in debts (pre-house), and can make a down payment of $40,000, if you get a 30-year fixed mortgage at 4% interest you can afford a house worth $277,800. Plug in your own numbers and see what happens!

How mortgage pre-approval can estimate your mortgage payment

Another easy way to get a sense of how much you can comfortably pay in monthly mortgage payments is to approach a mortgage lender and apply for mortgage pre-approval. That’s where the lender will take a look at your income, debt, credit score, credit report, and other factors of your financial past to determine how much money it’s willing to loan you to buy a home.

Note: If you’re not sure what your credit score is or why it matters, here’s a quick crash course: A credit score is your track record paying off past debt you’ve had on credit cards or college loans. The better your credit score, the better your odds of landing a great mortgage. (You can check your credit score for free at CreditKarma.com.) If your payment to debt sources has had some rough patches via late or missing payments, this could stand against you. The good news? If you take care of past debt and make your monthly payments on time, you can improve your credit score over time.

Mortgage pre-approval doesn’t just tell you exactly how big your monthly mortgage payment can be. As a bonus, pre-approval also makes you a more attractive buyer to home sellers, since they know you have financing to back up your offer.

Beyond your monthly mortgage payment: What else do you have to pay?

In addition to your down payment and monthly mortgage payments, you’ll want to budget for some other costs. The big one is closing costs, which are fees related to processing your loan that can range from 2% to 7% of your home’s price. Closing costs aren’t paid monthly; rather they are due at closing, when you get your keys. So make sure to set aside enough money to cover this sizable expense!

The other big ongoing expense to factor into your monthly budget is property taxes. Property taxes are often folded into the monthly payments you’ll find in a mortgage calculator, but they’re worth examining as a distinct factor since they vary greatly by area. So, you’ll want to check property taxes carefully. You can typically find the exact amount (or an estimate) of the property taxes you’ll pay on real estate listings, or by entering your address into an online home value estimator.

One final housing expense to keep in mind is homeowners insurance. This is also factored into payment estimates made by realtor.com’s mortgage calculator. One ballpark payment to keep in mind is that the average annual premium costs just shy of $1,000. This payment will vary by area and home, too. You can often break up this payment into small monthly installments so you won’t feel the pinch quite so much.

Add it all together = How much house you can afford

Once you’ve determined how much you can afford as a monthly mortgage payment, you can confidently embark on your house hunt!

Having a certain mortgage payment ceiling in mind, based on concrete numbers like your monthly income and debt, means you won’t end up busting your budget. You can choose a house that fits comfortably in your payment profile, so you know you can handle the monthly bills with ease.

If you find your monthly income and mortgage budget aren’t enough to snag the type of home you want, you’ll have to start weighing what you absolutely must have in your home—and what you’re willing to sacrifice if necessary.

Use the “pick 2″ rule: payment, quality, location. Typically you can prioritize two of those categories, but not all three. Your best bet is to stick to an amazing neighborhood for an amazingly low monthly loan payment, and know that your home might not have that pool, wine cellar, or other amenities you’d hoped for.

These trade-offs are just the reality of scrounging together enough of a payment to manage a mortgage and a house without getting sucked deep into debt—so don’t be disheartened.

If your monthly payments are falling short of your dream house, try widening your search to different neighborhoods or knocking a few items off your must-have list until you find the location and amenities that best fit your budget. Weigh what really matters for your dream home, then start performing preliminary searches online using sites such as realtor.com. And try to stay optimistic!

With enough searching and some luck, you can find a dream house that not only has all the features you want, but also meets your payment profile—from your income to debt to credit score and more.

Information sourced from realtor.com