Don't forget to factor in maintenance and repair costs, taxes, water, garbage, electricity. It's a lot easier to pay for a new roof, furnace, new flooring, etc if you've been putting the money aside from when you move in.
I agree with ggreg, if you may have to up and move in 5 years for a new job it may not be worth the investment if you are only looking at the financial side of it. But owning a home gives one a sense of "belonging" so for someone who is settled in an area and can afford it I highly recommend it. And if you are handy, a fixer-upper just might make it affordable.