What happened

Shares of Coursera (COUR -3.39%) stock rocketed to a 17.4% gain as of 12:07 p.m. EDT Wednesday despite the company having just reported Q2 2021 financial results that look "mixed" in the extreme.

On the one hand, Coursera blew away analyst targets for Q2 revenue, producing $102.1 million where Wall Street had expected only $91.5 million. On the other hand, though, Coursera appears to have missed analyst predictions on profit entirely. According to a writeup from TheFly.com this morning, instead of the predicted $0.11-per-share loss, Coursera lost $0.38 per share.  

A+ written in chalk on a blackboard

Image source: Getty Images.

So what

Wait, what? Coursera lost three times as much money as it was "supposed" to, and its stock is going up? At first glance, it certainly does look that way. So let me unravel the mystery for you.  

When analysts make earnings estimates, they most often refer not to earnings calculated according to generally accepted accounting principles (GAAP) but rather to pro forma earnings. And this fact can create some confusion among investors around earnings time as to whether a company "beat" or "missed" earnings.

So in the case of Coursera, analysts forecast that the company would lose $0.11 per share pro forma. But the earnings number TheFly and other financial outlets refer to -- the $0.38-per-share loss -- was the company's GAAP loss. If you back out all the one-time charges (or what analysts consider one-time charges) from Coursera's results, though, the company's pro forma loss for the quarter was only $0.05 per share.  

Or in other words, comparing apples to apples, this was not an earnings "miss," but an earnings "beat."

Now what

So in some respects, Coursera actually does appear to be performing better than it was expected to: With Q2 revenue rising 38% year over year and gross profit margins up 170 basis points, its Q2 loss was less than expected. What's more, management argues that "following our pandemic-related surge in 2020, we believe we are seeing sustained structural demand for online learning."

In support of that way of thinking, Coursera has raised its revenue guidance for both Q3 sales ($105 million to $109 million, ahead of analyst forecasts) and full-year 2021 sales as well -- now $402 million to $410 million, also well ahead of expectations.

And that, in a nutshell, is why the stock is going up.