Web-based software maker posted a $3.8 million third-quarter net loss Thursday on higher expenses.

Despite faring better than Wall Street expected, the company saw its stock plunge in extended-hours trading after it said fourth-quarter earnings may fall short of estimates.

The loss for the August-through-October period amounted to 3 cents per share, compared with a profit a year earlier of $21.1 million, or 15 cents per share.

Results for the quarter included about $57 million in stock-based compensation expense. Excluding that and other items, Salesforce said adjusted earnings were 34 cents per share.

Revenue was $584.3 million, up 36 percent from $429.1 million.

Analysts polled by FactSet Research expected adjusted earnings of 31 cents per share on revenue of $572 million.

The company anticipates fourth-quarter revenue of $620 million to $624 million, which would handily beat the Wall Street estimate of $610 million. But it pegged adjusted earnings at 39 cents to 40 cents per share, suggesting it may fall a penny short of analysts' estimate of 40 cents per share. The company has a history of topping expectations.

Salesforce shares fell $7.32, or 5.8 percent, to $118.77 in after-hours trading following the release of the earnings report. In the regular session, they fell $5.67, or 4.3 percent, to $126.09 amid a decline in the broader market.