Entrepreneurship is a cornerstone of the American economy, and it has reached record heights in recent years.

But starting a business is a serious undertaking, and part of launching a company means getting an idea of how well your state fosters new businesses and startups. To find out which states are the best or worst for entrepreneurs, GOBankingRates conducted a study that looked at the startup opportunities, existing small businesses, business tax climate and other factors in each state.

Based on the study’s findings, GOBankingRates generated this ranking of the best and worst states for entrepreneurs and Massachusetts is eating our lunch!

Here’s what the study had to say:

Rhode Island – 9th Worst

“Rhode Island entrepreneurs might have some serious cash flow problems, as this state is the fifth-worst for small business lending. With a cost of living that’s 25.7 percent higher than the rest of the nation’s and high business taxes, Rhode Island businesses have more costs eating into their profits.

Businesses in Rhode Island could benefit from tapping the state’s larger-than-average pool of available employees, which is equal to 6.6 percent of the state population. A higher graduation rate injects a group of graduates equal to 4.5 percent of the population into the workforce each year. Even with access to a wide pool of candidates, however, small businesses in Rhode Island face substantial financial obstacles, putting the state at No. 9 on this list.”

Massachusetts – 8th Best

“Businesses in Massachusetts are some of the least likely to fail, indicated by the state having the third-highest business survival rate in the nation. Entrepreneurs founded new businesses at 2.45 times the rate they failed in 2013. Massachusetts’ existing small businesses are already a major force in the state, employing 20.8 percent of its population, which is a larger portion than in most states.

Another sign of growing business opportunities is the state’s high GDP per capita of $68,185. And as a hub of higher education in the U.S., Massachusetts schools produce well-qualified candidates for employment.

Startups could face some challenges in Massachusetts. The state has one of the lowest rates of small business lending and one of the highest costs of living. Companies that can find a way to get past these obstacles might still have a better chance at success in this state, however.’

Rhode Island Business Climate