DigitalOcean (DOCN 29.01%) stock posted massive gains in Tuesday's trading. The cloud service specialists' share price rose 28.8% in a daily session that saw the S&P 500 index dip 0.5% and the Nasdaq Composite index fall 0.7%.

DigitalOcean published its second-quarter results before the market opened this morning, and sales and earnings in the quarter beat Wall Street's expectations. In addition to artificial intelligence (AI) catalysts leading to better-than-expected performance in Q2, the company issued a significant raise for its full-year performance outlook.

A flaming chart line rising.

Image source: Getty Images.

DigitalOcean's Q2 results have changed the valuation picture

DigitalOcean's recent business momentum has proven to be significantly stronger than Wall Street expected. The company posted earnings per share of $0.59 on revenue of $218.7 million in the second quarter. Earnings were $0.12 per share better than the average analyst target, and sales were roughly $2.1 million ahead of the consensus analyst target. Revenue was up roughly 13.6% year over year, and management pointed to sales more than doubling for AI and machine learning services as a key driver for the performance beats in Q2.

What's next for DigitalOcean?

DigitalOcean expects strong sales momentum to continue in the near term. The company set guidance for Q3 sales to be between $226 million and $227 million -- good for growth of roughly 14% at the midpoint of the target range. Meanwhile, full-year sales are projected to come in between $888 million and $892 million, up from its previous guidance for sales of between $870 million and $890 million.

The midpoint of the new guidance range suggests annual revenue growth of roughly 14% year over year, representing a meaningful increase from the previous midpoint target for sales growth of 13%. Even better, the bump up in expected sales is being driven by the highly valued AI and machine learning categories.