Electric-car maker Tesla (TSLA -2.76%) reported strong second-quarter results yesterday afternoon, featuring 42% revenue growth. The performance was impressive, considering the tough global supply chain and logistics challenges automotive companies are facing. Of particular note, Tesla's second-quarter profit crushed expectations. Even more, with sales and profits increasing rapidly, the company's war chest of cash grew substantially.

Tesla's strong financials are in stark contrast to the negative free cash flow the company burned through for years after its initial public offering in 2010. But the tides have turned -- and Tesla's second-quarter 2022 report drives this point home.

Profits and cash

Helped by the company's 27% year-over-year increase in vehicle deliveries, the automaker's net income nearly doubled, increasing from about $1.1 billion in the year-ago quarter to nearly $2.3 billion in the second quarter of 2022. Tesla's non-GAAP (generally accepted accounting principles) earnings per share jumped 57% year over year to $2.27 -- handily beating the consensus analyst forecast for $1.81.

Impressively, Tesla's automotive margin was 27.9%, only down 46 basis points from 28.4% in the year-ago quarter. Investors should applaud such a small setback in an environment where companies with global supply chains are facing a range of ever-evolving challenges.

Operating margin actually improved, increasing from 11% in the year-ago quarter to nearly 15%. This key profitability metric was helped by growth in deliveries, a higher average selling price on Tesla's vehicles, lower stock-based compensation expense, and more. This even occurred as the company saw higher per-unit fixed costs in Shanghai during the quarter due to shutdowns related to the region's COVID-19 operating restrictions.

All of this strong execution means Tesla's already massive pile of cash is getting even bigger. The company wrapped up Q2 with $18.3 billion of cash, cash equivalents, and marketable securities, up from $902 million in the first quarter of 2022. Of this amount, $621 million came from free cash flow, or Tesla's cash from operations less capital expenditures.

Next, $936 million came from converting 75% of the company's Bitcoin purchases into fiat currency. These cash gains were partially offset by $402 million in debt repayment.

Plenty of reinvestment opportunities

With such a strong cash position, the company reiterated that it continues to have sufficient liquidity to self-fund its product roadmap and capacity-expansion plans. These plans, of course, will require plenty of capital, so the electric-car company has no shortage of reinvestment opportunities.

Regarding the company's capacity-expansion plans, Telsa said it expects to increase its annualized delivery volume by about 50% annually over "a multi-year horizon." It's doing this by boosting production at its factory in Shanghai and Fremont, as well as by ramping up production at its recently launched factories in Texas and Berlin.

Looking further out, Tesla continues its development of new products, including its Cybertruck, Tesla Semi, next-generation Roadster, its Robotaxi service, and more.

Combining Tesla's improving profitability and strong cash position with its significant reinvestment opportunity, the company seems to be in a great spot. It's poised to capitalize on a number of growth opportunities and ultimately fuel more significant growth in its top line and bottom line over the long haul.