When you’re out shopping for houses, it’s easy to get seduced by the beauty of the back yard, the scale of the master suite or the terrific kitchen appliances and end up applying for a mortgage you can’t really afford. You might be able to squeeze in on the basis of your income and your down payment, but then you end up with a down payment that consumes more of your net budget than you had thought, and so you end up with stress month in and month out, as you have to come up with the right amount of money to keep the bank happy while also providing for the rest of your (and your family’s) needs.

How Big of a Mortgage Are You Comfortable With

So how can you determine the right size mortgage? Take a look at your debt-to-income ratio and what it would be with your new mortgage. Use that to work back and find the right purchase price.

How does this ratio work? Take the cost of homeowner’s insurance (you can get estimates on this from your realtor or from a local insurance company), your prospective mortgage payment and any other expenses other than utilities. Then divide this amount by your gross monthly income.

For example, let’s say that you earn $8,000 each month. If you have a mortgage payment of $2,000 and an insurance premium of $300 per month, that would be $2,300 divided by $8,000 — or 28.75 percent. This would be just about the most you would want to finance.

How do you get from a purchase price to a mortgage payment? Visit one of the many available mortgage calculators online. Enter the purchase price, your down payment, the expected interest rate and the number of years that you want to amortize the mortgage. For example, if you are looking at a $450,000 house and you plan to put 20 percent ($90,000) down, that would leave a mortgage of $360,000. If you assume an interest rate of 3.92 percent and an amortization period of 25 years, that would leave you with a payment of $1,884 per month. That would be just about right for a salary of $8,000 per month. It gets you a little lower than that 28.75 percent in the prior example, and so if your credit score is good and you have a verifiable income history with a solid company, the bank should approve that.

However, your housing expenses aren’t always the whole picture of your finances. If you have a ton of credit card debt, three car loans and you’re paying child support, you don’t have as much money left in your budget as someone who has paid off his car and keeps his credit cards balance-free each month. Many traditional lenders also ask to take a look at your larger debt picture to see if the mortgage payment is going to be a realistic expectation each month. While the 28 percent value was the right metric when you were just looking at housing expenses, now that you are expanding that to include other debts, many lenders use a figure of 36 percent at this point. If you can take on the mortgage and still keep your debt-to-income ratio at or below 36 percent, you have an excellent chance of receiving approval. Some lenders will approve ratios at 40 percent or even higher, particularly now that lenders are casting about a bit for more income in the mortgage market.

However, a lot of people are in the range of 41 to 49 percent for their debt-to-income ratio, and this is an area that makes it almost certain that you will experience financial difficulties. When the ratio goes above 50 percent, you have entered a real danger zone. The more you can reduce your other debts before applying for your mortgage, the less stress you will have when you sign that mortgage.

While buying a house with a larger mortgage might get you the short-term satisfaction of a nicer neighborhood, or more premium fixtures in the master bath, the monthly stress of dealing with a mortgage that you can barely afford — or can’t afford — is not worth it. Foreclosure will ruin your credit score for the better part of a decade — and it will wreak havoc on your family life as well. Instead, use these ratios to find the right mortgage for your budget — and for your family.