Mortgage lenders calculate affordability based on your personal information, including income, debt expenses and size of down payment. Here are some of the factors that lenders consider:

Debt-to-income ratios

Lenders will calculate how much of your monthly income goes toward debt payments. This calculation is called a debt-to-income ratio.

The debt-to-income ratio is the percentage of monthly income that is spent on debt payments, including mortgages, student loans, auto loans, minimum credit card payments and child support.

For example: James and Amanda together earn $10,000 a month. Their total debt payments are $3,800 a month. Their debt-to-income ratio is 38 percent.

$3,800 / $10,000 = 0.38

Front-end ratio

A standard rule for lenders is that your monthly housing payment (principal, interest, taxes and insurance) should not take up more than 28 percent of your income before taxes. This debt-to-income ratio is called the "housing ratio" or "front-end ratio."

Back-end ratio

Lenders also calculate the "back-end ratio." It includes all debt commitments, including car loan, student loan and minimum credit card payments, together with your house payment. Lenders prefer a back-end ratio of 36 percent or less.

Ratios aren't carved in stone

Those recommended ratios (28 percent front-end and 36 percent back-end) aren't ironclad. In many cases, lenders approve applicants with higher debt-to-income ratios. Under the "qualified mortgage rule," federal regulations give legal protection to well-documented mortgages with back-end ratios (all debts, including house payments) up to 43 percent.

Credit history

If you have a good credit history, you are likely to get a lower interest rate, which means you could take on a bigger loan. The best rates tend to go to borrowers with credit scores of 740 or higher.

Down payment

With a larger down payment, you will likely need to take on a smaller loan and can afford to buy a higher-priced house.

A downpayment is money from your savings that you give to the home's seller. A mortgage pays the rest of the purchase price. It's usually expressed as a percentage: On a $100,000 home, a $13,000 down payment would be 13 percent.

You don't need to have a perfect credit score or a 20 percent down payment to qualify for a mortgage. Some lenders will accept down payments as small as 3 percent. Federal Housing Administration-insured mortgages have a minimum down payment of 3.5 percent.

You can generally get a conventional mortgage for as little as 5 percent down.

Lifestyle factors

While the lender's guidelines are a good place to start, consider how your lifestyle affects how much of a mortgage you can take on. For instance, if you send your children to a private school, that is a major expense that lenders don't typically account for. Or maybe you like to spend a lot on dining out or clothes. And if you live in a city with good public transportation, such as San Francisco or New York, and are able to rely on public transportation, you can likely afford to spend more on housing.