If Silicon Valley was its own country, its per-person GDP would make it the second richest in the world, just behind oil-producing Qatar.

The Republic of Silicon Valley — more specifically the San Jose metropolitan area, which includes Palo Alto, Mountain View, Gilroy and the headquarters of some of the world’s most valuable public companies — had a per-person gross domestic product of $128,308 in 2017, the most recent data available from the U.S. Bureau of Economic Analysis.

That’s about $66 (roughly the cost of one Chromecast Ultra from Mountain View-based Google) less than Qatar’s per-person GDP of $128,374 in 2017, as measured by The World Bank and adjusted for the difference in cost of living from country to country. Next highest is Macao, a semi-autonomous region in China best known for its resorts and casinos, with a per-person GDP of $115,123. Other rich countries, according to this measure, include Luxembourg, Singapore and Ireland.

So how do Silicon Valley and Qatar compare?

Qatar is an absolute monarchy on the Arabian Peninsula with a population of about 2.36 million whose top exports include liquified natural gas, petroleum and the Al-Jazeera news network. Qatar’s total GDP of almost $167 billion is the 54th highest in the world, lower than Iraq and higher than Hungary.

Silicon Valley has a yet-to-be-determined type of government — perhaps an AI technocracy — and a population of almost 2 million. Its top exports include Google, Apple products and Stanford graduates. Its total GDP of $275 billion would be the 42nd highest in the world, lower than Chile and higher than Finland. The United States’ total GDP remains the world’s highest at $19.48 trillion, according to The World Bank. On its own, California was the fifth largest economy at $2.79 trillion in 2017, according to the Bureau of Economic Analysis, less than Germany but more than India.

But giving Silicon Valley sole credit for Apple and Google and all its other international companies isn’t really fair to Qatar — or the rest of the California, said Micah Weinberg, president of the Bay Area Council Economic Institute.

“You can kind of statistically make us an island, but we’re not really operationally an island in the way that different countries are,” Weinberg said.

Isolating the Silicon Valley economy hides how dependent the region is on the rest of the country and how much companies headquartered here are helped by being part of the US, not to mention the rest of the state and another less seemingly prosperous valley.

“That ignores the kinds of inter-dependencies that exist and, really, how much Silicon Valley depends on the Central Valley and really wouldn’t be Silicon Valley without the Central Valley,” said Weinberg. “Even just basic stuff around the provision of water and the provision of food” would be much harder in a Silicon Valley surrounded by an international border.

OK, but what if every metropolitan area in the United States decided to become its own country? The San Francisco Federation, which would include Oakland, San Mateo and San Rafael, would be the next closest to San Jose with a per-person GDP of $89,978. That’s good enough for sixth place in the world, after Singapore and before Brunei Darussalam. Following close behind would be the metropolitan areas around Bridgeport, Connecticut, and Seattle, Washington.

But one metropolitan region would leap past Silicon Valley and Qatar for the top spot: Midland, Texas, the one-time home of former presidents George Bush and George H.W. Bush. Midland sits on the Permian Basin, one of the largest oil and natural gas reservoirs in the world. That gives its almost 170,000 residents a per-person GDP of $174,749.

Before anyone in Silicon Valley gets too jealous of the West Texas region, they should know the oil boom also has brought Midlanders something we know well: a housing crisis.