While every decision about whether to rent or buy a home is an individual lifestyle and financial choice, you can also weigh local market rents and home prices to analyze which is more affordable.

Realtor.com’s July Rental Report compared starter home prices in 50 of the largest metro areas with median rents to evaluate where buying costs less.

Overall, the study found that the median rental price rose 9.8 percent in July 2021 compared to July 2020 and was 15.5 percent higher than the monthly starter home payments in 24 of those 50 housing markets. Rents also rose 12.2 percent in July above rents in July 2019. Realtor.com found that the median rents reached record highs in 40 of the 50 markets.

To make the comparison, median rents include studio, one- and two-bedroom units in apartments and private rentals of condos, townhouses and single-family homes. The monthly cost of buying was calculated by averaging the median listing prices for studios and one- and two-bedroom homes. Typical monthly homeowner association fees were included.

The top 10 markets that favor buying over renting in July were typically places that saw a sharp increase in rents and include:

1. Birmingham, Ala. (33.1 percent cheaper to buy)

2. St. Louis (29.4 percent)

3. Pittsburgh (27.7 percent)

4. Orlando (25.9 percent)

5. Cleveland (25.7 percent)

6. Tampa (22.9 percent)

7. Baltimore (20.5 percent)

8. Indianapolis (20.4 percent)

9. Virginia Beach (19.2 percent)

10. Riverside, Calif. (18.5 percent)

The top 10 markets that favor renting over buying were typically tech hubs and cities that are among the most expensive housing markets in the country and include:

1. Austin (79.2 percent cheaper to rent)

2. San Jose (47.5 percent)

3. San Francisco (44.4 percent)

4. Seattle (44.2 percent)

5. Boston (40.9 percent)

6. Los Angeles (39.4 percent)

7. New York (32.0 percent)

8. Dallas (26.9 percent)

9. Rochester, N.Y. (26.5 percent)

10. Portland, Ore. (26.4 percent)

In Washington, D.C., the cost difference between buying and renting is 4.3 percent, which favors renting.

For the full report, click here.

Read more in Real Estate: