What happened

Shares of Cloudflare (NET 1.44%) were up by 12.9% as of 10:48 a.m. ET Friday after the cybersecurity company soundly beat expectations with the Q2 report it delivered Thursday evening.

Analysts had forecast that it would earn $0.07 per share on $305.6 million in revenue for the second quarter. Instead, Cloudflare earned $0.10 per share, and its sales were ahead of expectations at $308.5 million.  

So what

The news wasn't all good. Turns out, Cloudflare's estimate-beating "earnings" were of the pro forma variety -- i.e., not calculated according to generally accepted accounting principles (GAAP). The GAAP result for the quarter was a $0.28 per share loss -- a loss 40% deeper than Cloudflare suffered in the prior-year period.

Still, sales did soar remarkably -- up 32% year over year. Operating losses were only 18.2% of revenue, an improvement from last year's Q2 operating margin of negative 27.5%. And free cash flow turned solidly positive -- $20 million for the quarter, versus a cash burn of $4.4 million in Q2 2022.  

Now what

Things are continuing to look up for future quarters. Turning to guidance, Cloudflare management said its Q3 sales will be at least $330 million (and could be higher), versus Wall Street's consensus forecast for $329.4 million. The company is also forecasting another $0.10 per share profit (albeit pro forma), while analysts are only predicting $0.09 per share.

For the full year, Cloudflare says sales will exceed analysts' consensus expectation of $1.28 billion, and (pro forma) profits will be about $0.37 per share, $0.03 per share more than the consensus expectation.

All things considered, I'm still hard-pressed to recommend Cloudflare stock at its valuation of 260 times trailing free cash flow, and infinity times GAAP profits that remain to be earned. That being said, the company is still growing sales nicely, operating losses are slimming, and free cash flow, while low, is at least positive.

In the cybersecurity space, I still prefer Palo Alto Networks, with its positive profits and attractive valuation based on free cash flow. But things are looking modestly brighter for Cloudflare, too, and it makes sense that investors would be buying the stock on this latest news of incremental progress.