To determine 'affordability' you will first need to know your taxable income along with the amount of any debt outstanding and the monthly payments. Assuming it is your principal residence you are purchasing, calculate 32% of your income for use toward a mortgage payment, property taxes and heating costs. If applicable, half of the estimated monthly condominium maintenance fees will also be included in this calculation.
Second, calculate 40% of your taxable income and deduct all of your monthly debt payments, including car loans, credit cards, lines of credit payments. The lesser of the first or second calculation will be used to help determine how much of your income may be used towards housing related payments, including your mortgage payment. These calculations are based on lenders' usual guidelines.
In addition to considering what the ratios say you can afford, make sure you calculate how much you think you can afford. If the payment amount you are comfortable with is less than 32% of your income you may want to settle for the lower amount rather than stretch yourself financially. Make sure you don't leave yourself house poor. Structure your payments so that you can still afford simple luxuries.