What happened 

Shares of Tesla (TSLA -2.03%) were spiking this morning after the electric vehicle (EV) maker reported strong second-quarter results. While revenue was below Wall Street's expectations, the company's earnings far exceeded analysts' consensus estimate. 

As a result, investors pushed the EV stock up by 5% as of 10:34 a.m. ET on Thursday.

So what 

Tesla's sales increased an impressive 42% from the year-ago quarter to $16.9 billion, but missed analysts' consensus of $17.2 billion. 

A person looking at a phone and smiling.

Image source: Getty Images.

But it was likely the company's earnings that got investors excited this morning. Tesla reported adjusted earnings per share of $2.27, up 57% year over year and easily outpacing Wall Street's consensus estimate of $1.85. 

Investors were also likely happy with Tesla's vehicle deliveries, which increased 27% from the year-ago quarter, and the company's net income of $2.3 billion -- a huge increase of 98% year over year. 

Tesla also maintained impressive automotive gross margins of 27.9% in the quarter, down only slightly from 28.4% in the year-ago quarter, due mostly to supply chain issues and shutdowns at its Shanghai factory.  

Now what 

Tesla's management said that it plans to grow manufacturing capacity "as quickly as possible" and says it will achieve 50% average annual growth in vehicle deliveries over a "multiyear horizon."  

The company also said that its Shanghai and Fremont, California, factories are now achieving their highest-ever production levels and that the company is "focused on a record-breaking second half of 2022." 

With its strong second-quarter results and confident outlook for vehicle production, it's no wonder Tesla's shares are gaining ground today.