For 83 straight months, nearly seven years, the U.S. private sector has added jobs. Unemployment has steadily declined and remains close to a 10-year low. And with investors confident about the economy, the Dow Jones Industrial Average broke through the 20,000 mark early this year. By these and other key measures, business in the United States appears to be booming.

This period of economic growth — much of it as a recovery from the Great Recession — has by no means been even across the country. While employment in North Dakota and Texas grew by 21% and 15% over the past decade, a handful of states, including Mississippi and New Mexico, lost jobs. GDP growth across states has also been uneven.

7. Texas

> 1-yr. real GDP change: 4.8% (2nd highest)
> Avg. salary: $53,769 (12th highest)
> Adults w/ bachelor’s degree: 28.4% (23rd lowest)
> Patents issued: 9,934 (2nd highest)
> Working-age population chg. 2010-2020: +16.1% (4th highest)

Texas is home to several of the nation’s largest metropolitan economies. While depressed oil prices have of late dealt much of the Texas economy a blow, the major metro economies of Dallas, Austin, and other areas have remained strong, providing companies throughout the state a solid climate to do business. The GDP of Texas grew at an average rate of 4.8% each year between 2010 and 2015, the second fastest growth rate behind North Dakota. Texas had 630 building permits issued per 100,000 residents in 2015, also second only to North Dakota, and another indication of economic confidence among businesses operating in the state.

A number of factors can explain the regional differences in economic growth, including the varying business climates across states. While many factors affect the success of a region’s businesses, socioeconomic conditions, differences in geography, and regional regulations contribute to an overall business environment. Depending on these conditions, running a successful business in one state can be much easier than in another. To determine which states have the best and worst business climates, 24/7 Wall St. identified and reviewed nearly 50 measures of doing business. These were divided into eight major categories: economic conditions, business costs, state infrastructure, the availability and skill level of the workforce, quality of life, regulations, technology and innovation, and cost of living.

Click here to see the best and worst states for business.

A number of region-specific policies, costs, and regulations affect a state’s business climate, including liability and oversight laws, utility costs, insurance requirements, and tax policy.

For many businesses, the most important consideration for choosing one place over another is human capital. Corporations will often choose to locate in major metropolitan area, where costs are higher but where the workforce tends to be more skilled. States that have high shares of adults with bachelor’s and advanced degrees, and states that show growth among the working-age population present a greater diversity of potential hires for corporations.

For many corporations, the potential livability of an area is just as important as the talent pool to be found there. Workers might be more willing to relocate to or stay in a city or state with a lower cost of living, with easier access to airports, less congestion, and more cultural and recreational opportunities. We considered all of these measures in our index.

Another reason businesses choose to locate to a given city or state is to be near other related operations and close to innovation and growth opportunities created and shared by related industries. Such interaction and focus on new technologies can be found in California’s Silicon Valley and North Carolina’s Research Triangle.

Many of the best states for business foster a healthy entrepreneurial atmosphere, with high volumes of venture capital deals and patents issued. Many of these states have a high share of jobs in STEM fields — science, technology, engineering, and math — allowing them to better facilitate technologically advanced business activity. The high presence of STEM jobs, patents, and venture capital indicate the potential for growth and innovation that can allow local businesses to adapt and thrive.

It is important to note that while this index is an attempt to measure the best states for businesses, this list should by no means be treated as the best states for workers. In states with more lax regulations on businesses, workers are more likely exposed to risks and have fewer rights. In our index, we favored states where wages tend to be lower compared to the average compensation across the country, but lower wages are of course a significant negative for workers.

A common argument is that what is good for business is also, in the end, good for workers. Indeed, incomes tend to be higher and unemployment lower in the higher-ranked states on our list, and keeping workers happy is an important consideration for many businesses. But the recent economic recovery appears to have favored corporations more than individuals. While business incomes are higher than ever, the national poverty rate has increased. At the very least, the relationship between what is good for business and what is good for workers is complicated.

Click here to see our full methodology.