Our current economic environment is brimming with uncertainty. Inflation has rocketed to 40-year highs, and now the Federal Reserve is resorting to more aggressive interest rate hikes to combat the issue. In addition, the war between Russia and Ukraine continues to negatively impact companies worldwide, adding more fuel to the fire. With the fear that a recession may be on the horizon, investors have raced to dump technology stocks in favor of safer assets like bonds and low-risk equities. 

The Nasdaq Composite index has crumbled 24% year to date, as the broader retreat from tech stocks continues to affect companies of all shapes and sizes. During times of economic uncertainty, it's always a good idea to buy companies that enjoy robust cash positions. Businesses with a lot of cash on their balance sheets award investors a much-needed safety net amid economic downturns. 

Let's discuss two big tech companies that are performing well financially and possess a boatload of cash.

Stockbroker in formal clothes works in the office with financial markets.

Image source: Getty Images.

1. Alphabet 

Alphabet (GOOGL -3.37%) (GOOG -3.33%) shares have foundered 21% year to date even after delivering a solid Q1 2022 earnings report. The premier search engine and online advertising operator grew revenues by 23% year over year to $68 billion in Q1, led by a 22.3% increase in its core advertising business and a robust 43.8% rise in its Google Cloud segment. Diluted earnings per share declined 6.4% to $24.62, finishing slightly below but mostly on par with analysts' expectations.

In fiscal 2022, analysts forecast Alphabet's top line to climb 15.2% year over year to $296.8 billion while its bottom line should diminish 0.9% to $111.14. Next year, Wall Street anticipates another 15% increase in sales, coupled with an 18.7% rise in EPS, representing a solid rebound in earnings growth from 2022 projections.

The tech giant also currently boasts $20.9 billion in cash and cash equivalents. Not only that, but Alphabet has generated free cash flow (FCF) at a compound annual growth rate (CAGR) of 21% over a five-year span, yielding $69 billion in FCF in the last 12 months alone.

Shareholders can sleep comfortably at night knowing that this company has more than enough funds to weather any economic storm. Beyond that, the search engine leader's enormous cash position will enable it to continue buying back shares and cozily invest in growing its business in the years to follow.

To put the icing on the cake, Alphabet is trading at 21 times earnings at the moment, denoting a steep discount to its five-year average price-to-earnings multiple of 32. In my opinion, this stock is a no-brainer in today's market environment.  

2. Microsoft

Microsoft (MSFT -1.00%), which has withdrawn 19% since the beginning of the year, beat both revenue and earnings forecasts for the 12th consecutive time in Q3 2022. The software giant's top line expanded 18.4% year over year to $49.4 billion, with its "service and other" segment leading the charge, growing 28.8% to $32 billion. Its diluted EPS rose 9.4% to $2.22, and the company's operating margin inched upward to 41.3% versus 40.9% in the same quarter a year ago. 

On June 2, the company slightly downgraded its guidance for the fourth quarter due to unfavorable foreign exchange (FX) rates. Investors shouldn't fret too much, though -- the adjustment was minuscule, with no impact on the company's long-term business trajectory. In 2022, analysts still forecast Microsoft's sales to increase 18.5% year over year to $199.2 billion and its EPS to climb 15.8% to $9.32. These growth rates are extraordinarily impressive given current macro conditions and the company's mammoth size.

Like Alphabet, Microsoft is a money-printing machine. The software leader has $104.7 billion in cash, cash equivalents, and short-term investments and continues to generate the asset at a rapid clip. Producing $63.6 billion in FCF in the past 12 months, Microsoft boasts a five-year FCF CAGR of 18%. Combine its extravagant cash position with its price-to-earnings multiple of 28 -- a more than 20% discount to its five-year average of 35 -- and investors should seriously consider pouncing on the software king today.