O'Reilly Automotive (ORLY -0.01%), the parent company of O'Reilly Auto Parts stores, has been on a tear, with shares up more than 230% in the last five years. In June, the stock did a massive 15-for-1 split and has risen more than 10% since.

So, is O'Reilly a buy? If you're a growth investor, it looks like a very promising pick, but if you're a value investor, you might want to look elsewhere.

More growth in the tank

Shares of O'Reilly have been going up because the company has been growing rapidly. It's opening new stores at a fast rate, and expects to open a net total of 200 to 210 new stores in 2025, for a total of about 6,500 stores. That already makes it one of the largest auto parts stores by number of locations, just behind industry leader Autozone's (AZO 0.41%) 7,200.

However, O'Reilly still has plenty of room to grow. While it has a large presence in the U.S. Midwest and South, it's underrepresented in the Northeast, with fewer than 100 stores in New York or Pennsylvania, and no stores at all in Delaware, Maryland, or New Jersey. Recent economic trends seem likely to boost O'Reilly's growth potential even further. The stock looks like a good buy from a growth standpoint.

Nervous person in a yellow shirt holding a steering wheel.

Image source: Getty Images.

Priced at a premium

O'Reilly's incredible share price increase hasn't just beaten the market, it's also outstripped its fundamentals. The stock price has risen much faster than the company's rapidly growing revenue and profits. That means O'Reilly stock is much pricier now than it has been in the past. It's trading at 34 times forward earnings, compared to 25 times forward earnings two years ago.

Value investors might think that's too steep a price to pay. But several of O'Reilly's peers, including Autozone, have seen similar valuation increases, and you can always expect to pay more for an outperforming stock. O'Reilly looks like a buy for growth-focused investors.