If you want to save money on rent, you may want to buy a house.

Purchasing a home is far cheaper than renting in 12 U.S. cities, according to Business Insider's analysis of a recent report by HotPads, a real estate search engine. Business Insider ranked the 12 cities with the lowest rent-buy ratio for two-bedroom homes out of 45 major U.S. metropolises.

And you may not have to move to a new town to get a good deal. Buying a house is cheaper than renting in 98 of the largest 100 metropolitan areas, according to a recent analysis by Trulia, a real estate website. Nationwide, renting cost 15 percent more than home ownership at the end of last year, according to an analysis by Deutsche Bank cited by the Wall Street Journal.

Of course, getting a mortgage requires a good credit score, as well as enough money for a possibly hefty down payment. Even with home prices continuing to fall, buying a house still is just as expensive as it was in 2007 because banks now are requiring larger down payments, according to a recent study by Andrew Davidson and Alexander Levin of Andrew Davidson & Co., a financial research firm.

These are the 12 cities where it is much cheaper to buy a house instead of renting, according to Business Insider, ranked from cheapest to less cheap:

  1. Detroit, Mich.
  2. Orlando, Fla.
  3. St. Petersburg, Fla.
  4. Pittsburgh, Pa.
  5. Jacksonville, Fla.
  6. Tampa, Fla.
  7. San Antonio, Texas
  8. Riverside, Calif.
  9. Las Vegas, Nev.
  10. Houston, Texas
  11. Sacramento, Calif.
  12. Phoenix, Ariz.

Related on HuffPost: