Source: FedEx.

Shares of FedEx (NYSE:FDX) shot up 6% to close at $148.95 after the company reported revenue and earnings for the fourth quarter of its 2014 fiscal year on June 18. In light of this, some investors might be thinking that now is a good time to cash in and, possibly, go with rival United Parcel Services (NYSE:UPS). But does FedEx still have plenty of room to run?

FedEx beat on both the top and bottom lines
For the quarter, FedEx reported revenue of $11.84 billion. This came in 3.5% above the year-ago figure of $11.44 billion, and the logistics giant also beat the analyst estimate of $11.66 billion by 1.5%. In its press release the company attributed this to increased volume, primarily in its FedEx ground segment, which saw sales increase 8%, from $2.78 billion to $3.01 billion, and its FedEx freight segment, where sales jumped 12%, from $1.39 billion to $1.55 billion.

 MetricActualForecastLast Year's
Revenue $11.84 billion $11.66 billion $11.44 billion
Earnings per share $2.46 $2.36 $2.13

Source: Yahoo! Finance.

From an earnings standpoint, the company did even better. For the quarter, management reported earnings per share of $2.46, surpassing the analyst estimate of $2.36 by 4% and smashing through the $2.13 the company reported in last year's quarter by over 15%. This improvement resulted, in part, from the increase in sales booked by the business, but also resulted from cost reductions, mostly in its Salaries and Employee Benefits category, which declined from 36.7% of sales to 35.2%.

But is UPS any better?
Over the past five years, FedEx has done pretty well for itself. Between 2009 and 2013, the logistics company saw its revenue soar 25%, from $35.5 billion to $44.3 billion. According to the company's financial statements, most of this improvement took place across two of its segments: FedEx Express and FedEx Ground.

During this five-year period, FedEx's Express segment grew sales by 21%, from $22.4 billion to $27.2 billion, effectively comprising 55% of the company's jump in sales. On a percentage basis, the business' FedEx Ground segment performed even better, as demonstrated by the 50% jump in revenue, from $7 billion to $10.6 billion, that management reported.

(Revenue in billions) 2013 2012 2011 2010 2009
FedEx $44.3 $42.7 $39.3 $34.7 $35.5
UPS $55.4 $54.1 $53.1 $49.5 $45.3

Sources: FedEx and UPS.

UPS also performed well over its five most recent fiscal years. Between 2009 and 2013, the logistics company saw revenue climb 22%, from $45.3 billion to $55.4 billion. This jump in revenue largely resulted from revenue increasing 21%, from $28.2 billion to $34.1 billion, in its U.S. domestic package segment, but also resulted from a 28% rise in sales, from $9.7 billion to $12.4 billion, in its international package segment.

Source: UPS.

From a profitability perspective, FedEx's metrics came in even stronger during this five-year period, as profit rose from $98 million to $1.56 billion. After taking out impairment charges in both years, FedEx's net income rose 36% from $1.20 billion to $1.62 billion. On top of seeing its bottom line rise because of increased revenue, FedEx also benefited from its aggregate cost of goods sold and operating expenses falling from 94.5% of sales to 94%.

(Net Income in billions) 2013 2012 2011 2010 2009
FedEx $1.56 $2.03 $1.45 $1.18 $0.10
UPS $4.37 $0.81 $3.80 $3.34 $2.15

Sources: FedEx and UPS.

During a similar five-year period, UPS did even better from a profitability perspective. Between 2009 and 2013, the company saw its net income soar 122% (93% excluding its impairment charges) from $2.15 billion to $4.37 billion. In part, this improvement resulted from the company's increase in sales, but it received the biggest contribution from its aggregate cost of goods sold and operating expenses, which plummeted from 91.6% of sales to 87.3%.

Foolish takeaway
Based on the data provided, Mr. Market has been very happy with FedEx's performance, and justifiably so. In addition to beating both revenue and earnings estimates, the company has continued its long-term trend of growth, which suggests that its future is bright. Moving forward, the logistics business will likely be a good prospect for the Foolish investor who aims for growth, but for those who are more interested in margin improvement, UPS might make for a better play.