For the quarter ended Aug. 31 the Richmond, Va., company reported earnings jumped 28% to $1.79 a share from $1.40 in the year-earlier quarter. Revenue rose 3.3% to $5.37 billion from $5.2 billion.
Analysts surveyed by FactSet were expecting profit of $1.10 a share on revenue of $5.22 billion.
The company's diverse business model enabled it to "capitalize on the improved market environment," Chief Executive Bill Nash said in a statement.
In the quarter CarMax completed the rollout of its omnichannel offerings, enabling customers to shop online and in person.
CarMax reported used-vehicle unit sales increased 3.9% in the quarter. Comparable sales of individual cars rose 1.2% from a year earlier.
The company said that positive comparable sales in July and August "more than offset" the high-single-digit negative comparisons from June when the coronavirus pandemic and lockdown were more severe.
Gross profit from wholesaling of vehicles rose 23% in the quarter.
In the first quarter, CarMax paused its store-expansion strategy. Now the company says it expects to open eight to 10 new stores in fiscal 2022.
CarMax shares at last check were off 9% at $96.43.