Shares of Palantir Technologies (PLTR 3.73%) were up 18.6% as of 1 p.m. ET Thursday after the data analytics software company announced better-than-expected quarterly results and strong forward guidance.

Palantir's revenue grew 17% year over year in the third quarter to $558.2 million, and it booked GAAP net income of $71.5 million, or $0.03 per share, swinging into the black from a loss of $0.06 per share in the year-ago period. On an adjusted (non-GAAP) basis, Palantir delivered earnings of $155 million, or $0.07 per share. Analysts, on average, were only expecting adjusted earnings of $0.06 per share on revenue of about $555 million.

On Palantir's potential S&P 500 inclusion, commercial sector growth

In his quarterly letter to shareholders, Palantir CEO Alex Karp noted the company is now eligible for inclusion in the S&P 500 -- "a milestone that we have been working toward and knew was within reach." Still, Karp added that the company's "focus on profitability ... will not interfere with our broader ambition and the growth of our business overall."

U.S. commercial sector revenue grew 33% year over year to $116 million -- an encouraging shift for a business that has historically relied on landing lucrative government and military contracts to drive growth.

What's next for Palantir stock?

Looking ahead, Palantir raised its full-year outlook to call for revenue between $2.216 billion and $2.220 billion (up from $2.212 billion previously). Palantir also increased its guidance for adjusted income from operations to be between $607 to $611 million (from at least $576 million before), and management continues to expect positive GAAP net income in each quarter of the year.

In the end, this was a solid beat-and-raise performance punctuated by a shift to sustained profitability and outsized growth and diversification from the commercial sector. And investors are bidding Palantir's stock up in consequence.