While I cannot give you an exact answer without knowing your existing disposable income, excluding things like your current rent (which will be no longer relevant if you buy a new house), there are some widely accepted guidelines that may be helpful to you. Most experts recommend a housing payment-to-income ratio of 28% and a total debt-to-income ratio of 36%. In other words, you should only spend 28% of your monthly income before taxes on housing and 36% of it on your total debt obligations. Using this rule of thumb, if you do not have any other debt (e.g. from credit cards and auto loans), then your housing costs can obviously increase up to 36% of your income.
If, for example, your annual income before taxes is $100,000, you can spend around $28,000 per year on housing, or $2,333 per month. Remember, housing costs don’t just refer to your monthly mortgage payment; they include things like property taxes, homeowner’s insurance, and homeowner’s association dues. Your best bet is therefore to check out the property taxes in your area as well as the average price of homeowner’s insurance/dues and subtract them from your monthly housing budget. Assuming that they combine to $333 per month, you can afford to pay $2,000 per month ($24k per year) toward your mortgage.
With both this number and the down payment you can afford to make in mind, you’ll be able to easily determine the mortgage and total price of a house you can afford. One additional constraint to take into consideration is savings. No one wants to live paycheck to paycheck, so you should strive to save at least 10% of your monthly after-tax income after all of your expenses are accounted for.
As to the issues that befell so many homeowners during the Great Recession, they were largely due to people overextending themselves beyond the above guidelines, betting that home prices would appreciate. As long as you stick to the 36% and 10% guidelines mentioned above, you shouldn’t have anything to worry about because this basically ensures home loan affordability.