The past decade has been nothing short of frustrating for General Motors (GM -0.91%) shareholders. Aside from the early months of the COVID-19 pandemic, the auto giant has consistently churned out solid profits. And GM stock has periodically rallied on optimism about its efforts to become a leading player in electric vehicles (EVs) and autonomous vehicles.

Alas, these rallies have never lasted. GM stock trades almost exactly where it did 10 years ago -- and nearly 50% below the all-time high of approximately $65 achieved in early 2022. However, General Motors is making smart investments for the future. That's paving the way for big gains for patient shareholders who are willing to hold the stock until 2030.

A profit machine

Over the past decade or so, General Motors has radically streamlined its business by exiting a slew of markets where it struggled to earn consistent profits. Today, the company does the bulk of its business in North America and China, with North America being its main profit driver.

GM's North America segment has frequently achieved an adjusted operating margin in the 10% range. For 2023, the company expects to log an 8% to 10% adjusted operating margin there, despite macroeconomic headwinds and likely one-time costs tied to renewing the collective bargaining agreement with its U.S. factory workers later this year.

In its Q1 2023 earnings report, GM reported $40 billion of revenue -- up 11% year over year -- and adjusted EPS of $2.21: 28% above the Wall Street analyst consensus of $1.73. The company also raised its full-year forecast for operating profit, EPS, and free cash flow.

Profit could be even higher

General Motors' strong profitability and cash flow is particularly remarkable in light of the investments it is making to support future growth. Most notably, GM's Cruise subsidiary is on pace to record an operating loss of over $2 billion in 2023, as it begins to accelerate the rollout of its robotaxi service. After launching in San Francisco and expanding to Phoenix and Austin late last year, Cruise is now entering Houston and Dallas.

Whereas most other automakers have given up on trying to develop autonomous vehicle technology in-house, GM is sacrificing profits today to pursue a highly promising future business opportunity. Management projects that Cruise could be generating $50 billion of high-margin annual revenue by 2030, with tremendous potential to continue growing thereafter.

To a lesser extent, GM's efforts to become an EV leader are weighing on profitability, too. CEO Mary Barra recently noted that battery costs remain too high to profitably build mass-market EVs priced between $30,000 and $40,000. Nevertheless, GM is pushing aggressively into that market segment, particularly with the upcoming Chevy Equinox EV. It is willing to lose money for now -- until battery costs come down -- to build its EV market share and mind share.

A rendering of a red Chevy Equinox EV driving a city street at night.

Image source; General Motors.

A ridiculously cheap growth stock

At its investor day in late 2021, GM estimated that it would grow revenue to between $275 billion and $315 billion by 2030: roughly double its pre-pandemic baseline revenue. The company also anticipates expanding its operating margin to a range of 12% to 14%, largely thanks to the growth of new high-margin businesses led by Cruise.

At the midpoint of this forecast range, operating profit would exceed $38 billion by 2030: up from a record $14.5 billion last year.

Despite this potential for rapid revenue and earnings growth over the next seven years, GM stock currently trades for just five times earnings. At that valuation, it appears most investors don't think the General can even maintain earnings at current levels.

If General Motors meets its 2030 revenue and earnings targets, GM stock could rise beyond $200 by 2030, assuming a modest P/E ratio of 10. Furthermore, the shares have substantial upside even if the company misses its 2030 targets. That makes GM stock an incredibly attractive opportunity for long-term investors.