Tesla reported its largest quarterly loss in its history on Wednesday and burned through $430 million in cash over three months. But investors didn't freak out. Wall Street was expecting worse.

The electric car company said it lost more than $717.5 million in the second quarter. But its cash burn rate was less than investors expected, and the company had $2.2 billion in cash at the end of the quarter.

Tesla's (TSLA) stock was up more than 10% at one point in after-hours trading.

The business world is looking so closely at Tesla's cash levels because Tesla worked mightily to reach its long-sought milestone of making 5,000 Model 3s in a week. With low cash reserves, investors have worried that Tesla would need to borrow more money to keep the company afloat.

The electric car company said it lost more than $717.5 million in the second quarter. But it ended up with $2.2 billion in cash at the end of June. That meant Tesla burned through $430 million worth of its cash stockpile last quarter as it finally hit production targets for the Model 3 sedan, which is much less than many expected

The company said it maintained its targeted level of production, making 5,000 Model 3s in a week multiple times in July. Tesla also said it wants to churn out 10,000 Model 3s per week "as fast as we can." It expects to produce between 50,000 and 55,000 Model 3s this quarter.

The Model 3 is Tesla's first car that's aimed at a more mass-market audience, and it debuted to great fanfare, with thousands clamoring to put down $1,000 reservations for the vehicle.

But analysts have said in recent weeks they thought demand for the Model 3 might be waning because of long wait times. Tesla still hasn't made any $35,000 base model cars available.

Related: Has Elon Musk lost control of his hype machine?

CEO Elon Musk made the bold promise earlier this year that Tesla would post its first quarterly profit in years this fall, Tesla doubled down on that promise again in a letter to investors Wednesday.

Some analysts viewed that claim optimistically. Others are more skeptical

"The projection of profitability in the second half of the year is admirable, but is based on selling a far more expensive version of the Model 3 then many consumers had expected," Rebecca Lindland, executive analyst at Kelley Blue Book, said in an emailed statement. "Can they sustain profitability if and when they start selling the more affordable, $35K version? Insights into the quality and quantity of the reservation pipeline, while boring, would provide investors with confidence with profitability projections."

Tesla recently laid off about 9% of its staff. Musk explained in June that the job cuts were part of a restructuring plan to eliminate "duplication of roles" and added that the layoffs should reduce costs and help the firm on its path to profitability.

Related: Tesla's magic is wearing off as Model 3 excitement dwindles

Wednesday's earnings report also comes as Musk has faced scrutiny for recent erratic behavior.

Earlier this month, he made an unfounded criminal accusation about one of the rescuers who helped save a group of young boys and their soccer coach from a flooding cave in Thailand.

During May's conference call with analysts, Musk's behavior was bizarre. He told analysts their questions were boring and refused to answer them, and he spent a significant amount of time fielding questions from a YouTuber.

On Wednesday's call, Musk apologized to analysts.

—CNN's Chris Isidore contributed to this report.