Harley Finkelstein, COO, Shopify

Scott Mlyn | CNBC

Shares of Shopify surged as much as 9% on Thursday following its second quarter earnings report. The move added $3.2 billion to the company’s market cap, bringing it to $38.8 billion.

Shopify reported better-than-expected earnings and revenue for the quarter. The company earned 14 cents per share, on an adjusted basis, topping the 2 cents per share expected by analysts surveyed by Refinitiv. Shopify also reported revenue of $362 million, surpassing the $350 million forecast by analysts.

The company now expects to report revenue of $377 million to $382 million for the third quarter, beating Wall Street’s forecast of $374 million. Shopify also lifted its full-year revenue forecast, projecting revenues between $1.51 billion and $1.53 billion, compared to its prior full-year forecast of $1.48 billion to $1.50 billion.

Shopify’s stock has been on a tear, skyrocketing just over 150% year to date. By comparison, the S&P 500 is up 20% year to date.

The Canadian e-commerce company, which helps small businesses set up online stores and sell products directly to consumers, has recently made investments in fulfillment and other tools to attract more merchants to its platform.

“Our strong performance in the second quarter reflects the success of our ongoing activities and investments to help merchants start selling, sell more and sell globally,” Shopify CFO Amy Shapero said in a statement.

Analysts have said Shopify’s new fulfillment centers should help give the company a greater competitive edge against e-commerce rivals like Amazon, eBay and Walmart.