Last week, an infographic from the Tax Foundation went viral showing the relative value of $100 in each state. As I wrote then: "The above data doesn't tell the full story. ... A large portion of the differences in price parity is based on the cost of rent or the comparable mortgage payments."

I calculated the relative value of housing dollars using data on regional price parities from the Bureau of Economic Analysis. The $100 level is based on the national average; each state's data is then relative to that level. When you include everything, the relative value of $100 in each state varied from $84.60 to $114.74.

Now, I've created my own infographic to show the relative value of housing dollars in each state compared with the national average. Read on to learn more.

By state, in terms of housing, your dollars go the furthest in Mississippi, where the relative value of $100 is $161.03. Your dollars get you the least in Hawaii, with a relative value of $62.89. That means the same amount of money for housing is worth 150% more in Mississippi than in Hawaii. Even in less extreme cases, the differences can be high.

Take Massachusetts and Rhode Island, for example. The relative value of housing in Massachusetts is $82.37. But in neighboring Rhode Island, your housing dollars are worth $98.43 compared with the national average. In other words, housing-related money is worth 20% more in Rhode Island than in Massachusetts.

There are some good reasons for the disparity. Housing prices are generally higher in areas where more people want to live. That's why coastal states usually have higher prices than inland states. Second, housing prices are generally higher in areas with higher average incomes. New York City and Silicon Valley have some of the highest housing prices in the U.S., as that's where many of the highest-paying jobs in the U.S. are.

Another big reason for the vast disparities in housing prices is that the areas with the most demand and highest prices typically have some sort of supply constraints on housing that keep prices high. In general, coastal areas are known for having strict zoning requirements that make it more expensive or impossible for developers to build there. For example, Manhattan has limited housing supply, given that it's an island and has rent control, which lowers the incentive for developers to upgrade old buildings. Washington, D.C. has limited housing supply because of the strict height restriction on buildings in the city, while San Francisco has limited housing supply for a multitude of reasons, including height restrictions, rent control, and many other factors.

The effect

Compared with the Northeast, most states have lower costs of living. The disparities in the cost of housing are one of the main reasons there has been a migration from high-cost states such as New York and California to the South, where your dollars go much further. Combine that with better weather and low to no income taxes, and you can see why many retirees decide to move south.

Bottom line

The cost of living by state is important to consider when you're thinking of moving to a new state. The grass isn't always greener on the other side of the state line. While a salary in a different state may be higher than your current salary, the cost of living can translate to dramatic differences in how far that salary goes, as well as your overall well-being.

No matter what state you live in, there is only one road to achieving financial freedom: saving and investing wisely. For over 20 years, The Motley Fool has focused on showing investors the way to financial freedom.