This time of year, American shoppers are more likely to have pumpkin spice coffee on their minds than holiday gifts. But United Parcel Service and FedEx are already gearing up for the December rush—when their shipping volume skyrockets, and social media carols of complaints about late deliveries become as commonplace as mistletoe and menorahs.
That annual ritual shows how much FedEx and UPS have come to depend on e-commerce and home delivery, which now account for around half their operating profits. But what Amazon and Etsy and their ilk give the delivery giants with one hand, they take away with the other: Online shopping has eaten into their margins and forced them to rebuild their supply chains—while exposing them to consumer wrath. This year, with holiday deliveries expected to hit another record, investors will be watching UPS and FedEx to see which one is best at keeping up.
For deliverers, the downside of the e-commerce boom is that home deliveries are relatively unprofitable. Home drop-offs typically involve just one or two items; in contrast, businesses ship to one another in bulk, reducing cost per delivery. And there’s always someone waiting for shipments at a warehouse or corporate HQ. Not so for residential customers, where a homeowner out walking the dog could force a driver to make multiple, profit-shrinking trips.
So far, it’s UPS (ups) that has struggled most—in part because its ground business, which includes residential drop-offs, handles about 40% more daily deliveries than FedEx’s. Its stock has trailed FedEx and the S&P 500 over the past five years, and e-commerce’s toll on profits is one reason why: Last year, UPS consumer shipments jumped 9%, to 2 billion packages, but operating margins fell five percentage points, to 7.9%.
The stock has also been dinged by high-profile holiday failures. In 2013, UPS vastly underestimated demand in the lead-up to Christmas, provoking a firestorm from customers whose gifts arrived days after the holiday. And last year its holiday on-time delivery rates dipped to 96%, from 98.5% the rest of the year, according to analytics firm ShipMatrix.
UPS and FedEx are “so alike in many ways,” says Oppenheimer analyst Scott Schneeberger, and neither has solved the consumer riddle. FedEx (fdx) has boosted its stock performance with the success of its Express overnight delivery business. It has also dramatically grown its consumer business, from 25% of operating income a decade ago to 45% today. But as the latter business grew larger, the margins on those deliveries suffered, falling from 18% in 2012 to 13% last year. Still, FedEx’s investments in improvements like automated shipment hubs—it opened four such facilities in its last fiscal year—are further along than UPS’s, says Credit Suisse analyst Allison Landry.
Now the onus is on UPS to reap better returns from consumer deliveries, which make up 48% of its U.S. shipping volume. Beginning this year, UPS is committing $4 billion annually—6.5% of current revenues—to automating its supply chain and updating its fleet of planes. Currently 40% of its U.S. shipments go through a highly automated facility; UPS wants every package doing so by 2021. It has also expanded the rollout of its Orion GPS tool, which provides real-time routing strategies for drivers, cutting costs by $550 million a year.
In the short run, these initiatives will squeeze profits—but that doesn’t mean they’ll scare investors away. Despite UPS’s recent underperformance, its stock has consistently traded at a higher multiple than FedEx’s in recent years. (The stocks currently have price-to-estimated-forward-earnings ratios of 18.9 and 16.1, respectively.) That’s due in part to UPS’s bigger dividend and also to its history of outpacing FedEx on metrics like return on invested capital. Still, this year’s holiday season will have additional resonance: It will hint at how well UPS’s upgrades are paying off.
UPS has added another wrinkle this year: It will impose a 27¢-per-package surcharge for online shoppers on Black Friday, Cyber Monday, and the week before Christmas. (FedEx has said it won’t add such charges for regular-size packages.) While you may already be able to hear the ghost of future complaints, Citi analyst Christian Wetherbee believes the surcharge could generate up to $100 million in extra profit. And if it helps stave off a holiday headache from late deliveries, UPS stock could shake off its recent doldrums.
FedEx and UPS are also keeping a wary eye on one of their cash cows. Amazon made waves recently by testing its own delivery service to ease warehouse backlogs; both delivery companies’ stocks dropped in early October on that news. Analysts say the e-commerce giant doesn’t represent a short-term threat. But whether Amazon remains a partner or becomes a competitor, UPS and FedEx will have to grow ever more efficient to keep customers and investors happy.
A version of this article appears in the Nov. 1, 2017 issue of Fortune with the headline “High Stakes for Home Delivery”