The COVID-19 pandemic is showing investors just how volatile the markets can be, often without any warning. That makes it all the more important for investors to hold safe investments in their portfolios that they can hang onto forever, and not worry about what happens to the markets in the short term.

By holding onto stocks for years and resisting the urge to sell, investors are able to take advantage of compounding returns from holding good businesses in their portfolio. Dividend income and capital gains can lead to long-term wealth that can help make you rich. Below are three established, strong businesses that you can safely buy and forget about today.

1. GlaxoSmithKline

GlaxoSmithKline (NYSE:GSK) is a top drug manufacturer that provides patients with critical medications. From HIV to oncology to respiratory and other drugs, GlaxoSmithKline's products serve patients with a variety of healthcare needs. And what makes the healthcare stock an even better buy is that it's diversified beyond pharmaceutical products.

While pharmaceuticals make up more than half of the company's sales, the other half comes from consumer health products and vaccines. In April, GlaxoSmithKline announced that it would be working with Sanofi (NASDAQ:SNY) to develop an adjuvanted vaccine for the coronavirus. By the latter half of this year, the companies expect to begin clinical trials on the candidate vaccine and results could be available a year later..

A successful vaccine could help propel the company's sales growth. In 2019, GlaxoSmithKline's top line rose by 9.5% but the year before that revenue grew by just 2.1%. Year to date, shares of GlaxoSmithKline are down 11%.

Pills spilling out of prescription medication bottle

Image source: Getty Images.

Diversification is important when picking a stock to hold forever because it makes the company adaptable to changing situations, such as a pandemic. And if its collaboration with Sanofi is successful, GlaxoSmithKline could benefit during a challenging economic time.

Another important factor to consider when choosing a stock to hold for decades is profitability. After all, a company that struggles to stay out of the red is not one that you should expect to last for the long haul.

In GlaxoSmithKline's case, that isn't a concern; the company's posted a profit in each of the past 10 years. And in only three of those years has its profit margin fallen below 10%.

As an added bonus, the stock also pays its shareholders a dividend that yields around 4.5% annually, although payouts from the U.K.-based company will likely fluctuate somewhat due to foreign exchange. But either way, that's still well above the 2% dividend yield that you can expect from the average S&P 500 stock.

2. Adobe

Adobe (NASDAQ:ADBE) is a top tech stock that's known for its high-quality software. Names like Photoshop, Illustrator, and Reader are second-to-none, and they're programs that professionals in many industries seek out. Whether it's marketers designing ads or entrepreneurs in need of a way to professionally edit photos for their websites, there's no shortage of demand for Adobe's products.

In Adobe's first-quarter results that it issued back on March 12, the company acknowledged that it'll likely see delays in bookings and postponement of services as a result of the COVID-19 pandemic as customers look to keep their expenses down. However, it noted that there's "tremendous uncertainty" in the current situation. 

But with the San Jose, Calif.-based company moving to a subscription-based model, there's even greater stability in its long-term revenue. In its 2019 fiscal year, the company's top line grew by 23.7%, and that was mainly due to its subscription revenue, which accounted for 89.4% of its total sales for the year. That's up slightly from 87.7% in the previous year.

Like GlaxoSmithKline, Adobe's bottom has also consistently landed in the black. In 10 years, its profits margins never fell below 6%, and in the three most recent fiscal years they've been above 23%.

Adobe doesn't pay a dividend, but with the stock up 19% this year as the S&P 500 is down 4%, the stock's returns have more than made up for the lack of a recurring payout.

3. Mastercard

Mastercard (NYSE:MA) is a no-brainer as far as long-term investments go. The need for consumer credit isn't going away anytime soon. The COVID-19 pandemic's unfortunately only making matters worse in that people are going to become more dependent on credit amid tougher economic conditions.

The good news is that debt levels may not be as high as feared as a study by WalletHub found that after debt levels rose in 2019 by $76.7 billion, "Consumers quickly changed course, however, posting the biggest first-quarter credit card debt paydown ever, at $60 billion."

Spending may be down during a recession, but over the long term, investors should continue to expect to see Mastercard's sales numbers rise. In 2019, the New York-based company's net revenue of $16.9 million was up 12.9% from 2018 and 35% higher than 2017's tally. As for profit margin, Mastercard's bottom line is the most impressive on this list. In 10 years, its lowest annual profit margin came in at 28%. Normally, Mastercard's a safe bet to see more than 30% of its sales trickle through to the bottom line.

So even if there's a drop in sales due to the COVID-19 pandemic, Mastercard's in terrific shape to be able to handle any adversity and absorb a hit to its financials. Either way, it's not a stock investors need to worry about over the long term, and that's why it's a great forever stock to own.

Mastercard's in a duopoly with rival Visa (NYSE:V) and either stock can be a good option for investors to hang on to for the rest of their lives. But the one reason investors may want to choose Mastercard rather than Visa is that over the long term, it may have more room to grow. With a market cap of $438 billion, Visa is valued higher than Mastercard, which is worth $312 billion. And in fiscal 2019, Visa's reported sales of $23 billion were 36% higher than the $16.9 billion that Mastercard posted. Visa's higher top line could also hit a ceiling a bit sooner than Mastercard's might, which would impact the stock's potential long-term growth.

Currently, Mastercard stocks pays a modest dividend of about 0.5%, which is slightly less than the 0.6% that Visa pays. Shares of Visa are up 6% year to date while Mastercard's stock is up by 4%.

Which stock is the best buy?

The three stocks listed above are all great options for investors to build their portfolios around. But if you've only got room for one stock, then a look at their price-to-earnings multiples can help narrow the choices down a bit.

MA PE Ratio Chart

MA PE Ratio data by YCharts

Adobe's the most expensive of the three stocks listed here, while GlaxoSmithKline provides investors with the most bang for their buck. Given that the healthcare stock pays a high dividend and will face less risk than Mastercard will with respect to bad debts, GlaxoSmithKline is the best buy overall as it provides investors with a solid mix of value, dividends, stability, and potential growth.