How Tesla Made More Profit From Less Revenue

October 24, 2019, 2:27 PM UTC

Tesla’s surprisingly strong third quarter—it solidly beat Wall Street expectations on Wednesday—included promising signs. But one stood out from the usual suspects: Its gross margin on cars.

The measure, a calculation of the profitability of the company’s vehicle production excluding others costs such as factory construction and research, shot up 20%. It went to 22.8% from 18.9% after trending downwards for two consecutive quarters.

Even the most optimistic analysts had not projected such a big turnaround. Because of the better-than-expected results, Tesla’s shares soared 15% to $293.36 by mid-morning Thursday.

Tesla’s automotive margins are sometimes taken as a way of measuring whether the company can meet its long-term goal of producing electric cars profitably and at large scale. That’s particularly true now that it sells far more of the mid-budget Model 3 sedans than its more profitable luxury models.

These surprising reversals, however, came despite only modest 2% quarterly growth in actual cars delivered, and lower overall prices per car. And for the first time since 2012, according to Bloomberg, Tesla reported a year-over-year decline in quarterly revenue, which dropped 8%, to $6.3 billion from $6.8 billion in the same quarter in 2018.

The disconnect could be confusing. Tesla’s explanation is straightforward, if not simple.

In a quarterly conference call with investors, Tesla CFO Zachary Kirkhorn emphasized the role of big cost reductions, including in the number of hours of labor required to produce each car, in increasing profitability. He also cited savings on warehousing and delivery.

And though the overall average selling price of Tesla vehicles has continued to decline, Kirkhorn said average prices have held steady in the North American market. The average prices of the more profitable S and X models actually increased, because Tesla had been selling outdated inventory at a discount in the prior quarter.

A second factor in the profitability bump was the recognition of $30 million in previously deferred revenue related to Tesla’s planned autonomous driving features. This was triggered by the release of Smart Summon in September, a feature that allows a Tesla to drive autonomously through a parking lot to pick up its owner.

That’s not much revenue – and the small number seems appropriate for a feature that is described as a test. But it foreshadows another $500 million in deferred revenue Tesla will recognize when its autonomy package, known as Full Self Driving or FSD, is “feature complete.” Tesla CEO Elon Musk reiterated tonight that Tesla aims to hit that milestone by the end of the year, cueing up what could be a very profitable fourth quarter.

Tesla’s automotive margins also seem to have been positively impacted by growth in Tesla’s leasing program. For complicated accounting reasons, leases are substantially more profitable than outright sales for Tesla, while generating less total revenue. Tesla says the “majority” of its year-over-year revenue decline, in fact, was due to increased leasing, which has tripled as a percentage of sales since this time last year.

Tesla says it also benefited from foreign exchange fluctuations, and its research and administrative costs declined by $155 million for the quarter.

A final factor in non-automotive profitability was a 48% quarterly jump in installations of Tesla’s solar roof panels. Installations of Tesla’s Powerwall home batteries were also up 15%. Energy generation and storage generated $88 million in operating profits this quarter, compared to $43 million in the second quarter.

This growth, CEO Elon Musk explained to investors, was partly the result of the return of staff to the solar unit after they had been temporarily pulled away to help with accelerating Model 3 production.

Another factor in the rise in solar and battery-storage installations, Musk suggested, were the planned blackouts that hit many California residents in the late summer. “You can tell which homes have a Powerwall, because that’s where the lights are on,” he said. The outages only hit in early October, though, making this a debatable explanation.

Other positive developments with longer-term implications also likely contributed to the big stock bump. Musk announced that test production of Model 3s has begun at Tesla’s new Shanghai factory, and that the commercial release of the Model Y light SUV would be moved up from fall 2020 to summer 2020.

Speaking to investors, Musk waxed optimistic about the Model Y. “This is just my opinion, but I think it will outsell S, X, and 3 combined.”

Considering Musk’s poor track record with predictions—including past timelines for autonomous driving and the production of the Model 3—investors are likely taking the latest one with a bit of skepticism.

More must-read stories from Fortune:

—The wireless industry needs more airwaves, but it’s going to be costly
—Demand for Apple’s new iPhone 11 is strong

How to claim a cash settlement of up to $358 for Yahoo’s data breaches
—Now hiring: people who can translate data into stories and actions
—Investors are pouring money into marijuana software. Here’s the latest startup to get funding
Catch up with Data Sheet, Fortune’s daily digest on the business of tech.