Mortgage companies will often qualify mortage of up to 45-50% of your personal income, normally around 45% DTI (Debt to income). This can seem like a huge bonus to you however, just because they say you can have that much does that mean you should take that much?
How does the lender figure out what they will loan you anyway? Well, your income figure is your Gross amount (pre-tax and deductions) which will say is 60K annually. So, assuming you have no debt, the lender would approve you for 60K / 12 * 50% = 2,500 per month payment.
Personally, I would not want my DTI to pass 40%, preferably closer to 35%, because then you can still make contributions to a 401K, IRA, emergency fund, and still have enough to pay $200 extra towards the mortgage, making the mortgage go from a 30 to a 20 year.
Just because the lender will give you a loan does not mean you should become house poor and get the house. Always get a house for less than what you get pre-approved for.