Whole Foods Market reported an earnings beat and a slight miss on revenue after the closing bell Wednesday.
The upscale grocer posted adjusted earnings of 44 cents a share on revenues of $3.70 billion. Analysts expected Whole Foods to report earnings of about 41 cents a share on $3.74 billion in revenue, according to a consensus estimate from Thomson Reuters.
Whole Foods also said that total sales increased to $3.7 billion in the second quarter.
"We produced record sales and operating cash flow, and returned $144 million of capital to our shareholders. Through our improved cost structure and expense disciplines, we delivered strong EBITDA in a challenging sales environment," John Mackey, co-founder and co-CEO of Whole Foods, said in a statement.
Whole Foods shares were up more than 5 percent after the result, before giving back some of those gains. The stock was last up about 2 percent in after-hours trading.
Whole Foods said it saw comparable store sales decline 3 percent in the quarter. Analysts had expected same-store sales to fall 2 percent, according to a consensus estimate from FactSet.
The company also updated its forward guidance and said it now expects to "be at or below the low end of prior sales and earnings per share ranges, reflecting recent sales trends and additional investments in marketing and technology in the second half of the year."
Whole Foods said it now sees diluted full-year earnings of $1.53 a share. Analysts had previously forecast fiscal 2016 earnings of $1.55 per share, according to a consensus estimate from FactSet.
Shares of Whole Foods are down more than 40 percent in the last year as the company has struggled with its image of being too expensive.
In December, the supermarket chain agreed to pay a $500,000 settlement after being accused of overcharging its New York City customers. As part of the agreement, Whole Foods said it would implement new policies to ensure more accurate labeling and weighing of its produce.
Walter Robb, co-CEO of Whole Foods, told CNBC in November that the company is making progress with its plans to reduce prices, become more transparent and better communicate differences in quality standards.
Last summer, the upscale grocery chain introduced 365 by Whole Foods Market, a new store concept that promises to offer organic produce at more affordable prices.
In Whole Foods' Wednesday statement, Robb said that the first 365 location will open on May 25. Some analysts have raised concerns that the new stores will create internal competition, but Robb doesn't agree.
"We believe there is customer demand for both formats, and as a second growth vehicle, 365 allows us to attack the value-quality proposition in a new way, while maintaining the integrity the Whole Foods Market brand represents in the marketplace," he said.