Cloud computing company Inc. said Thursday that its second-quarter loss more than doubled from a year ago as costs rose faster than revenue.

Although the results still beat analyst expectations, its outlook for the current quarter and the rest of the year was mixed relative to expectations. Its shares fell 5.5 percent in after-hours trading following the earnings release.

The loss in the three months to July 31 came to $9.8 million, or 7 cents per share, compared to a loss of $4.3 million, or 3 cents per share, a year ago.

Excluding the cost of compensating executives with stock and other items, adjusted earnings came to 42 cents per share, beating the 39 cents expected by analysts polled by FactSet.

Revenue rose 34 percent to $732 million, also beating the $728 million expected.

For the current quarter, the company forecast adjusted earnings of 31 cents to 32 cents per share, which is below the 34 cents analysts were looking for. It expects third-quarter revenue of $773 million to $777 million, which evenly bracketed the average $770 million expected by analysts.

Salesforce said it expects full-year adjusted earnings of $1.48 to $1.51 per share. The midpoint is below the $1.51 expected by analysts. It also forecast annual revenue of $3.03 billion to $3.04 billion, above the $3.02 billion that analysts had forecast.

In June, Salesforce said it was buying the marketing company Buddy Media for $689 million, in a deal that underscores the growth in both social media and the delivery of software over the Internet.

Salesforce has been looking to add more products that can help its customers manage their marketing campaigns. The company makes software designed to make it easier for its clients to track their current customers' needs and identify new sales opportunities.

Its shares were off $7.77 at $139 in after-hours trading.