The first rule of affordability is PITH should not be more than 32% of your gross monthly income. The second rule of affordability is that your entire monthly debt load should not exceed 40%. This includes your housing costs (PITH) plus all other debt payments (such as car loans or leases, credit card payments, lines of credit payments, etc.).
The maximum home price one can afford comes down to a number of factors.
The most important factor is your household monthly gross income along with your down payment. The hardest part about home ownership, for many, is saving for the necessary down payment.