On Wednesday, FedEx (FDX -2.09%) will report earnings for the second quarter of its 2016 fiscal year. Analysts expect revenue to rise 4.4% year over year to $12.46 billion and adjusted earnings per share to jump 17% to $2.53. Both of those growth rates would be relatively consistent with FedEx's performance in Q1.

However, just as important as the actual earnings numbers for Q2 will be FedEx's commentary on the ongoing peak shipping season. The rapid growth of e-commerce in the past few years has been a boon for FedEx as well as its top rival United Parcel Service (UPS -1.51%). But it has also sometimes been an Achilles' heel during December.

Navigating the peak season is tricky
FedEx and UPS know that the peak season is a big opportunity that comes with significant potential pitfalls. Two years ago, both companies got caught flat-footed by soaring e-commerce shipments in the last week or two before Christmas, combined with severe winter weather during December.

UPS has run into trouble in each of the last two holiday seasons. Image source: The Motley Fool.

As a result, many people didn't get their Christmas presents on time in 2013. Package delays were a bigger problem at UPS than at FedEx, but both companies had to apologize to lots of angry customers.

Last year, FedEx did a much better job during the peak season. Its strong December performance helped fuel a big jump in third-quarter earnings. Yet UPS ran into trouble again. This time, it added too much capacity, particularly for the first half of December, damaging its efficiency. As a result, it missed analysts' earnings expectations by a wide margin.

Preparing for more strong growth
This month, FedEx and UPS are once again looking to avoid the dual risks of too little and too much capacity during the peak holiday shipping season.

Both companies have been planning for another year of rapid e-commerce growth. In October, UPS stated that it expects to deliver more than 630 million packages between Black Friday and New Year's Eve: up more than 10% year over year. Meanwhile, FedEx expects to carry 317 million shipments between Black Friday and Christmas Eve, up 12.4% from a year ago.

FedEx in particular has been investing very heavily to handle e-commerce shipment growth. In the current 2016 fiscal year, it expects to spend $1.6 billion on cap ex to expand FedEx Ground capacity. That's up from capital spending of just $555 million for the ground segment in FY13.

FedEx has invested heavily to increase its ground-shipping capacity. Image source: The Motley Fool.

FedEx and UPS have also both implemented "dimensional weight" pricing for ground shipments in the past year. This effectively increases the price for shipping lightweight but bulky packages -- incentivizing shippers to use smaller boxes whenever possible. That should allow both companies to carry more packages per truck this year.

Finally, as a last resort, FedEx has warned shippers that it will put a cap on shipment volumes if necessary on peak days. FedEx won't accept more packages than it can reliably deliver on time.

So far, so good
From what we know so far, it looks like FedEx will have a second straight successful holiday season. The shift in consumer shopping habits toward e-commerce instead of in-store purchases has continued this holiday season. This should allow FedEx to meet or exceed its shipment growth forecast.

On the capacity side, weather has been fairly mild thus far. Meanwhile, FedEx's heavy growth investments -- which weighed on profitability this summer -- should pay off in a big way during the peak season.

FedEx could see some benefit from Thanksgiving/Black Friday weekend shipments in its second-quarter results, but this may be outweighed by added costs from the company's peak season preparations. Investors should mainly focus on any details about trends in December, which represents the bulk of the peak season and a bigger opportunity for profit growth.