The Palo Alto, Calif., company reported earnings after the close of trading on Wall Street that it lost $30.5 million, or 26 cents per share, in the April-June period. That compares with a loss of $105.6 million, or $ 1 per share, a year earlier.
Excluding one-time items and lease accounting, Tesla Motors Inc. said it had a profit of 20 cents per share. The one-time items included a $16 million charge associated with the payoff of a $465 million loan from the U.S. Department of Energy. Tesla paid off the loan in May, nine years earlier than it was due.
On that basis, analysts had expected a loss of 19 cents per share, according to FactSet.
Revenue rose to $405.1 million from $26.6 million a year ago. That beat analysts' forecast of $386.9 million.
"Our financial position and balance sheet have never been stronger," Tesla Chairman and CEO Elon Musk said in a letter to shareholders.
Tesla's stock was up $17.61, or more than 13 percent, to $151.84 in extended trading.
The company's shares have been on a tear, climbing well beyond analysts most bullish estimates for the company's real value. Goldman Sachs recently said that the company's fair share price was around $80. At current prices, the company's market capitalization is beyond the combined value of Fiat and Peugeot.
Musk said the company ended the quarter with $750 million in cash. It recently used some of that money to buy 31 acres next to its Fremont, Calif., plant for future expansion. It also expects to accelerate development of its next vehicle, the Model X crossover, as well as a right-hand drive version of the Model S in the second half of this year. The Model X is expected to go on sale next year.
Tesla currently makes one car, the $70,000 Model S, which won Consumer Reports' top rating in July. The company delivered 5,150 Model S sedans in the quarter, surpassing its expectation for 4,500. The California company sold around 1,700 cars a month, about equal with the monthly sales of the much cheaper Nissan Leaf and Chevy Volt. Tesla said it was making "almost 500 vehicles per week" in the second quarter of this year.
In a letter to shareholders, the company said it remains on track to deliver 21,000 cars worldwide this year. Tesla delivered the Model S to its first European customers this week.
The company said it opened seven new stores in the second quarter for a total of 41 locations worldwide, including 30 in North America. Tesla expects to open its first store in China later this year.
The company's shares are four times higher than they were at the start of this year. They jumped more than 74 percent in early May after the company reported its first-ever quarterly net profit in the first quarter. They rose again in late May after the company announced plans to expand its nationwide network of charging stations.
Looking further down the road, Musk said that the next-generation Tesla vehicle, the long-rumored $35,000 (without any government subsidies) EV, should be a compelling option for consumers with a 200-mile range.
Check out our gallery of the Tesla Model S here.
AOL Autos and Autoblog Green contributing