FedEx Corp's quarterly profit and outlook beat forecasts as higher shipping rates and tight cost controls more than offset a slowing economic recovery and high fuel prices.

The company will be spending more on technology and on fuel efficient aircraft, helping to increase revenue per package. Its shares gained 3.1 percent on Wednesday.

Our actions to improve yields continue to drive revenue and earnings growth across our transportation segments, said FedEx Chief Financial Officer Alan B. Graf.

Even with higher planned capital spending in fiscal 2012, margins, cash flows and returns are expected to improve year over year.

The No. 2 package delivery company has been able to pass through higher costs via fuel surcharges and still has room to raise prices without a major push-back from consumers, according to most analysts.

Pricing and expense control drove FedEx earnings up even as it navigated harsh weather, an economic soft-patch and supply chain disruptions caused by Japan's earthquake and lofty fuel costs, said Peter Nesvold, a Jefferies & Co analyst.

This company is guiding to 30 to 40 percent earnings growth in a 2.5 to 3 percent GDP backdrop, he said. That's pretty amazing. You don't hear a lot of large-cap, non-energy companies guiding to that type of growth, and if anything this company is vulnerable to higher energy prices.

FedEx and No. 1 package delivery company United Parcel Service are considered to be economic bellwethers based on the sheer volume of goods they move. FedEx handles packages in its trucks and planes equivalent to about 4 percent of U.S. gross domestic product and 1.5 percent of global GDP.

Net profit rose 33 percent to $558 million, or $1.75 per share in the quarter that ended May 31, from $419 million, or $1.33 per share a year ago.

Analysts, on average, forecast a $1.72 per-share profit, according to Thomson Reuters I/B/E/S.

(For a related graphic see http://r.reuters.com/vyn32s)

FedEx forecast its fiscal 2012 profit rising to $6.35 to $6.85 per share -- leaving room for oil price volatility, Graf said. The mid-point of $6.60 topped Wall Street forecasts.

There's no question we went through a brief soft patch in the economy, FedEx CEO Fred Smith told analysts on a call, adding that gasoline costing around $4 a gallon starts to erode consumer spending.

Smith said the combination of rising fuel prices, the devastation in Japan and consumer sentiment all contributed to the slowing of the economic recovery. However, he expects a turnaround now that crude oil prices are retreating.

FedEx anticipates consumer spending, industrial production and gross domestic product will improve in the second half of this calendar year. That forecast is based on the current market outlook for fuel prices and continued moderate global economic growth.

The Fed on Wednesday said the pace of U.S. economic recovery was slower than it had expected, though mainly due to temporary factors.

VOLUME, REVENUE UP

FedEx Express and the less expensive Ground segments, which account for more than 80 percent of company revenue, had double-digit revenue growth in the quarter.

Revenue per piece grew by at least mid single-digits due to fuel surcharges and increased weight per package.

Fast-growing e-commerce drove up FedEx's SmartPost average daily volume 24 percent as revenue per package rose 8 percent. SmartPost involves shipping packages to the U.S. Postal Service, which in turn delivers to residential customers.

FedEx's freight division posted a long-awaited return to profitability after two company segments were combined.

FedEx said it plans to spend $4.2 billion in fiscal 2012, which includes the delivery of aircraft, payments toward future aircraft deliveries and investments in facilities, vehicles and technology.

Capital spending in fiscal 2011 was $3.4 billion, of which $2 billion was for aircraft and related equipment.

The company has been upgrading its fleet to more fuel- efficient aircraft.

Fourth-quarter revenue rose 12 percent to $10.55 billion from $9.43 billion a year ago, Memphis, Tennessee-based FedEx said on Wednesday. Wall Street analysts expected $10.4 billion in revenue, on average, according to Thomson Reuters I/B/E/S.

Adjusted earnings were $4.90 per share in 2011, up from $3.76 a year ago and in line with the consensus forecast.

FedEx shares rose 3.1 percent, or $2.84, to $91.95 in afternoon trading on the New York Stock Exchange. The shares are off 1.5 percent so far this year. UPS's shares were up 1.3 percent on Wednesday.

Ryan Allen, portfolio manager at AMBS Investments in Grand Rapids, Michigan, owns FedEx shares and has a 12-month $110 price target.

It's a good story -- a combination of better yield management, in other words pricing, and improving operating leverage, he said.

(Reporting by Lynn Adler, editing by Dave Zimmerman and Maureen Bavdek)