2020 may have made some investors think twice, since even great companies lost a lot of their stock value in the March crash. But investors who held on to their shares are now reaping the benefits as the broader market has surged. Investing for the long term means holding onto your seat and riding out the volatility that is bound to happen from time to time -- as long as you own shares in great companies. Target (TGT 1.28%), PepsiCo (PEP 1.65%), and Starbucks (SBUX 1.09%) are all companies that should perform well in the long term and that you can hold forever. 

Innovative solutions to take care of basic needs

Target was one of the biggest winners of pandemic shopping, with its highest-ever comps increases. It was poised for success with its large suite of same-day services that were popular even before the pandemic but became essential as people stayed home. Second-quarter comps, which covered the worst parts of lockdown, came in at 24%, and third-quarter comps came in slightly less at 20%. Much of the country was already open during the third quarter and customers were eager to start spending on items other than essentials. Digital was still flying high, growing 155%, and same-day services continued to surge 217%.

Target worker at a checkout lane with a mask.

Image source: Target.

Target has also managed to stay profitable despite its ever-growing list of shopping options, shipping more than half of orders from stores instead of stated distribution centers and saving on costs.

Why do customers love to shop at Target? Clearly, discounted prices and many shopping options play a role. Target also markets its own brands that are cheap and chic for the customer, and cost-effective for the company. It's also experimenting with different formats to provide the right experience for each location -- meaning there's so many places this company can go.

Target stock hit new highs recently and is up 172% year to date, but it's only trading at 22.7 times trailing 12-month earnings. As the economy continues to reopen and customers switch from purchasing essentials to spending on experiences or luxuries, Target will feel some pressure and its phenomenal performance is likely to slow down. But Target's ease in innovation and customer service means that there are years of growth ahead.

The right products at the right time

You may be using PepsiCo products daily, even if you don't consume carbonated beverages. In addition to its eponymous brand and other drinks, PepsiCo has a breakfast product line and a snack collection that kept its sales moving in the pandemic.

Person drinking from a glass of cola with a straw.

Image source: Getty Images.

The company's Frito Lay division grew 7% in the second quarter during the height of lockdowns as people snacked inside, and the Quaker Oats breakfast division grew 23%. That was enough to keep company-wide sales almost even despite fallout in takeaway beverages, with a 3% sales decline over the prior year. The third quarter was already positive, growing more than 5% over 2019 and and increased earnings.

But is it just a coronavirus thing? Definitely not. PepsiCo has been growing faster than rival Coca-Cola (KO 0.68%) for many years, and its diversified product line has been an important factor in its overall success. It means the company is agile and can meet changing consumer behaviors faster than rivals like Coke, which had a 28% decrease in sales in the second quarter and is scrambling to restructure as sales continue to decline. It also means the company is well-positioned for future gains.

PepsiCo stock is up 5% year to date and yields a 2.8% dividend, a good deal more than the S&P 500 average of 1.8%. 

Custom coffee all over the world

For a restaurant chain whose main product is coffee, it's pretty incredible that Starbucks has been able to rack up more sales than restaurant chains such as McDonald's and Wendy's. But Starbucks has opened over 32,000 restaurants globally and still sees a lot more opportunity. 

Masked Starbucks barista serving holiday drinks at drive-thru

Image source: Starbucks.

The company has struggled during the pandemic as dining rooms closed and offices emptied out. Sales declined as much as 65% in April, the worst month for lockdowns, and have sequentially improved to a 9% decline in the fourth quarter ended Sept. 30. Sales are still declining, but the company expects them to turn positive in 2021.

Starbucks has been relentless in making changes to meet consumer demand, such as adding new drive-thrus and curbside delivery. It's also planning to open new stores in suburban locations as many people continue to work from home, and it's planning to open over 2,000 new locations in 2021, a pretty mean feat for a company that's already ubiquitous. So while the pandemic has certainly slowed its growth, Starbucks has a long life ahead of it, and investors who hold on will reap the benefits.