The company plans to begin producing its next vehicle, the Model Y, next summer, about six months sooner than previously expected.

Mr. Musk predicted that the Model Y would surpass the combined sales of Tesla’s current vehicles — the Models 3, S and X — and generate better margins than the Model 3.

He also said that by the end of next year, Tesla should be able to activate self-driving technology “reliable enough that you do not need to pay attention, in our opinion.” He cautioned that regulators might not concur about the technology’s readiness for autonomous driving.

Tesla said capital expenditures totaled $385 million in the quarter. That was more than the $250 million spent in the second quarter, but down from $510 million in the third quarter a year ago.

At the same time, it said, its cash on hand grew to $5.3 billion, an increase of $383 million. Tesla reported $371 million in free cash flow, a measure of cash generated beyond operating expenses and capital spending.

“The profit and cash-flow numbers look unexpectedly good,” Mr. Gordon said. “The cash flow is especially important because there were concerns about the company’s financial position.”

Tesla also benefited by recognizing deferred revenue — money that had been set aside because it came from customer payments for features not yet activated, such as aspects of the Autopilot system. Autopilot uses radar and cameras to drive Tesla cars with little input from drivers. In September, Tesla activated the Smart Summon feature, allowing the company to recognize some deferred revenue in the third quarter.