Navigating the stock market in 2022 has grown increasingly complex, with its rocky and uneven terrain. An economic downturn has sent many of the world's most reliable stocks sliding. As a result, it's become increasingly important to invest in companies with solid and reliable businesses that are near-guaranteed to continue growing for decades. 

Microsoft (MSFT 0.46%), Nvidia (NVDA 4.35%), and Alphabet (GOOG 1.43%) (GOOGL 1.42%) have each suffered declines in their share prices this year but are strong enough to go the distance. So let's take a look at why these are excellent stocks to buy now and hold indefinitely. 

1. Microsoft 

Despite its stock falling 27% year to date, investors who bought Microsoft five years ago have watched their investment grow 190%. A $200,000 investment in Microsoft in 2017 would be worth $380,000 today.

The company has maintained its growth with substantial market shares in lucrative industries. For instance, as of June, Microsoft was responsible for 76.3% of computer operating systems (OS) and has maintained its dominance even with the rise of Alphabet's Chrome OS and Apple's Mac OS. The Windows company has actually stolen back market share from its competitors this year, having a 74.79% share in April.

Its leading market share in operating systems has bolstered consumer use of its software, such as Office, and made programs like Word, Excel, and Powerpoint the standard in most professional and academic settings. In Microsoft's latest quarter, its Office 365 subscription service saw revenue grow by $1.3 billion or 11% year over year.

Along with a 21% market share in the $203.5-billion cloud computing industry and its growing dominance in gaming, the company is likely to continue expanding for years to come and is an excellent long-term investment.

2. Nvidia 

As a leader in the PC industry, few companies' stocks have been hit as hard as Nvidia in 2022, with its share price sinking 46% year to date. However, investors who bought in five years ago are still smiling as the company's stock has risen 191% since 2017. 

As one of the primary founders of the graphics processing unit (GPU) market, the company has retained its dominating position, being responsible for 79% market share in GPUs in the second quarter of 2022, according to Jon Peddie Research. The PC industry has suffered steep declines in 2022 as consumer spending has slowed alongside rising inflation; however, it's unlikely to be down forever. 

Additionally, Nvidia's venture into console gaming is a positive step toward diversification and great for long-term growth. 

Since Nintendo's Switch launched in 2017, Nvidia has powered the game console through its system on a chip, providing processing and graphics. The Switch has been immensely popular over its lifespan, selling 114.33 million units as of Nov. 8, meaning just as many Nvidia chips have made it into mainstream consumer use.

Nintendo is currently at work on a next-generation Nintendo Switch, which recent job listings have confirmed. Based on previous Nintendo console generations, the next Switch is overdue and could be revealed as early as 2023. If that's the case, Nvidia could see a sustained boost in revenue from its sales over the next several years.

As a result, with its strength in the PC market and its move into consoles, Nvidia is a great stock to buy now and hold forever. 

3. Alphabet 

Few companies have been as influential in the tech industry as Alphabet, with brands such as Google, Android, and YouTube each having undeniable and lasting effects on their respective markets. With the power of these brands, Alphabet has become a digital advertising powerhouse, responsible for a 28% majority market share in 2022.

The company's stock has fallen 35% since January as consumers and businesses tighten budgets, and Alphabet's advertising-reliant segments take a hit. However, according to Statista, digital advertising spending will reach $876.1 billion by 2026, an increase of 68% from 2021's $521 billion.

Advertising may take a hit in 2023 if a recession hits, but the industry has a strong future for the long term. With companies such as Netflix and Disney entering the market with ad-supported tiers on their streaming platforms, other companies will likely be turning to Alphabet to supplement cheaper services with advertising. 

Additionally, Alphabet has made promising strides in cloud computing. Its Google Cloud service has the third-largest market share in the industry at 10%, behind Amazon Web Services (AWS) and Microsoft's Azure. Alphabet's platform has also seen the most growth this past quarter, with Google Cloud revenue rising 37.6% year over year, while AWS increased 27.4% and Azure 35% in the same period.

Despite potential short-term pitfalls, Alphabet has dominating positions in promising industries that will likely see its stock soar for years to come.