Tesla (TSLA -1.92%) stock is one of the most followed stocks in the market. That's not surprising given shares of the electric-vehicle (EV) pioneer have performed phenomenally over the longer term. 

Shares have rocketed from their initial public offering (IPO) split-adjusted price of about $1.13 in June 2010 to $204.99 on Oct. 14, 2022. This performance has transformed an initial investment of $1,000 into about $181,407. By comparison, the S&P 500 index has turned a $1,000 investment into $4,250 over this period.

Before considering investing in Tesla, you should make sure you have a good handle on how it makes its money.  

A white Tesla Model Y sedan carrying a red surfboard on its roof with mountainous terrain in background.

Tesla Model Y, the company's most recently launched electric car.

Where is Tesla's revenue coming from? 

The two charts that follow are derived from the company's second-quarter results. In the quarter, total revenue jumped 42% year over year to $16.9 billion and adjusted net income surged 62% to $2.62 billion, which translated to earnings per share increasing 57% to $2.27.

Segment

Q2 2022 Revenue

Percentage of Total Q2 2022 Revenue*

Automotive

$14.60 billion

86%

Energy generation and storage

$866 million

5%

Services and other

$1.47 billion

9%

Total

$16.93 billion

100%

Data source: Tesla. *Calculated by author.

The auto category includes sales and leasing of new models of the company's four EVs, the Model S sedan, the Model X SUV, the Model 3 sedan, and the Model Y crossover. These EVs are equipped with Tesla's advanced driver-assistance system, Autopilot, whose capabilities are increased via over-the-air software updates. 

Tesla recently released its vehicle production numbers for the third quarter. In Q3, it produced 365,923 vehicles and delivered 343,830 vehicles. These numbers were up 54% and 42%, respectively, from the year-ago period.

The energy generation and storage business sells solar panels and solar roof tiles for homes, and energy-storage products for residential, commercial, and electric utility grid use. 

Tesla's services and other segment includes a variety of items, the most notable being non-warranty after-sales vehicle services and sales of used vehicles.

Where is Tesla's gross profit coming from?  

Segment/Category

Q2 2022 Gross Profit

Q2 2022 Gross Margin

Percentage of Total Q2 2022 Gross Profit*

Automotive

$4.08 billion

27.9%

96.4%

Energy generation and storage

$97 million

11.2%*

2.3%

Services and other

$56 million

3.8%*

1.3%

Total

$4.23 billion

25%

100%

Data source: Tesla. *Calculated by author. Gross margin = gross profit divided by revenue. Numbers based on generally accepted accounting principles (GAAP).

In the second quarter, Tesla's auto segment accounted for 85% of its total revenue and an outsized 96% of its total gross profit. So, at this point, investors following the stock just need to pay attention to the auto business.

The energy generation and storage business has huge potential, thought its current contribution to the company's profit is close to insignificant. 

What's going on with services and other? Don't be concerned about this seemingly laggard of a category. Tesla doesn't aim to make money on some of the larger components of this category, notably on vehicle servicing. So, this category can be thought of as supporting the auto segment.

Tesla still has a long runway for growth

Tesla's core electric car business still has massive growth potential. Consider that at the end of 2021, the percentage of the world's light-duty vehicles on the road that are all-electric or plug-in hybrids was less than 2%.

Beyond its existing electric car and energy generation/storage businesses, Tesla has other avenues for growth. On the immediate horizon is the launch of its Semi Truck. On Oct. 6, CEO Elon Musk tweeted that Tesla is starting production of this electric Class 8 truck, which reportedly has a range of 500 miles. He said that PepsiCo will get its initial deliveries (quantity not specified) on Dec. 1. 

Investors will get material news soon: Tesla is slated to report its Q3 results after the market close on Wednesday, Oct. 19. An analyst conference call is scheduled for the same day at 5:30 p.m. ET.