It is cheaper to buy a two-bedroom home than rent one in 72% of major metropolitan areas around the U.S., according to the Trulia rent vs. buy index released Monday. The real estate data firm said increased demand for rental properties is driving the cost of homeownership down nationwide. “Since the start of the Great Recession, many former homeowners have flooded the rental market,” said Pete Flint, chief executive and co-founder of Trulia. “Following the principles of supply and demand, renting has become relatively more expensive than buying in most markets.” Trulia compared the median list price of a two-bedroom home with the median price paid for rent in 50 cities. The company then assigned a price-to-rent ratio to each city, with any number below 15 signifying a homebuyer’s market and any number above 21 signifying a renter’s market. Any market between those two numbers has more balanced rent versus buy costs. The cost of homeownership includes mortgage principal and interest, closing costs, property taxes, hazard insurance and homeowner association dues. It excludes all maintenance, bills, and security costs. The cost of renting a unit includes rent and insurance. Among the most affordable housing markets are Miami and Las Vegas, both of which have a price-to-rent ratio of 6 and where foreclosure rates have been the highest in recent years. Miami posted the highest number of foreclosures in the third quarter, according to RealtyTrac. Filings were up 9% from 2009 to about 58,600. RealtyTrac reported that Las Vegas had the highest rate of foreclosure in the third quarter, when one in every 25 housing units received a foreclosure filing. Trulia reported that it is cheaper to buy than rent in several Texas cities, including Arlington, San Antonio and El Paso. The foreclosure rate in Texas dropped to 1.82% in the third quarter from 1.95%, according to the Texas Mortgage Bankers Association. During the third quarter, the national average home foreclosure rate was 4.39%. The Trulia rent vs. buy index found that it is cheaper to rent than buy in only 8% of markets, including New York, Seattle, Kansas City, Mo.; and San Francisco. The price-to-rent ratios in these cities were 31, 24, 21, and 21, respectively. In the remaining cities tracked by Trulia, the study found that buying may be a financially sound long-term option despite the affordability of renting in those markets. “Oakland and Los Angeles, which are experiencing similar rates of unemployment or foreclosure filings as Phoenix, Miami and Sacramento, are still more affordable to renters,” the report said. “Moreover, close proximity to economic centers with promising job growth projections has propped up both the demand for homes and costs of home homeownership in Oakland and Los Angeles.” For a complete list of housing markets in the order they rank in homebuyer affordability compared to renter affordability, click here. Trulia is a San Francisco-based real estate data network with a searchable database of listed homes. The firm recently acquired Movity, a real estate data firm that specializes in geographical reporting. Write to Christine Ricciardi. Follow her on Twitter @HWnewbieCR.