It's been less than a year since CarMax (KMX 1.77%) took its digital buying platform completely online, but shareholders are already seeing benefits from the move. The used car retailer on Thursday announced record sales through late August, including in the e-commerce channel.

CarMax's results weren't all positive, though, as increasing costs reduced profitability. But the chain is still finding plenty of resources to fund its new store launches as it works to build on its market-share lead in this fragmented industry.

Let's take a closer look at the summer operating trends as reported in the company's second-quarter earnings, released Thursday.

A father and daughter shopping for a used car together.

Image source: Getty Images.

CarMax reported sales wins, especially in e-commerce

Sales volumes landed at 420,000, up 20% compared to a year ago. That prior-year period was depressed thanks to the pandemic, but CarMax also set a Q2 record in its retail segment and an all-time quarterly record in wholesale sales. Both increases also came with higher average selling prices, which contributed to a 49% overall sales spike in the quarter. Most investors who follow the stock were expecting more modest revenue growth.

The digital selling platform had an especially strong quarter. Car shoppers embraced CarMax's online appraisal product for their trade-ins, and online transactions jumped to 28% of the total business, up from 18% a year ago. That figure has room to grow over time as CarMax makes the online buying process more convenient.

CarMax had some profit hits and misses

CarMax enjoyed an unusually strong pricing environment thanks to high demand, tight supply, and rising prices for new cars. Yet gross profit per vehicle dipped slightly thanks to spiking expenses. Gross profit landed at $815 million, or 10% of sales, compared to $752 million, or 14% of sales a year ago.

That shift was the main reason why overall profit margins dropped, with net income hitting 3.6% of sales compared to 5.5% last year. That's a step backward compared to the record profitability CarMax achieved last quarter.

Management said its priority is improving the shopping experience -- even if that leads to weaker earnings in the short term. "We continue to make investments in growth and innovation for our customers' benefit," CEO Bill Nash said in a press release.

Looking out to 2022

CarMax's financing arm got a lift from the booming economy, which should help support the business in the second half of its fiscal year. The chain is entering that period with a solid inventory position, too.

The stock declined immediately following the report, likely because Wall Street was hoping to see more robust earnings growth thanks to soaring used car prices. Yet CarMax is taking a long-term approach to maximizing profits by restraining its price hikes and investing aggressively in its online platform.

Those moves, along with the addition of 10 new stores, should help it push market share above 5% of the fragmented U.S. used car industry this year. But CarMax has much higher ambitions over time. Those growth targets rely on the booming digital selling platform, which is racing toward accounting for one-third of the wider business roughly a year after its launch. Shareholders should see solid returns by focusing on that positive long-term picture over the volatile earnings trends in late 2021.