Auto parts companies have had a leg up on other automotive industry stocks during economic rough patches. That's because major automakers struggle when sales of new vehicles decline in the U.S., and dealership groups and vehicle parts suppliers feel the aftershocks of that scenario. Auto parts retailers, however, have largely benefited, even during bad times, as the average age of vehicles rises and repairing vehicles becomes more complex and costly.

O'Reilly Automotive (ORLY 0.57%) is no stranger to success in recent years. Let's dig into some highlights and important takeaways from the company's recent first quarter.

Q1 highlights
O'Reilly's sales moved 10% higher during the first quarter to $2.1 billion, up from $1.9 billion during last year's first quarter. Gross profit also posted a healthy 11% improvement over the prior year to $1.1 billion, or 52.4% of sales, while operating income jumped 19% to $419 million. O'Reilly's bottom line was solid, too, reporting net income of $255.4 million, or $2.59 per share, which topped analysts' estimates of $2.49 per share. One highlight for investors was the company's 6.1% increase in comparable-store sales, which marks its 10th consecutive quarter of comparable-store sales growth greater than 5%.

Records are nice
That brings us to one of the takeaways from the first quarter: a record-high operating margin of 20%. O'Reilly has been very successful with its footprint of more than 4,600 stores in 44 states, roughly 300 hub stores and 26 distribution centers, with a 27th coming online this month. It uses its footprint to quickly shift around inventory to meet customer demand while enabling stores to keep less stock of slower-turning inventory. That's helped drive the company's operating margins higher over the long term.


Chart by author. Data source: O'Reilly's 2016 Investor Presentation. 2008-2011 excludes impact of CSK acquisition charges and DOJ investigation charges.

The good news is that there could still be some growth as the company's own house-label products gain acceptance with consumers.

Share buyback details
Over the past half-decade, O'Reilly has remained committed to lowering its shares outstanding, and it's done so at a pretty rapid rate.

ORLY Chart

ORLY data by YCharts.

During the first quarter, O'Reilly repurchased 1.2 million shares of its common stock at an average price per share of $254.02, which checks in for a total of $313 million. In total, the company has repurchased 52.7 million shares of common stock under the program, which began in January 2011. It's been an effective repurchase program, with the average stock repurchase price checking in at $108.84, totaling a $5.74 billion investment.

What gives?
Despite the company topping estimates during the first quarter, shares moved slightly lower. Much of that has to do with the guidance that management gave during the conference call. O'Reilly estimates its second-quarter EPS will check in between $2.54 and $2.64 per share, which is well below analysts' estimates of $2.77 per share. That guidance includes a non-cash impact from a new supplier contract resulting in LIFO (last-in, first-out) inventory headwinds of roughly $23 million.

"As we have commented on in the past, our gross margin results can face headwinds relating to merchandise acquisition cost improvements, which is a positive driver to our long-term gross margin expansion, but can create short term pressure on our gross margin results due to reducing our inventory value to the lower acquisition cost in accordance with our LIFO accounting," said O'Reilly's president and CEO, Greg Henslee, in a press release.

Ultimately it was a solid quarter for O'Reilly investors, as the company continues to prove it can consistently improve its operating margins and return value to shareholders through its share repurchase program.