Quick answer
Mortgage Affordability Calculator: what it calculates
Mortgage Affordability Calculator calculates affordable home price from annual income, monthly debts and down payment. The core method is Max housing payment = lower of income x housing limit or income x total debt limit minus debts.