Now here's a puzzler for you. CarMax (NYSE:KMX) reported its fourth-quarter earnings on Wednesday, and the stock's up nearly 5% since -- far better than the S&P 500's half-percent showing. Yet far from turning in its first earnings beat of the year, as I had hoped, CarMax instead produced another earnings miss.

Quarterly profits got cut nearly in half to $0.10 per share, leaving CarMax with a meager $0.83 earned last year -- down 10% from 2006. Blame for the miss goes once again to the company's CarMax Auto Finance unit, which lost $1 million last quarter.

Not that I'm complaining
It all seems a bit strange. Not that I'm complaining -- I am, after all, a shareholder. (And in good company too, I might add. Warren Buffett's Berkshire Hathaway (NYSE:BRK-B) owns a big slug of CarMax stock, and our own Motley Fool Inside Value investing newsletter service has recommended it.) But it does get me curious whether there's anything behind the price spike ... or whether it's as likely as not to dissipate like a cloud of exhaust smoke.

Making sales and grabbing share
Turning from the numerical tables to focus on the prose portion of CarMax's earnings report, though, I think I now see what has investors so optimistic about CarMax. As you know, CarMax has made a strategic decision to sacrifice profit margins to secure sales and steal market share from rivals such as AutoNation (NYSE:AN) and Penske Automotive (NYSE:PAG). So if you're investing for the long haul with CarMax, you need to focus less on profits and more on whether CarMax achieves its twin goals of growing sales and stealing market share.

That's probably even easier than it sounds. If we know that automakers Ford (NYSE:F), GM (NYSE:GM), and Toyota (NYSE:TM) are selling fewer cars today than they did in yesteryear, chances are that anysame-store sales growth at CarMax indicates market-share capture.

Here, then, are the reasons that CarMax's share price deserves its recent upshift: CEO Tom Folliard says that sales were "stronger than we anticipated" on consumer traffic described as "healthy." Having promised a 2% rise for the year, CarMax in fact delivered 3% comps growth for both the fourth quarter of 2007 and the year. And in case any doubts remain as to what that means, Folliard assured us that CarMax "continued to gain market share in the late-model used-vehicle market."

Foolish takeaway
I'm not sure a 3% rise in comps, and an unquantified gain in market share, justifies a full 5% bump in the stock price. But it does tell us CarMax is headed in the right direction.