Opening a brewery is difficult for a multitude of reasons. For many buddying beer brands, finding a location is near the top of that list. A recent study aims to eliminate some of that guesswork.

Bid-on-Equipment (BOE), an online marketplace for used industrial machinery including for the food and beverage business, commissioned a study that analyzed 180 U.S. cities to determine the best places to open a brewery. The study was conducted by Digital Third Coast, a marketing agency based in Chicago, IL.

Using the 2017 5-Year U.S. Census’ American Community Survey, the study compiled cities with populations of at least 50,000 and compared them in six different categories, broken into two parts: business environment and business costs. Each “part” comprised 50 percent of the criteria.

Part one, “business environment” includes percent of the population over the age of 21, number of breweries per 50,000 people, brewery self-distribution, and median income. Part two, “business costs” looks at state excise tax per barrel of beer, and brewery license cost.

Per the survey, Somerville, MA comes in as the number-one city to open a brewery. This city has the highest population of residents over 21, a low state excise tax on barrels, and one of the lower brewery license fees in the country. Next are Madison, WI; Royal Oak, MI; Denver, CO; and Longmont, CO.

The two states with the most cities on the list are Colorado, with six cities; and Oregon, with two cities. Only five large metropolitan cities, or cities with a population of 500,000 or more, are included in the top 25.

Last week, C+R Research, another Chicago-based market research firm, released a report listing “Which Cities Have the Most Craft Breweries,” assessing more than U.S. 500 cities to determine which had the most breweries per capita, or per 50,000 people.

Similarly, major cities such as Chicago, New York, and Los Angeles were not on that list.

Below are the top 25 U.S. cities to open a brewery: