The transition toward e-commerce is in full swing. The pandemic accelerated this trend, but let's face it: Rising e-commerce is inevitable. According to Statista, retail e-commerce sales reached $4.9 trillion globally in 2021 and are expected to grow to over $7.3 trillion in 2025. The U.S. alone accounted for $768 billion of that last year.

Many companies that we might not typically associate with e-commerce have entered the fray and are bolstering their legacy businesses. The companies below could help long-term investors outpace the market. 

Person with credit card in front of laptop.

Image source: Getty Images.

O'Reilly Automotive

Let's start with an unconventional e-commerce company. O'Reilly Automotive (ORLY 0.57%) probably isn't the first name that pops into your head when it comes to online shopping. However, its growth strategy has an omnichannel focus. Professional service providers can now place orders and receive local delivery with O'Reilly's proprietary platform made just for them. At the same time, DIY customers can do the same through the company's website.  

O'Reilly could also capitalize on the enormous inflation we see in the new and used car markets. Gone are the days of haggling with the dealer for a deal well below the manufacturer's suggested retail price (MSRP). Instead, new car buyers are getting sticker shock. Thanks to dwindling inventories and the rising cost of new cars, used car prices have been up more than 40% over the past year. As a result, it's a good bet many drivers will be holding on to their vehicles longer, and the demand for parts from both professional service providers and DIY car owners will remain strong.  

The company is already posting impressive results with revenue increasing to $13.3 billion in 2021, up 15%. The company's diluted earnings per share (EPS) also increased 32% to reach $31.10 last year. That was due in part to the company's lucrative share buyback program, which totaled nearly $2.5 billion in 2021 alone. O'Reilly stock has gained over 40% in the past year, and the company is set up to continue its impressive run long term.

Target

Target (TGT 1.28%) is another retailer that has embraced e-commerce and made a splash in recent years. In fiscal 2021, comparable sales grew 12.7%, while digital growth hit 20.8%. Even more impressive, that performance followed comparable online sales growth of 145% in fiscal 2020 due to COVID-19. Digital made up 19% of the company's $104.6 billion in total sales last year, and Target fulfills 95% of those digital sales through its existing stores, allowing it to leverage existing assets. Target actually increased its operating margin in 2021 despite the challenging labor environment.

A dependable dividend can be a long-term investor's best friend during times of uncertainty. Target hasn't missed a dividend payment since 1967 -- two years before Apollo 11 landed on the moon. It has been increasing the payout for 50 years as well. The dividend currently yields about 1.7%. While that's nothing to write home about, a steadily rising dividend should raise a shareholder's effective yield over time.

TGT Dividend Chart

Data by YCharts.

Amazon

I would be remiss not to mention Amazon (AMZN -1.14%) when discussing e-commerce stocks. Especially in light of its recent blockbuster stock split announcement. Management has announced the company will undergo a 20:1 stock split and begin trading split-adjusted on June 6, 2022. Individual investors have clamored for this split for some time.

However, the most significant impact may be the company's potential for inclusion in the Dow Jones Industrial Average. Because of how the Dow is calculated, a stock that trades for thousands of dollars cannot practically be added to the index. Once Amazon's stock splits, it could be a prime candidate for inclusion. 

Lost in the stock split announcement was also a $10 billion share buyback authorization. While this won't make much of a dent in the company's outstanding shares, the signal from management is they feel the stock is undervalued. It could also be a sign of more share buybacks to come.

The company's e-commerce business dealt with severe headwinds in 2021 relating to additional labor costs and logistical expenses associated with COVID-19. This crimped margins in Amazon's North America and international segments. However, AWS picked up the slack as usual. Revenue for the cloud-computing operation increased 37% to reach $62 billion in 2021, and all with a 30% operating margin. This helped the company achieve record sales of $469.8 billion for the year. Amazon could easily outpace the market in the future as headwinds in online retail subside.