Consider how much it will actually cost you to live there. As a renter, you think it's just rent and utilities. The bank will take taxes and insurance into account. But keep these things in mind:
Depending on materials and weather and so forth, a house will typically need to be painted every five to ten years. That costs a few thousand dollars. Maybe you can do it yourself for a few nundred. I painted mine about two years ago. Budget about $25 per month for your painting fund.
The average life of a water heater is about 10 years. To buy a new one, get it put in, and take the old one away costs about $600-700, budget about five bucks per month for your water heater fund. I replaced mine about a year ago.
The average life of a furnace is about 15 years. A new one gas furnace installed costs about $6000. Budget $34 per month for your furnace fund. I'm just researching getting mine replaced.
A typical dishwasher lasts 10 years. Delivered, installed, and old one removed, expect to pay about $500 for a nice model. I did mine about three years ago. Budget about $4 per month for your dishwasher fund.
A typical refrigerator lasts about 12 years. Delivered, installed, and old one removed, expect to pay about $700 for a nice model. I did mine last year. Budget about $5 per month for your refrigerator fund.
A typical asphault shingle roof lasts about 20 years. Replacement is about $10,000. Budget about $35 per month for your roof fund.
Interior carpet depends a lot on your usage, but let's say 12 years. Replacement can be $4,000. Budget about $28 per month for your carpet fund.
No one of these things is really that bad, but add them up and you need to budget $150-200 per month set aside in a "major maintenance" fund.
Especially if you buy a new house or a house where someone has done some of these things to spruce it up for sale, you may not see these sorts of expenses for the first few years. You can get lulled into a false sense of "not my house" and start skipping those deposits or be tempted to "borrow" a bit out of that fund. Trust me, these expenses are coming and you need to be prepared for them.
My house is 14 years old. It's a good house, well-built, modern. But, it still seems to need some minor thing, some $20-50 repair, every month. I almost made it through October without a Home Depot run... almost. Yesterday, $17.95 for a toilet fill valve assembly since the one in the master bathroom started leaking. That's not a big deal, but it's just one example of little things that crop up. When you sign your mortgage, you may see "Press Hard, you are making two copies." Lift the first up and you'll see that the second is your Home Depot credit card application... they know, you'll need it.
Regarding mortgages: there is no such thing as a thirty year mortgage. "Wait a minute," you may object, "I have the brochure right here and it says 30-year." No. There is a plan sold as a "thirty year mortgage" underwhich you rent the property for fifteen years and then start making payments on a 15 year mortgage. Look at the amortization table for a 30-year mortgage, Look at the 180th payment. And you will see that you will have paid off 5-8% of the principle. 15 years of making those monthly payments and you will have paid off just 5-8%... but during those 15 years, you paid all the tax, all the insurance, and did all of those repairs and maintenance things I mentioned. With real estate appreciation averaging about 3%/year in most places long-term, your extra costs in taxes, insurance, and maintenance and repairs will have errased your apprecation. 15 years into a 30-year mortgage, you will be financially, overall, no better off than you would have been had you rented for 15 years and let the landlord pay the taxes, insure the strucure, and do all of that maintenance and repair stuff; you will have, as Mr. Alberta Ed so nicely put it, traded your landlord for the bank. So, do not consider the so-called 30-year mortgage; you now know it for what it is, a plan underwhich you rent the house from the bank for 15 years and then start paying on a 15-year mortgage.
Buy only what you can realistically afford on a 15-year mortgage setting aside $150-200 per month for your major maintenance fund. And YOU do this math and make this determination, not the bank.