United Parcel Service (NYSE:UPS) has a problem: the internet. It's a mixed blessing that results in too much of a good thing. As the delivery giant adjusts its business to the changing outlook for retail, here are three great reasons to consider adding UPS to your portfolio.

Online retail volume is steadily growing

Retail stores with physical outlets are struggling today because consumers are increasingly choosing to shop online. That's terrible for brick-and-mortar stores, but great for those that have invested heavily in online or that only exist online -- and for companies like UPS and FedEx (NYSE:FDX), which help deliver all the stuff being bought on the internet.

Man picking up a box from the back of a UPS truck

Image source: Getty Images.

How big is this trend? According to the U.S. Census Bureau, online sales accounted for around 3.6% of retail sales in 2008. In the first quarter of 2017, they made up 8.5% of the total. In fact, since 2010, online sales have never grown less than 12% year over year in a quarter.    

If you want more evidence, just look around your local mall, where stores are disappearing at a rapid clip. Struggling retailers like Sears Holdings are shutting stores in an attempt to save money. Others, like Rue21, Payless, and Bebe, have been forced to seek bankruptcy protection. And yet retail sales continue to tick steadily higher overall because of the strength in online sales. 

UPS' online growth opportunity.

Online retail is a huge growth driver for UPS. Image source: United Parcel Service. 

This is a huge tailwind for UPS over the long term, because it means growing volumes passing through its global distribution network. Right now, though, it's something of a mixed blessing because the swift rise of online retail has led to some growing pains. 

UPS is working to adapt

Like retailers, UPS is trying to adjust to these changes. It hasn't gone as well as hoped. That's been especially true in recent years around the holiday season, when headlines have been filled with delivery issues driven by extreme volume spikes.    

UPS is working hard to shift gears. For example, in late 2014 the company expected capital spending to be between 4.5% and 5% of revenue from 2015 to 2019. Capital spending is now expected to be over 6% of revenue in 2017. The goal of this spending is to adjust to the fast-changing environment. While spending like this will be a headwind to the company's financial results in the near term, it shows that UPS is aware of the problem and doing something to fix it.    

UPS has also been changing the way it deals with customers on the pricing side of the equation. For example, it's charging more during peak holiday sales periods, including a recent move to add surcharges this holiday season. It has also started charging retailers extra if they fail to live up to projected shipping estimates. And the company changed to dimensional pricing, charging based on a combination of weight and size. So not only is UPS working to upgrade its delivery network, it's also trying to figure out the right pricing methodology.  

The solution isn't obvious yet, but UPS is truly working hard to figure out the answer. Given time, and the proactive efforts of management, the early troubles that have made headlines will likely fade.

UPS is rewarding its investors

So UPS is facing a good long-term problem as online retail grows, boosting its shipping volume. And it's actively trying to address the near-term issues caused by the challenges it faces. Those are two very good reasons to like the stock. But here's maybe the best reason: It's doing right by shareholders.

For example, over the trailing 12 months through the first quarter, UPS' operating margin was 14.3%. Taken alone, that doesn't mean much. But when you compare that to FedEx, which posted an operating margin of 9.7%, UPS looks pretty good. The delivery giant has also invested capital wisely, historically achieving higher returns on its shareholders' money than FedEx.  

UPS Return on Invested Capital (TTM) Chart

UPS Return on Invested Capital (TTM) data by YCharts.

And UPS has continually rewarded investors via dividends, providing stable or growing distributions for nearly five decades. The yield is currently around 3% compared to FedEx's yield of less than 1% and the S&P 500's yield of around 2%. The dividend growth rate, meanwhile, has been about 10% a year over time. That's roughly three times the historical rate of inflation -- not bad.    

What can brown do for your portfolio?

To be fair, I wouldn't call UPS cheap today, because it has a P/E hovering around 28. But that's lower than the company's five-year average P/E of 38. And with a price-to-sales ratio of 1.6 that's right in line with its five-year average, it's probably best to say UPS is fairly valued. Conservative long-term investors should consider adding this one to their portfolios. If a fair price for a great company isn't your thing, though, be sure to keep UPS on your watch list just in case investors get unnecessarily bearish some day.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.