There's a new way to figure out whether it's better for you to rent or buy a place to live.

The brainiacs at have a math formula and interactive map of the United States that is like an infographic that shows what they're calling the breakeven horizon.

As Zillow puts it, "The breakeven horizon is the number of years you will need to own and live in a home until it becomes more financially advantageous than renting the same home."

Among some of the more extreme examples, Phoenix has a breakeven horizon of one year while New York City takes nearly 30 years to break even!

Check it out if you're moving to a new city for work and are wrestling with the rent vs. buy question.