States compete to attract new businesses, which can generate jobs and contribute to economic growth. While every state levies some form of taxes on businesses, some states are more tax-friendly than others. In addition to other factors, such as the strength of the labor force, a state’s tax code is an important consideration for businesses choosing where to operate.

Tax codes are complex, and the tax-friendliness of a state is determined by far more than just the corporate income tax rate. Each year, the Tax Foundation, a think tank advocating for a simpler tax code, measures over 100 variables within each state’s tax system to determine how tax-friendly each state is for business.

27. Massachusetts

> State sales tax rate: 6.3% (tied-13th highest)
> Property taxes collections per capita: $2,069 (8th highest)
> Unemployment rate: 3.4% (11th lowest)
> Top individual income tax rate: 5.1% (24th lowest)
> Top corporate income tax rate: 8.0% (tied-13th highest)

According to the report, Wyoming is the most tax-friendly state for business in the country, while New Jersey is the least. To highlight how tax climates vary between states, 24/7 Wall St. listed all 50 states based on the Tax Foundation’s 2017 ranking.

While states with the most business-friendly climates generally have lower tax rates, the Tax Foundation’s ranking also rewards simpler tax codes. States that do not levy one major form of taxation frequently rank among the most tax-friendly. For example, New Hampshire, Montana, and Oregon levy no sales tax, while Wyoming, Nevada, and South Dakota levy no corporate or individual income tax. All of these states rank within the 10 most tax-friendly states for business.

In contrast, states that are the least tax-friendly for business have high tax rates and complex structures. States levying a flat individual or corporate income tax, for example, are rated more favorably than states with complex, multi-tier systems. New Jersey, which has the worst-ranked tax environment for business of any state, has the highest property tax collections per capita and is one of only two states with both an inheritance tax and estate tax. The state also has complex individual and corporate income tax systems, and both are, according to the Tax Foundation, among the worst in the country.

Based on The Tax Foundation’s 2017 State Business Tax Climate Index, 24/7 Wall St. reviewed the states with the best and worst business tax environments. Property tax collections per capita are from this report and are as of July 2016. The highest tier in each state’s individual and corporate income tax structures as well as state sales tax rates were obtained from The Tax Foundation’s 2017 Facts and Figures report and are as of January 2017. Seasonally adjusted unemployment rates for February 2017 are from the Bureau of Labor Statistics.

Click here to see the most and least tax-friendly states for business.