Apple Store in Palo Alto

Image source: Apple.

With a market cap of about $784.5 billion, Apple (AAPL 0.64%) is by far the most valuable company in the world. A lot of that value, however, is tied up in cash -- most of which Apple holds overseas. As of the end of Apple's fiscal second quarter, it had $246.8 billion in cash on its balance sheet.

Much of that cash is held overseas, and hefty repatriation taxes prevent Apple from bringing it back to the United States and deploying it. But if Apple could use all of its cash to acquire another company, its pile is so large there are only 10 companies it couldn't afford to buy.

Google employees wearing colored shirts and making the Google logo

Image source: Google.

1. Alphabet: Market cap of $671.6 billion

Alphabet (GOOG 1.25%) (GOOGL 1.27%) is the parent company of Google as well as other ventures including Waymo (self-driving cars), Nest (smart home devices), and Access (high-speed internet) among others. Nearly all of the conglomerate's revenue and profits come from Google. The company has benefited from the continued increase in spending on digital advertising thanks to its dominance of the global online search market, as well as smart investments like YouTube.

A Microsoft Store storefront

Image source: Microsoft.

2. Microsoft: Market cap of $566.1 billion

Microsoft (MSFT 1.65%) is the company behind Windows and Office, which can be found on just about any workplace PC. The company also dabbles in hardware with products like the Xbox video game system and Surface tablet PC. Recently, its cloud computing business, Azure, started contributing meaningful revenue and is growing at a strong clip.

Amazon boxes coming down a conveyor belt

Image source: Amazon.

3. Amazon: Market cap of $482 billion

Amazon (AMZN 1.30%) is the largest online retailer in the world, and it continues to take more and more of the growing market every year. As a larger percentage of consumers' spending moves online, Amazon has been a big beneficiary thanks to its loyalty program, Prime. The U.S. membership includes unlimited two-day shipping, video streaming, and loads of other benefits. Amazon also operates similar Prime programs in several other countries including India and China, and its video-streaming service is available in almost every country (China being the major exception). Amazon's cloud computing division, Amazon Web Services, also contributes meaningful revenue and profits to the company.

The"Like" icon at the entrance to Facebook's campus

Image source: Facebook.

4. Facebook: Market cap of $468.4 billion

Facebook (META 2.98%) operates the eponymous social network as well as Instagram, Messenger, WhatsApp, and several other smaller experimental apps. With over 2 billion monthly users on Facebook, the company holds a huge advantage over most other digital advertising companies for its ability to target users and reach a mass audience at the same time. It's also proved capable of scaling other platforms, with Messenger and Whatsapp each boasting 1.2 billion users and Instagram reaching 700 million. The latter has proved to be a great source of revenue as well.

The GEICO gecko loading up a golf cart

Image source: GEICO.

5. Berkshire Hathaway: Market cap of $425 billion

Berkshire Hathaway (BRK.A -0.34%) (BRK.B -0.01%) is a holding company headed by Warren Buffett. The company owns well-known brands such as GEICO insurance, Fruit of the Loom, and Helzberg Diamonds. It also owns significant stakes in several publicly traded companies, including a relatively small 2.5% stake in Apple. Buffett recently turned his focus toward owning entire companies instead of strategically buying stock. Operating income from its wholly owned subsidiaries funds further investments.

Alibaba offices

Image source: Alibaba.

6. Alibaba: Market cap of $396.2 billion

Alibaba (BABA 2.59%) operates several Chinese e-commerce sites including the eponymous alibaba.com, which specializes in connecting businesses with Chinese suppliers. The company also operates Taobao, China's largest consumer-to-consumer marketplace, Tmall, a business-to-consumer subsidiary of Taobao, and AliExpress, which is aimed at international consumers. Alibaba also has its hands in payments, digital video, cloud computing, and numerous other ventures.

Johnson's Baby products

Image source: Johnson & Johnson.

7. Johnson & Johnson: Market cap of $360.2 billion

Johnson & Johnson (JNJ 0.29%) makes medical devices and pharmaceuticals as well as consumer packaged goods. It owns well-known brands such as Band-Aid, Tylenol, and Neutrogena. Despite its strong consumer packaged goods division, most of its revenue comes from pharmaceutical and medical devices segments. Remicade -- used in the treatment of Crohn's disease, ulcerative colitis, rheumatoid arthritis, and other autoimmune diseases -- is its biggest moneymaker. But recent cancer-fighting drug partnerships have contributed a lot of growth in the last year.

Exxon and Mobil gas stations

Image source: ExxonMobil.

8. ExxonMobil: Market cap of $347.5 billion

ExxonMobil (XOM 0.39%) traces its roots all the way back to John D. Rockefeller. Both Exxon and Mobil were formerly Standard Oil companies following the breakup of the company in the early 1900s. Today, the combined company is the largest oil refinery in the world. Upstream operations make up the vast majority of revenue, with exploration operations all over the world. ExxonMobil's push into natural gas and petrochemicals over the last few decades has helped support the company as consumers shift away from relying on oil.

Chase bank

Image source: Chase.

9. JPMorgan Chase: Market cap of $328.8 billion

JPMorgan Chase (JPM 1.44%) is the largest bank in the United States. It finished 2016 with the largest deposit base with $1.4 trillion. It's also the largest credit card issuer through its Chase brand. Most of its revenue comes from its consumer and community banking operations as well as its investment bank business. With its hands in so many facets of banking, JPMorgan has numerous opportunities to interact with customers and reduce switching, enabling it to continue growing its deposit base and credit card business.

Wells Fargo branch

Image source: Wells Fargo.

10. Wells Fargo: Market cap of $275.9 billion

Despite controversy over the past year, Wells Fargo (WFC -0.26%) remains the top deposit gatherer in the U.S. In fact, deposit balances increased 5% year over year in the second quarter to $1.3 trillion. Unlike competitors like JPMorgan Chase, Wells doesn't generate much revenue from investment banking. Instead, it relies on more steady revenue from brokerage and advisory fees. It's also a major player in the consumer mortgage market.

A pile of dollar bills

Image source: Getty Images.

Anyone else is (theoretically) up for grabs

The pile of cash and short-term investments on Apple's balance sheet is larger than every other publicly traded company in the U.S.' market cap. And that pile's only going to get larger after Apple reports its third-quarter earnings on Aug. 1.

Of course, even if there's a repatriation tax holiday, Apple would still have to pay at least some taxes to get its cash back to the States in order to make a big acquisition. Not to mention the company has racked up quite a bit of debt to fund its capital return program over the past few years, and its hoard of overseas cash helps support its bond prices.

But not only is Apple the largest company by market cap in the world, only a handful of companies are bigger than its cash balance alone.