In order to calculate the true cost of renting vs. buying, Trulia includes all assumed renting costs, including one-time costs (like security deposits), and compares them to the monthly costs of owning a home (insurance, mortgage payments, taxes, and maintenance) including one-time costs (down payments, closing costs, sale proceeds). They also assume that households stay in their home for seven years, put down a 20% down payment, and take out a 30-year fixed rate mortgage. The full methodology is included with the study results here.