The $2.3 trillion global e-commerce market is expected to more than double by 2021 and presents several ways for investors to benefit.

I've selected three stocks that are in a solid position to ride this massive consumer shift to online and mobile shopping. These companies cover all the bases of e-commerce. More people are choosing to pay for online orders with PayPal Holdings (PYPL 0.34%)FedEx (FDX 1.37%) is there to ship those online orders, and lululemon athletica (LULU 1.43%) has got one of the top brands in apparel that is enjoying strong momentum right now thanks to its booming online business.

Smartphone with the PayPal app displayed and a PayPal branded credit card laying next to it.

Image source: PayPal Holdings.

A consistent, high-growth leader in mobile payments

PayPal's trailing P/E ratio of 54 looks expensive at first glance, but there are some companies worth paying up for, and I believe PayPal is one of those. One reason it deserves a high valuation is its consistency of posting more than 20% annual growth in total payment volume. In the first quarter, its momentum continued to roll along, with revenue growing 24% year over year and non-GAAP earnings per share surging 29%.

Additionally, PayPal has invested in making its apps easy to use, which is reducing the number of calls coming into customer service centers and allowing management to invest less in customer support, its second-largest expense item. This trend is benefiting operating margin, which reached an all-time high of 22.5% in Q1 on a non-GAAP basis.

With the number of mobile payment users expected to increase 54% to over 1.1 billion by 2021, PayPal's momentum will not likely slow down anytime soon. It's got an incredibly long runway of growth in the multitrillion-dollar global commerce market. I can be a real stickler for valuation, but in this case, I believe PayPal is a stock you should simply tuck away in your nest egg and forget about for at least 10 years.

A miniature globe on top of a computer keyboard with shipping boxes stacked around it.

Image source: Getty Images.

FedEx should benefit from the higher volume of online orders

Shares of FedEx have been under pressure lately, likely stemming from concerns about what impact Amazon.com will have as the online retailer begins investing in its own delivery service. These concerns are overblown and they're giving investors an opportunity to buy a first-class shipper, with a nice tailwind of growth coming from e-commerce, at a bargain price.

One reason investors shouldn't be concerned about Amazon is that no single customer makes up more than 3% of FedEx's revenue or volume. Plus, the growth opportunity to serve a wide-open e-commerce market will benefit all major shippers, especially as it relates to China. FedEx is building out its network in the Middle Kingdom to serve the booming cross-border Chinese e-commerce market, which was estimated to have grown 28% in 2017, according to eMarketer.

On another front, while FedEx continues to be seen as the leader in air shipping (57% of total revenue), its FedEx Ground operation (30% of total revenue) keeps making headway as it catches up with its main rival UPS, which has been the leader in ground shipping. FedEx claims 29.1% of its ground shipping lanes are now faster than UPS, with 67.8% on par with its archrival.

The stock's trailing P/E ratio is just 15 at the time of this writing. FedEx nearly doubled its non-GAAP earnings per share between fiscal 2013 and fiscal 2017, and with management now targeting 10% to 15% earnings growth going forward, FedEx stock looks too good to pass up.

Woman using laptop to shop online.

Image source: Getty Images.

Lululemon is back in shape

Finally, investors should consider lululemon, the yoga apparel specialist that has been posting impressive growth in its online business.

Lululemon's direct-to-consumer (DTC) revenue (which includes online sales) soared 42% in the fourth quarter following an overhaul of the company's online operation. DTC made up only 21.8% of total revenue in fiscal 2017, but it's gradually getting bigger. Since DTC generates much higher margins than physical stores, the surge in online sales allowed Lululemon to earn its highest gross margin since the fourth quarter of fiscal 2012.

Lululemon is also seeing explosive growth in Asia, where management expects online penetration to reach as high as 50% of its business. Chinese consumers are ahead of the rest of the world in e-commerce, and that should fuel the company's DTC growth as management expands the online business in that market.

Similar to PayPal, lululemon looks expensive, with a trailing P/E ratio of 38. But considering it's operating in a more-than-$300 billion athletic apparel market, and experiencing near triple-digit growth rates in Asia, in addition to margin expansion opportunities from its online growth, I wouldn't be afraid of paying up for lululemon stock.