The New York Times has put together a great calculator for comparing the economics of buying versus selling a home. Don’t miss the advanced settings in the upper right.  They will allow you to change all kinds of assumptions from transaction costs, to maintenance costs and others.