Shares of auto-parts retail chain AutoZone (AZO 0.03%) hit new all-time highs on Tuesday after the company reported financial results for its fiscal second quarter of 2024. As of 1:45 p.m. ET, AutoZone stock was up almost 6%.

Another good quarter for shareholders

In Q2 (which ended on Feb. 10), AutoZone generated net sales of $3.9 billion, which was up almost 5% from the same quarter of last year. The growth came from opening new stores and a modest 3% increase in same-store sales.

AutoZone's sales were basically what the market was expecting, but its profits outperformed. In Q2, the company had an operating-profit margin of 19.3%. That's up from an operating margin of 18.2% in the prior-year period.

Higher margins led to higher profits for AutoZone. And with its profits, the company did what it does best -- buy back stock. It used $224 million to repurchase shares in Q2. This continues its long-term trend of share-count reduction, which has consistently boosted its earnings per share (EPS), as the chart below shows.

AZO Average Diluted Shares Outstanding (Quarterly) Chart

Chart doesn't reflect Q2 2024 financial results. AZO Average Diluted Shares Outstanding (Quarterly) data by YCharts.

What's next for AutoZone stock?

There's nothing complicated about AutoZone's approach to market-beating stock performance. It runs a tight ship, earns a strong profit, and buys back stock. As long as the company keeps this simple formula in place, it will be hard to bet against AutoZone stock -- it's up over 200% in just the last five years.

Indeed, it plans to keep the formula in place. As of the end of Q2, AutoZone still had $2.1 billion remaining in its share repurchase authorization. That's good for about 4% of outstanding shares at today's price, which can keep boosting its earnings per share in the coming year.