What happened

United Parcel Service (UPS -1.06%) delivered for investors in the fourth quarter, and the stock rallied as a result. Shares of the delivery giant were up as much as 17% for the week as of midday Thursday, after the company posted an earnings beat and raised its dividend.

So what

UPS and other transportation companies rallied through the pandemic. The reliance on online shopping (and delivery) during lockdowns created added demand, and more recently, supply chain snags have led to strong pricing. UPS shares nearly doubled between the start of 2020 and the end of 2021.

A UPS truck at a loading dock.

Image source: United Parcel Service.

But fuel and labor expenses are up, too, and heading into earnings season there was some debate over whether the rally was running out of gas. UPS' results made a mockery of those concerns and provided a clear indication that the stock still has room to run.

UPS earned $3.59 per share in the fourth quarter on revenue of $27.8 billion, topping analyst expectations for $3.10 per share in earnings on $27.06 billion in sales. The company also declared a dividend payout of $1.52 per share, 49% above what it paid a year ago.

Now what

Management said it expects to face challenges in 2022, including continued labor and energy pressures. But pricing is expected to remain firm, and the company expects domestic operating margin to expand by about 50 basis points for the year. It also said it expects to hit 2023 revenue and margin targets a year ahead of schedule.

Free cash flow guidance in a range of $9 billion to $10.9 billion in 2021 was a bit of a disappointment, but UPS is investing in its growth. The company plans to open 30 delivery centers and two sorting hubs this year, and take delivery on two Boeing 747-8 freighters.

In the big picture, it seems likely that even if e-commerce growth slows as we come out of the pandemic, there will still be plenty of demand for delivery services. UPS generated about 11% of revenue from Amazon in 2021, and remains one of the few outside vendors still seeing strong business from the retail giant.