Second-quarter earnings season is officially here. One of the first big tech companies to report was electric vehicle (EV) maker Tesla (TSLA 0.19%). The company disclosed its second-quarter vehicle production and delivery numbers a couple of weeks before earnings, crushing Wall Street expectations.

It didn't take long for investors to start cheering and buying up the stock. On the one hand, the company's encouraging production figures could signal strong consumer demand, an otherwise healthy signal in a rising interest rate environment. On the other hand, higher-than-expected deliveries could very well be the result of Tesla's aggressive price cuts. Should this be the case, investors need to be careful and not become enamored with strong top-line results. Price cuts will directly impact Tesla's margins and cash flow. 

In this article I will break down the company's Q2 earnings report, highlighting the good and the not so good. Let's dig in and assess if now is a buying opportunity for Tesla stock.

A hard look at the financials

For the quarter ended June 30, Tesla's automotive revenue was $21.3 billion, up 46% year over year. While this is impressive growth in a cloudy economic environment, all eyes were on the company's automotive gross margin excluding regulatory credits it receives from the government.

For the second quarter, Tesla's automotive cost of sales was $17.2 billion, and the company booked $282 million of regulatory credits. When removing these credits, Tesla's normalized automotive revenue was $20.9 billion. This implies gross margin excluding credits of 18.1%. To put this into perspective, Tesla's automotive gross margin excluding credits was 19% in Q1, and well above 20% in the latter half of 2022.

One of the silver linings of the earnings report was Teslas oft-overlooked energy business. For the quarter ended June 30, Tesla's energy (battery) segment reported $1.5 billion in revenue, up 74% year over year. Additionally, the energy unit's gross margin was 18.4%. To put this into perspective, the energy segment's gross margin was 11% in Q2 2022. 

It's pretty obvious that Tesla's price cuts have been a double-edged sword, resulting in higher year-over-year revenue while also compressing margin. However, the growing energy business helped make up for some of this margin deterioration, as Tesla has still managed to generate $1 billion in free cash flow in Q2. Moreover, the company's adjusted earnings per share (EPS) of $0.91 beat the Wall Street consensus estimate of $0.82. 

A person charging up their electric vehicle.

Image source: Getty Images.

Bulls and bears couldn't be further apart

Per usual, following the earnings report Wall Street analysts published updated reports and price targets. Two reports in particular from Wedbush Securities and Roth Capital stand out.

Roth Capital's Craig Irwin slapped Tesla with an $85 price target, citing increased competition from other EV manufacturers, coupled with rising skepticism that some of the company's new vehicles will be a success.

On the other side of the table was Wedbush Securities' analyst Dan Ives. Ives is one of the biggest Tesla bulls on Wall Street. Following Q2 earnings, Ives raised his price target to $350 per share, which would imply roughly 30% upside from Tesla's current trading levels.

Ives doubled down on his view that cutting prices to spark demand was a smart move, and he believes that margins are actually stabilizing. Moreover, he is bullish that Tesla is well on its way to becoming an artificial intelligence (AI) company. The rationale behind this logic is that during the earnings call, Tesla CEO Elon Musk hinted that the company is in early discussions with another original equipment manufacturer to license its autonomous driving technology, dubbed full self-driving (FSD).

Looking at the big picture

By any traditional valuation metric, Tesla stock looks supremely expensive compared to other car companies. But in Ives' opinion, the prospects of Tesla's car business coupled with its inroads on the AI frontier make for a compelling story. He uses a sum-of-the-parts analysis to derive an estimated price target.

Essentially, this methodology values all of Tesla's businesses individually. When you look at Tesla as more than just a car company and account for the battery business and its potential to disrupt AI, it becomes more interesting.  

Another longtime Tesla bull, wealth manager Ron Baron, believes Tesla could be worth $1,500 per share by 2030 -- which would make the company worth several trillion dollars. While the near-term outlook may still be a little hazy due to the broader economy, Tesla's Q2 results shed light on the long term.

The company is crushing the competition and doing so in a profitable way. Moreover, the budding energy unit and FSD progress really excites me. By dollar-cost averaging into the stock over time, you can easily build a nice position and hold on to the stock long term. Should Tesla reach a trillion-dollar valuation, you'll be happy you took advantage of this opportunity to buy the dip.