The bad economy has been a boon for do-it-yourself auto parts repair companies such as AutoZone (AZO 1.78%) and O'Reilly Automotive (ORLY 1.16%). Both of them are continually finding new ways to appeal to customers while finding new locations to set up shop, and shareholders have been awarded with record-high stock prices.

O'Reilly Automotive and AutoZone both have market caps around $18 billion, but one looks a bit more attractive than the other.

Man picking out hub caps at the auto parts store

Image source: Getty Images.

Taking a look under the hood
For the quarter ended Aug. 30, AutoZone reported a 4.5% increase in calendar-adjusted sales to $3.0 billion. Same-store sales rose 1.5%. Net income jumped 7.4% to $374 million, while diluted earnings per share jumped 16% to $11.28 partly due to the effect of stock buybacks.

For O'Reilly Automotive, percentage growth in the most recent quarter was more pronounced. Sales leaped 9% to $1.88 billion. Same-store sales rose 6.2%. Net income climbed 16% to $217 million while diluted earnings per share shot up 22% to $2.06, again partly from the effect of buybacks. 

AutoZone is the bigger company, with 5,391 stores, while O'Reilly ended the quarter with 4,311 stores. It's not a monster difference, which means AutoZone is doing much better in sales and net income on a per-unit basis, while O'Reilly's faster growth suggests it may be gaining a bit of market share at AutoZone's expense.

Aiming for excellent customer service
CEO Bill Rhodes of AutoZone explained the results in the company press release  were due to providing "exceptional customer service and trustworthy advice." 

Similarly, CEO Greg Henslee of O'Reilly stated in his company's press release an "unwavering commitment to providing excellent customer service." 

This type of focus from management and message delivered may help set each chain apart from smaller chains and mom and pops but not necessarily as much from each other.

Both companies are growing in the neighborhood of 200 new locations per year and in the most recent quarter AutoZone notched roughly 27% more in per-unit sales than O'Reilly. This means O'Reilly's game of catch-up is more focused on same-store sales gains, but it would seem it still has a way to go just to be on par with AutoZone. Both companies sport gross profit margins close to 50%, so the race is really all about sales.

How different can retail auto parts companies be?
One thing that differentiates the two companies is where they are expanding. Both are expanding in the United States, but only AutoZone is expanding internationally as well. For example, in the recent quarter it opened its 400th location in Mexico, where O'Reilly doesn't have a presence and no current opportunity to take market share there. Autozone also has five stores in Brazil.

During the recent conference call and without offering details, AutoZone execs remarked that its Mexico stores "continue to perform well" with returns and profit growth in line with company expectations. The company expects ample unit growth opportunities internationally as well as domestically..

All in all, AutoZone trades with a lower P/E than O'Reilly yet what appears to be the same or better growth prospects. They're both growing units at around the same number annually, but the market is therefore pricing O'Reilly to grow significantly big enough to match AutoZone on per-unit sales.  Both are great companies, but I lean more toward AutoZone as the better buy since they both have similar market caps yet AutoZone has less speculation built in or needed in its stock price.