FedEx Corp. is poised to reap the benefits of online-shopping growth, forecasting full-year profit in line with analysts’ expectations.

Earnings will be $13.20 to $14 a share for the fiscal year through next May after excluding pension adjustments and costs from the integration of TNT Express, the courier said Tuesday. Analysts had predicted $13.61, according to estimates compiled by Bloomberg.

The outlook underscored the potential payoff for FedEx as it seeks to reap the rewards after heavy investments in fiscal 2017 to handle more of…