America’s largest companies tend to be located in major metropolitan areas. New York City alone is home to the headquarters of more than 70 of U.S.’s 1,000 largest public companies, the most of any city in the nation.

24/7 Wall St. reviewed annual revenues to determine the largest company in every state. All but five states are home to at least one Fortune 1000 company. And the five most populated states account for more than 40% of the Fortune 1000 list.

There can be large differences between the biggest company in one state and the biggest company in another — not just in the industries they operate in but also in their size. Apple, the largest company in California, reported revenue of $233.7 billion in 2015. That is roughly 500 times the revenue of Barnard Construction Company, Montana’s largest company.

Unlike most big companies, however, some of America’s largest enterprises are headquartered in small cities. The largest company in the world by revenue, Wal-Mart, is based in Bentonville, Arkansas, a city of around 40,000 residents. With 2.3 million employees, Wal-Mart’s workforce is 50 times the population of its home town.

22.  Michigan

> Largest company: General Motors (NYSE: GM)
> Revenue: $152.4 billion
> Headquarters: Detroit, MI
> Ownership: Public

Most of the largest companies are publicly traded. An initial public offering — the first sale of stock by a private company to the public — can have lucrative benefits. The increase in liquid capital from the IPO helps companies finance further growth and invest in new market opportunities. Because of these advantages, the largest company in all but 10 states is publicly traded.

Still, some of the most successful businesses remain privately owned and often achieve the highest revenue of any company in a state. In Kansas, for example, privately held Koch Industries is substantially larger than Spirit AeroSystems Holdings, the largest public company in the state. The $6.6 billion in annual revenue Spirit reported in 2015 is only a fraction of Koch’s revenue of $123 billion.

A state’s biggest company is often tied to the state’s largest industries. In Nevada, where a large share of the state’s GDP is generated by casino resort companies in Las Vegas, the largest company is Las Vegas Sands — the largest of these casino resorts. Similarly, automobile manufacturing is a large part of Michigan’s economy, and Detroit-based General Motors is the state’s largest company.

To identify the biggest company in each state, 247 Wall St. reviewed the 1,000 largest public U.S. companies by revenue from Fortune. PrivCo provided revenue figures for the largest private companies in the country. When available, more recent figures were obtained from annual SEC filings.

Click here to see the largest company in each state.