Tesla’s shares jumped more than 20% after the company showed that it’s finally becoming profitable.

This week, Tesla released its third-quarter earnings report, and the results were much better than investors were expecting. The company’s free cash flow, gross margin, and profitability all improved during the third quarter.

As a result, the company’s shares were up more than 20% in after-hours trading on Wednesday. Here is a brief overview of Tesla’s third-quarter earnings:

  • Revenue: $6.30 billion, as opposed to forecasts of $6.45 billion
  • Earnings: $1.86 per share, as opposed to forecasts of -$0.24 
  • Deliveries: 97,000, as opposed to forecasts of 95,000 to 100,000
  • Gross margin: 18.9%, as opposed to forecasts of 17.7%

What is behind Tesla’s Q3 comeback?

Tesla’s revenue actually fell during the third quarter, in spite of an increase in vehicle deliveries. This was because the company began offering a leasing option on the Model 3, which wasn’t available last year. The company’s net income was also down from a year earlier.

However, investors didn’t seem too bothered by the drop, since the company showed surprising profitability during the third quarter. Investors were expecting Tesla to lose money, but the company’s non-GAAP earnings were $1.86. This was quite a change from the second quarter when the company reported losses of $1.12 per share.

Plus, the company’s gross margins improved substantially. And free cash flow reached $371 million, which far surpassed forecasts of $32 million. 

Looking ahead, Tesla believes it is still on track to deliver between 360,000 and 400,000 vehicles in 2019. And most importantly, the company believes it will continue to be profitable from here on out. 

What’s next for Tesla?

It’s safe to say that this is one of Tesla’s best quarters yet, but the company is looking ahead to the next milestone. Going forward, the company is focused on completing its Shanghai plant. 

CEO Elon Musk said that the Shanghai plant is in the trial production phase and will be ready in the next couple of months. This is an important next step for Tesla since this facility will allow the company to boost its international sales at a lower price point.

Tesla is also making preparations for the release of its newest vehicle, the Model Y. The Model Y is the company’s crossover vehicle and will be built on the same platform as the Model 3. The company expects the Model Y to be ready in the fall of 2020.