Getty

Shares of Salesforce (CRM - Get Report)  were rising more than 6% after hours Thursday after the company reported second quarter earnings and revenue ahead of expectations while also raising its full year guidance. 

The company reported a 22% increase in revenue to $4 billion while yielding earnings of 66 cents per share, though the company said that a settlement loss to a reseller impacted its bottom line by 16 cents per share. Analysts were expecting the company to report revenue of $3.95 billion and earnings of 47 cents per share. 

"With our Customer 360 vision, Einstein AI and the millions of Trailblazers innovating on our platform, Salesforce has never been better positioned for the future," said CEO Marc Benioff.

"An enormous wave of digital transformation is sweeping across every industry, and major brands, like FedEx, AXA and Unicredit, turned to Salesforce in the quarter to propel their growth," said Keith Block, co-CEO, Salesforce. 

The company also increased its full year revenue guidance to $16.9 billion from its previous view of $16.75 billion. Analysts expect the company to generate $16.66 billion in revenue. 

Salesforce also gave third quarter revenue guidance of between $4.44 billion and $4.45 billion on earnings between 65 cents and 66 cents per share. Analysts are expecting the company to report revenue of $4.25 billion on earnings of 61 cents per share. 

Analysts had much lower expectations for the company than they did a year ago when Salesforce reported quarterly earnings of 71 cents per share on sales of $3.28 billion. 

Salesforce shares are up only 2% over the past 12 months though its trading range during that period has swung widely between $113.60 and $167.56 per share. 

Salesforce shares were up 6.9% to $158.57 after hours on Thursday. 

Salesforce is a key holding in Jim Cramer's Action Alerts PLUS charitable trust

Save 57% With Our Labor Day Sale. Join Jim Cramer's Action Alerts PLUS investment club to become a smarter investor! Click here to sign up!