What happened

Shares of Tesla (NASDAQ:TSLA) are leaping higher on Thursday. The stock rose as much as 11.2% during the trading day. But as of 8:24 a.m. EDT, the stock was up 5.3%.

The stock's gain follows the electric-car maker's blowout third quarter, which included a surprise profit, as well as revenue and earnings per share that were significantly above consensus analyst forecasts.

Tesla factory in Fremont, California.

Tesla factory. Image source: author.

So what

Driven primarily by soaring Model 3 deliveries, Tesla's revenue jumped from $3.0 billion in the year-ago quarter to $6.8 billion. This was above a consensus analyst estimate for revenue of $6.3 billion. 

Surging sales and improving economies of scale helped Tesla swing from a loss per share of $3.70 in the year-ago quarter to earnings per share of $1.75. Profitability was helped by the Model 3's improving gross margin, which went from "slightly positive" in Q2 to more than 20% in Q3. Non-GAAP earnings per share was $2.90 -- crushing analysts' average forecast for a loss of $0.19 per share. 

Tesla also impressively booked meaningful free cash flow, or cash from operations less capital expenditures, of $881 million.

Now what

Looking ahead, Tesla expects a further increase in Model 3 deliveries and production in Q4, and it expects to remain profitable on a GAAP basis during the period.

"As we have transformed from a 100,000 unit per year carmaker into a ~340,000 unit per year carmaker, our earnings profile has flipped dramatically," Tesla said about the period in its third-quarter shareholder letter.

Tesla hopes its Model 3 will become even more lucrative over time. Management continues to target a 25% gross margin from the vehicle.

Daniel Sparks owns shares of Tesla. The Motley Fool owns shares of and recommends Tesla. The Motley Fool has a disclosure policy.