Depending upon how hot your local real estate market is, it normally takes at least 3 years for a home owner to recoup their transaction costs. Meaning you don’t make any money unless you own it for at least 3 year (closing fees, commissions, etc.). In a hot market you can do it 6 months, but you run the risk of a crash. When comparing cash flows from owning vs. buying, use common sense. How much are you spending on rent? Can you get a home for how much you’re paying in rent? If so, look at what you gain in principle payment and potential capital gains from price appreciation. Here is a great website that walks you through the entire process…
http://www.bankrate.com/calculators/mortgages/rent-or-buy-home.aspx