The grocery-store industry is tough under normal conditions. Margins are thin, products can spoil, and effectively keeping costs down without hurting the customer experience is no walk in the park.

The COVID-19 pandemic was a boon for grocery stores as spending shifted away from restaurants, but now, spending patterns are getting back to normal. Combine that headwind with historically high inflation and recession fears, and you have the makings of a very difficult environment for grocery stores.

Growing profits in a tough environment

Sprouts Farmers Market (SFM 1.52%) did well during the pandemic, and the company's unique blend of small stores, a big produce section, and attribute-based products is more than holding up as consumer behavior changes. The company's second-quarter report looked good on every front.

Revenue jumped 5%, driven by a 2% rise in comparable-store sales, and gross margin ticked up a bit from the prior-year period. The company is seeing some customers trade down as the economic environment takes its toll, but it's not enough to really cause problems. Sprouts is actually seeing an uptick in sales of bulk products since customers can buy the exact amount they need.

Higher sales, an improved gross margin, and a lower share count led to earnings per share (EPS) of $0.57, up nearly 10% from the prior-year period. The company spent $65 million on share buybacks during the quarter and $1.3 billion since share buybacks began in 2015. Sprouts' market cap is around $3 billion, so this share-buyback activity is significant.

The company's outlook calls for more of the same for the rest of the year. It sees comparable sales rising 1% to 2%, with total sales growing by 4% to 5%, thanks to the opening of 15 to 17 new stores. Gross margin is expected to increase slightly over last year, and Sprouts plans to deliver earnings per share as high as $2.26. EPS came in at $2.10 in 2021, for comparison.

What makes Sprouts special

Instead of cavernous stores that sell just about everything, Sprouts keeps its stores relatively small. This keeps operating costs low, which is especially important when the economic environment is as volatile and unpredictable as it is today. In fact, the company plans to reduce the size of its new stores, which will knock down construction costs and lead to lower operating costs over time.

Sprouts fills its smaller stores with a lot of produce and attribute-based products. Around 70% of its products are attribute based -- think gluten-free, paleo, organic, grass-fed, vegan, etc. The company also offers plenty of grab-and-go meals, and the e-commerce business is thriving. Just over 11% of sales come from online pick-up and delivery, higher than in the pandemic years of 2020 and 2021.

Unlike bigger grocery-store chains that don't have much room to expand their store counts, Sprouts is just getting started. The company operates 378 stores and expects to open at least 30 new ones next year. Starting in 2024, Sprouts is targeting 10% annual growth in its store count. The company sees room for as many as 400 new stores in its expansion markets, which include California, Texas, and Florida.

Sprouts stock soared on Thursday following its second-quarter report, but the market still isn't giving this growing grocery-store chain enough credit. With a stock price hovering around $31 per share, Sprouts trades for less than 14 times the high-end of its full-year earnings guidance. If the company can hit its target of annual double-digit earnings-per-share growth, Sprouts stock could be worth a whole lot more down the road.