What happened

Shares of United Natural Foods, Inc. (NASDAQ:UNFI) were jumping today after the organic food distributor posted better-than-expected earnings results in its fourth-quarter earnings report.

United Natural Foods said adjusted earnings per share rose from $0.70 a year ago to $0.72, beating estimates at $0.69. That and solid guidance for fiscal 2018 were enough to lift the stock 9% as of 11:05 a.m. EDT.

A box surrounded by a variety of vegetables.

Image source: Getty Images.

So what 

On the top line, revenue increased 5.7% in the period to $2.34 billion, aided by the acquisition of Haddon House Food Products and Gourmet Guru. Still, that result came up short of expectations at $2.37 billion.

Gross margin, a key figure in the wholesaling business, ticked up 15 basis points to 15.75%. CEO Steven Spinner said, "Our performance in fiscal 2017 demonstrated our steadfast focus on serving our customers and managing our business in a challenging and deflationary operating environment."

Now what 

Indeed, times have been tough for suppliers like United Natural Foods and grocers as food deflation and the commoditization of organic food have crimped margins. The stock also plunged after Amazon said it would buy Whole Foods, for which United Natural Foods is a key supplier. The stock, which was once a reliable winner, has lost more than half of its value since peaking in 2015.

Still, its outlook for fiscal 2018 was solid despite the headwinds above. The company is calling for revenue to increase by about 5% this year and EPS to rise by 6%.  The $2.72 midpoint of its EPS guidance was better than analyst forecasts of $2.68.

Considering the stock's recent struggles, that was enough to prompt cheers from investors.

Jeremy Bowman has no position in any of the stocks mentioned. The Motley Fool owns and recommends Amazon. The Motley Fool has a disclosure policy.