Cash can be a company's most valuable asset during a financial crisis. It can provide a lifeline when all other funding sources evaporate.

Because of that, companies that generate lots of free cash and have cash-rich balance sheets can weather almost any economic storm. It also allows them to go on the offensive when rivals must hunker down and play defense.

Some companies seem to live by the mantra that cash is king since they generate copious amounts of it, which piles up on their balance sheets. Three kings of cash on the Nasdaq Composite Index are Apple (AAPL 0.37%)Alphabet (GOOG -3.62%) (GOOGL -3.80%), and Microsoft (MSFT -4.28%). Because of that, they're in excellent positions to weather a potential economic storm.

Returning the bulk of its abundance to investors

Apple produces massive cash flow. The tech product-and-services titan generated nearly $122.2 billion of cash from operating activities last year on about $395 billion of revenue. That was $18 billion, or 17.4% above its 2021 tally. The company returned $104.2 billion of that money to investors, repurchasing $89.2 billion of stock and paying $14.8 billion in dividends.

Apple can afford to return the lion's share of its cash flow to investors because it has a cash-rich balance sheet. It ended last year with $169.1 billion of cash, equivalents, and marketable securities against $120 billion of debt, giving it a net cash position of over $49 billion.

The company's cash-flowing business and cash-rich balance sheet allow it to continue investing in product innovation to enhance its ecosystem and repurchase shares during an economic downturn. That positions the company to grow shareholder value over the long term.

Brimming with cash

Alphabet is another cash-gushing tech titan. The search giant generated $69.1 billion of revenue in the third quarter, converting $16.1 billion into free cash flow.

The company uses its robust cash flow to repurchase shares, make acquisitions, and maintain a top-tier balance sheet. Alphabet had repurchased nearly $44 billion of its stock through the third quarter and spent about $7 billion on acquisitions, including funding its $5.4 billion deal for cybersecurity company Mandiant. 

Even with those acquisitions and cash returns, Alphabet ended the period with nearly $116.3 billion in cash and marketable securities. With only $14.7 billion of long-term debt, the company has over $100 billion of net cash.

That gives it the tremendous financial flexibility to continue returning cash to shareholders and making strategic investments. The company is in an excellent position to go on the offensive if there's an economic downturn. It could take advantage of the steep sell-off in tech stocks to acquire companies and enhance its long-term growth prospects.  

Using its cash to go shopping

Microsoft is a cash-flow machine. The tech giant produced almost $11.2 billion in net cash from operations and nearly $4.9 billion of free cash flow in its most recent fiscal second quarter. The company has now generated almost $34.4 billion in net cash from operations through the first six months of its fiscal year and over $21.8 billion in free cash.

That gave the company lots of money to return to shareholders. It repurchased over $11 billion in stock and paid almost $9.7 billion in dividends (the tech titan increased its dividend by 10% last September). The company also spent over $1 billion on acquisitions. 

Microsoft maintained a cash-rich balance sheet, even with those cash returns and investments. The company had $99.5 billion of cash, equivalents, and short-term investments on its balance sheet at the end of last year, more than twice its $48.1 billion of debt. That gives it the financial firepower to make acquisitions that enhance its business.

It recently unveiled a new multiyear, multibillion investment in artificial intelligence (AI) company OpenAI. It's also working to acquire game developer Activision for $68.7 billion in cash. Given its copious free cash flow and robust balance sheet, Microsoft has the financial flexibility to continue making sizable acquisitions to enhance its products and service offerings.

Cash kings of the tech sector

Apple, Alphabet, and Microsoft produce enormous amounts of cash flow each quarter. That gives them the money to make investments and return significant cash to shareholders while maintaining cash-rich balance sheets. Because of that, they can go on the offensive when others must play defense during a downturn. That makes these cash kings great portfolio anchors during uncertain times.