Now playing
01:53
How Tesla made electric cars sexy
Tesla Model 3 cars are displayed during the Tesla China-made Model 3 Delivery Ceremony in Shanghai. - Tesla CEO Elon Musk presented the first batch of made-in-China cars to ordinary buyers on January 7, 2020 in a milestone for the company's new Shanghai "giga-factory", but which comes as sales decelerate in the world's largest electric-vehicle market. (Photo by STR / AFP) / China OUT (Photo by STR/AFP via Getty Images)
STR/AFP/AFP via Getty Images
Tesla Model 3 cars are displayed during the Tesla China-made Model 3 Delivery Ceremony in Shanghai. - Tesla CEO Elon Musk presented the first batch of made-in-China cars to ordinary buyers on January 7, 2020 in a milestone for the company's new Shanghai "giga-factory", but which comes as sales decelerate in the world's largest electric-vehicle market. (Photo by STR / AFP) / China OUT (Photo by STR/AFP via Getty Images)
Now playing
02:56
Elon Musk says Tesla price hikes are due to supply chain issues
A Tesla car charges at a Tesla Supercharger station on April 26, 2021 in Corte Madera, California. Tesla will report first quarter earnings today after the closing bell. (Photo by Justin Sullivan/Getty Images)
Justin Sullivan/Getty Images
A Tesla car charges at a Tesla Supercharger station on April 26, 2021 in Corte Madera, California. Tesla will report first quarter earnings today after the closing bell. (Photo by Justin Sullivan/Getty Images)
Now playing
01:33
Bitcoin helps Tesla post record profits
Consumer Reports
Now playing
01:38
Watch Consumer Reports trick Tesla's Autopilot system
Tesla CEO Elon Musk speaks during the unveiling of the new Tesla Model Y in Hawthorne, California on March 14, 2019. (Photo by Frederic J. BROWN / AFP)        (Photo credit should read FREDERIC J. BROWN/AFP via Getty Images)
FREDERIC J. BROWN/AFP/AFP via Getty Images
Tesla CEO Elon Musk speaks during the unveiling of the new Tesla Model Y in Hawthorne, California on March 14, 2019. (Photo by Frederic J. BROWN / AFP) (Photo credit should read FREDERIC J. BROWN/AFP via Getty Images)
Now playing
03:06
SEC: Elon Musk officially named 'Technoking of Tesla'
Bitcoin
CNN
Bitcoin
Now playing
03:17
Tesla invests $1.5 billion in bitcoin
CNN
Now playing
03:14
In 2010, Elon Musk had big plans for Tesla. Listen to his predictions
Tesla co-founder and CEO Elon Musk introduces the newly unveiled all-electric battery-powered Tesla Cybertruck at Tesla Design Center in Hawthorne, California on November 21, 2019. (Photo by Frederic J. BROWN / AFP) (Photo by FREDERIC J. BROWN/AFP via Getty Images)
FREDERIC J. BROWN/AFP/Getty Images
Tesla co-founder and CEO Elon Musk introduces the newly unveiled all-electric battery-powered Tesla Cybertruck at Tesla Design Center in Hawthorne, California on November 21, 2019. (Photo by Frederic J. BROWN / AFP) (Photo by FREDERIC J. BROWN/AFP via Getty Images)
Now playing
02:01
Elon Musk has a lot to say about Covid-19. Some of it isn't true
Tesla Cybertruck
Tesla
Tesla Cybertruck
Now playing
01:36
Watch the Tesla Cybertruck's unbreakable windows break
Now playing
01:09
Elon Musk busts a move in Shanghai
Gabe Ramirez/CNN
Now playing
01:19
See Tesla's new Model Y
Sean R Clark/CNN
Now playing
03:16
Tesla's Model 3 is a top seller. But it's not the electric car for everyone
Bloomberg/Getty Images
Now playing
03:21
Hear some of Elon Musk's most ambitious predictions
CHICAGO, IL - JUNE 14: Engineer and tech entrepreneur Elon Musk of The Boring Company listens as Chicago Mayor Rahm Emanuel talks about constructing a high speed transit tunnel at Block 37 during a news conference on June 14, 2018 in Chicago, Illinois. Musk said he could create a 16-passenger vehicle to operate on a high-speed rail system that could get travelers to and from downtown Chicago and O'hare International Airport under twenty minutes, at speeds of over 100 miles per hour. (Photo by Joshua Lott/Getty Images)
Joshua Lott/Getty Images North America/Getty Images
CHICAGO, IL - JUNE 14: Engineer and tech entrepreneur Elon Musk of The Boring Company listens as Chicago Mayor Rahm Emanuel talks about constructing a high speed transit tunnel at Block 37 during a news conference on June 14, 2018 in Chicago, Illinois. Musk said he could create a 16-passenger vehicle to operate on a high-speed rail system that could get travelers to and from downtown Chicago and O'hare International Airport under twenty minutes, at speeds of over 100 miles per hour. (Photo by Joshua Lott/Getty Images)
Now playing
00:53
Musk opens up about Tesla's near 'death'
Now playing
01:04
Hear Elon Musk's bold predictions for Tesla robotaxis
New York CNN Business —  

Even after delivering a record number of cars in its second quarter, Tesla (TSLA) is still bleeding money. Tesla (TSLA) said Wednesday that it lost $408 million during the three months ending in June, far worse than Wall Street had expected. Shares of Tesla (TSLA) fell more than 10% in after hours trading following the earnings report.

The loss was slightly less painful than the previous quarter, in which Tesla lost $702 million. The company attributed its performance to record vehicle delivery numbers of more than 95,000 cars. That was up nearly 5% from the previous record in the fourth quarter of 2018. It also said some of the quarter’s losses were because of one-time operating expenses and currency fluctuations.

CEO Elon Musk announced on a call with analysts Wednesday afternoon that J.B. Straubel, a founding member of the company, is stepping down from his role as chief technology officer and will become a senior adviser. Current vice president of technology Drew Baglino will take on most of Straubel’s responsibilities.

“It’s been quite an adventurous 16 years,” Straubel said on the call. “This is not some lack of confidence in the team or company or anything like that.”

The company reported improved margins for its best selling car, the Model 3. Though it cut the starting price for the Model 3 in February, the average selling price for the car remained stable in the second quarter at around $50,000 and manufacturing costs declined, Tesla said.

However, overall auto gross margins slid to about 19%, down from above 20% in the first quarter.

After reporting the company’s second consecutive quarterly profit in January, Musk said he was “optimistic” about Tesla being profitable in the first quarter and “all quarters going forward.” That optimism was perhaps premature as the company has continued to work to contain costs as it ramps up production further.

“I think everyone was a bit surprised, we thought this could be a moment where Tesla makes some more positive news,” Jessica Caldwell, executive director of insights for Edmunds, told CNN Business.

Tesla is now projecting a turnaround, reporting that it is aiming for positive net income in the coming quarter. It also confirmed that it remains on track to launch its Model 3 production facility in China by the end of the year — a move expected to give the company better access to the Asian market. Musk, of course, has a history of setting bold goals that have proven difficult to deliver on.

Caldwell said she thinks the projected end-of-year opening date for the China production facility is likely unrealistic, though she expects that location to help the company gain new customers as demand for the Model 3 wanes in the United States.

Tesla also announced it is changing the way it reports guidance for upcoming quarters. The company will no longer announce expectations for each of its business divisions. Compared to the previous quarter’s report, Tesla did not share revenue growth projections for its “energy generation and storage” or “services and other businesses” divisions.