Housing affordability calculators are typically based on converting a mortgage interest rate to a monthly amortization payment over 15 or 30 years (whatever the life of the mortgage is). This number is compared with monthly income and a rule of thumb is applied - say, one-third of income is too much to pay for a mortgage payment. That then converts to a maximum mortgage. The size of the mortgage added to the down payment equals the price of the house.
MORTGAGE LIMIT CALCULATOR (HOW LARGE A MONTHLY MORTGAGE PAYMENT DOES YOUR INCOME PERMIT?)