I just wanted to weigh in and say how huge this is, not just for the question of "is buying a better deal than renting," but also to allow you flexibility in terms of job relocation and family changes.
My girlfriend and I moved to the Bay Area about 18 months after buying our first house, and were able to do so in part because the rent from our tenants (who are good friends, as well) basically covers our mortgage. Not having to feel tied down to a particular city allowed me to take a risk on an exciting new job that I probably would have passed up if relocation had involved selling our house.
What's your down payment? Unless it is trivial (3 months rent or something like that), there's also the cost of making your down payment illiquid.
Sounds like it is still a good decision, but don't forget that cost as well.
The house was 3x our annual income (well, 2.5).
We can probably rent it for our mortgage. (This for me is the most important thing -- basically we bought the rental we would have lived in).
My job is moderately safe.
We don't expect to sell for 5 years (which is the conventional wisdom unless you are a professional and know what you are doing).
I hated our last four landlords.
We have to live somewhere.
No kids, so no worries about kid like things except in terms of n-hood value.