Imagine investing $10,000 in a stock, then you sit back and watch the stock climb. Years go by, then decades. You check your portfolio balance: It's more than $5.5 million.

No imagination is required for such a lucrative outcome if you invested $10,000 in O'Reilly Automotive (ORLY 0.76%) at its initial public offering in April 1993. This stock is up almost 56,000% and is still a buy.

A line that's on fire and trending up.

Image source: Getty Images.

Oh, oh, oh, O'Reilly

If you're like me, you can't think about O'Reilly Automotive without hearing the lyrics to its jingle in your head, "Oh, oh, oh, O'Reilly... auto parts!" The auto parts retailer's growth through the years warrants a few "ohs."

Charles F. O'Reilly and his son, Charles H. "Chub" O'Reilly, Sr., launched O'Reilly Automotive in 1957. They started out with one store in Springfield, Missouri. Today, O'Reilly ranks as one of the largest automotive specialty retailers in the U.S., with a market cap of nearly $77 billion. The company operates 6,416 stores in 48 U.S. states, Puerto Rico, Canada, and Mexico.

O'Reilly serves both the do-it-yourself (DIY) and professional service-provider markets. Last year, roughly 52% of the company's sales came from DIY customers, with the remaining 48% from professional customers. The company's growth, though, has stemmed more from professional service-provider customers. The fragmentation in this market has provided a bigger opportunity for consolidation.

This successful track record has continued in 2025. O'Reilly stock is up by a double-digit percentage year to date and remained in positive territory even when the overall stock market plunged.

O'Reilly's challenges

Don't conclude that O'Reilly Automotive doesn't face any challenges, though. The company's net income in the first quarter of 2025 decreased 2% year over year, primarily due to higher selling, general, and administrative (SG&A) expenses.

O'Reilly president Brent Kirby said in the Q1 earnings call that the higher-than-expected SG&A costs were partly due to higher payroll and benefit costs, as well as higher maintenance expenses for some of its stores.

Kirby thinks the SG&A pressure seen in Q1 should be temporary but acknowledged, "[W]e are cognizant of the potential for incremental impacts to our cost structure, should we see an accelerated inflationary environment more broadly in the economy."

That comment about higher inflation in the economy was probably an indirect reference to the potential impact of President Trump's tariffs. O'Reilly CEO Brad Beckham addressed tariffs head-on in his comments in the company's Q1 press release, stating, "The changing tariff landscape brings with it a high degree of uncertainty, and the fluid nature of the implementation of tariff adjustments makes it difficult for us to predict the impact to our business and our customers."

The steep tariffs on Chinese imports to the U.S. could be especially problematic for O'Reilly. Around one-fourth of the products the company sells come from China.

Still a buy

Despite these challenges, I think O'Reilly Automotive is still a great stock for long-term investors to buy. Will it deliver another 57,000% gain over the next few decades? Probably not. However, O'Reilly could still be a solid winner for two main reasons.

First, more miles are being driven on older cars. The demand for aftermarket parts, supplies, equipment, and accessories will almost certainly grow as a result.

Second, O'Reilly has captured only a small fraction of its total addressable market, even with its tremendous success through the years. Beckham said in the company's Q1 call, "We believe we still have a ton of opportunity, and we intend to take market share both aggressively and profitably."

I think Beckham was right about the magnitude of O'Reilly's opportunity. And I think the company's track record shows that it can achieve the goal of expanding its market share.