Shares of auto parts retailer O'Reilly Automotive (ORLY 0.67%) sank on Thursday after the company reported financial results for the first quarter of 2024. As of noon ET, O'Reilly stock was down 4% but it had been down as much as 8% earlier in the day.

A good quarter for O'Reilly despite the negative reaction from investors

I readily admit that the negative reaction to O'Reilly's financial results from investors is a head-scratcher. Many headlines say that O'Reilly stock is down because of disappointment regarding its profit outlook. However, the company raised its outlook for profits today. Therefore, that explanation doesn't seem to hold water.

To be clear, the numbers looked good for O'Reilly. The company's sales increased 7% year over year to nearly $4 billion, bolstered by strong same-store sales growth of over 3%. Moreover, its net income was up 6% to $547 million.

Granted, one might nitpick O'Reilly because its sales increased more than its profits in Q1, meaning its profit margin went down. But the company still had a Q1 profit margin of almost 14%, which is nothing to sneeze at.

What should investors do now?

O'Reilly is one of the very best auto parts retailers and the business is fine. However, investors might want to consider its valuation today before buying shares. The company expects about $2 billion in free cash flow this year, meaning it trades at about 31 times this year's free cash flow. As the chart below shows, that's high compared to its 10-year average.

ORLY Price to Free Cash Flow Chart

ORLY Price to Free Cash Flow data by YCharts

O'Reilly routinely buys back its stock with profits to boost shareholder value. Its share count is down about 24% over the last five years. In coming quarters, management will keep repurchasing shares as it's done in the past. But when the stock trades at a higher valuation, like it does right now, those repurchases aren't quite as effective.

For shareholders, there's no reason to worry about O'Reilly's business -- it's doing well. But some investors might want to wait on the sidelines before starting a position, waiting for a better valuation.