This article was originally published January 6, 2016 and updated on September 27, 2016.

While General Motors (NYSE: GM) stock has performed poorly over the past year, this doesn't mean the stock isn't a buy today. Despite the fact that GM has trended down as of late, a thorough analysis of the company's history and outlook yields an entirely different conclusion. While GM's unit sales represent the peak of the automotive cycle trend, suggesting that earnings may be headed down, a long-term perspective leads to the inevitable conclusion that GM stock is a buy for long-term investors. 

Analysts currently project the Detroit auto giant will produce adjusted earnings per share of $4.80 for 2015, up more than 50% year over year. Despite this, as eluded to above, General Motors stock has declined over the past year.

GM Chart

General Motors Stock Performance, data by YCharts

That leaves GM stock trading for less than seven times earnings. This valuation implies that investors think GM's profitability has already peaked. However, that's far from the truth.

North America profit hasn't peaked yet

In late 2014, General Motors set a goal of boosting its pre-tax margin in North America to 10% by 2016. Last October, following a stellar third quarter, the company forecast that it would hit that target a year early.

Many pundits apparently think this means GM has no room left for further profit growth in North America. Yet there are several factors that should support further margin expansion in 2016. First, GM is introducing new versions of several high-volume car models for 2016. New models tend to command higher prices, raising profitability.

Second, low fuel prices continue to drive strong demand for GM's main profit driver: the Chevy Silverado and GMC Sierra full-size pickups. In 2015, GM sold 824,683 full-size pickups in the U.S. (up 11% year over year), including more than 90,000 last month alone. It hasn't sold that many full-size pickups since 2007 -- yet it sold nearly 1 million annually a decade ago, suggesting there could still be some sales upside left.

Strong Chevy Silverado sales are driving GM's profit higher in North America. Photo: General Motors

Third, GM is entering 2016 with much leaner inventories than it had a year ago. In early January 2015, GM reported U.S. inventory of 737,444 vehicles, equal to 70 days of supply. By contrast, as of this week it had U.S. inventory of 630,950 vehicles, or 60 days of supply.

Lower inventory generally leads to reduced discounting. Additionally, because GM records revenue when it sells a vehicle to a dealer -- not when the final sale is made -- the inventory reduction cut into GM's revenue in the U.S. for 2015 by several billion dollars. If anything, GM is likely to rebuild inventory in 2016, leading to higher revenue and profit.

Non-U.S. operations should turn profitable

In addition to rising profitability in North America (chiefly the U.S.), General Motors should also post better results abroad in 2016 and beyond. Through the first three quarters of 2015, GM's auto operations outside North America were collectively unprofitable, with earnings from China more than offset by losses elsewhere.

However, the company has been restructuring aggressively in foreign markets, closing inefficient plants and consolidating production into larger facilities. It is also working to reduce the number of vehicle architectures in use globally to keep development costs in check and capture economies of scale. This should reduce its losses outside North America and China for 2016 and future years.

Meanwhile, a recent auto stimulus measure in China has put auto sales growth back on track there. GM's sales in China rose 15% in October -- the first month of the new stimulus -- and then 14% in November and December. Sales should continue to rise in 2016, although the outlook for 2017 is clouded by the likely expiration of the current sales tax break.

Pessimism is an opportunity

GM thus seems to be well-positioned for another big leap higher in earnings for 2016. Even if those gains are not sustainable in the long run, GM's 2015 earnings power is probably a good benchmark for its long-term potential. If that's right, then the true value of General Motors stock is probably at least 50% above the current market price.

Investors can afford to be patient, collecting GM's hefty dividend (currently around 4.6%) and watching the company shrink its share count through buybacks. The longer GM can sustain its newfound profitability, the higher its stock price is likely to bounce in the long run.