The calculator searches for the highest price that satisfies two separate constraints, then takes the lower of the two:
- Payment: your all-in monthly housing cost — principal, interest, annual property tax, annual homeowners insurance, PMI and monthly hoa dues — stays within 28% of gross income on its own, and within 36% once your other debt payments are added.
- Cash: your down payment plus closing costs stays within the cash you said you have.
1. The monthly payment on the loan
M = L x r / (1 - (1 + r)^-n)
L = loan amount r = annual rate / 12
n = years x 12 M = monthly principal + interest
2. The all-in monthly housing cost
Housing = M
+ (property tax rate x price) / 12
+ annual insurance / 12
+ mortgage insurance (only while LTV > 80%)
+ HOA dues3. What your income allows (back-end DTI)
max housing = (gross annual income / 12) x DTI% - other monthly debts
This is a back-end ratio: it counts your existing debt payments and the new housing payment together. It is a ceiling, not a target. If cash runs out first, your actual payment lands below this and the DTI setting never binds.
4. What your cash allows
Down payment and closing costs are different things. The down payment is equity you put into the home; closing costs are fees charged on the loan. Both are due on the same day, which is why they are added together as cash to close:
down = dp% x price
loan = price - down = price x (1 - dp%)
closing = cc% x loan = price x cc% x (1 - dp%)
cash to close = price x [ dp% + cc% x (1 - dp%) ]
so max price = cash available / [ dp% + cc% x (1 - dp%) ]
At 20% down and 2.5% closing costs that bracket is 0.20 + 0.025 x 0.80 = 0.2200, so $90,000 buys at most $409,091.
5. Putting them together
Because property tax, mortgage insurance and closing costs all scale with the price, the constraint is circular — there is no single formula to rearrange. The tool solves it by searching prices until it finds the ceiling. See debt-to-income and PITI for what goes into each figure.