General Motors (GM -0.39%) had a whopper of a special item in the third quarter: a set of one-time charges totaling $5.4 billion, all related to its sale of German automaker Adam Opel AG to rival Peugeot SA. That charge and other Opel-related costs pushed GM to a $3 billion GAAP net loss for the quarter, though much of that was an accounting charge. 

As I said when GM's third-quarter numbers were released on Tuesday, the reality of GM's result wasn't nearly as bad as that big loss suggested. But even setting aside the effects of the Opel transaction, GM's revenue in the quarter was down over 13% from a year ago, to just $33.6 billion.

That decline happened even though GM's sales around the world (again, discounting Europe) were up year over year. How could GM sell more vehicles while generating significantly less revenue?

GM had a problem: Too much inventory

The answer starts with a problem that GM was facing as the third quarter began: too many vehicles in inventory in the United States.

A dark blue 2017 Chevrolet Malibu sedan.

GM had 145 days' worth of Chevrolet Malibus in its U.S. inventory as of the beginning of the third quarter. That's far more than most experts consider ideal. Image source: General Motors.

What's that mean? Vehicles on dealers' lots, and those in transit from GM to dealers, are referred to as GM's inventory. Automotive inventory is generally expressed in terms of "days' supply," which is exactly what it sounds like: The number of days it would take to sell all of the vehicles at the current pace of sales.

The goal with inventory is to have enough, but not too much: enough that shoppers coming to dealers have a good selection to choose from, but not so many that the automaker needs to discount them to clear them out. For most vehicles, the magic number is about 60 days' worth. The exception is full-size pickups: Because they come in a lot of different configurations, dealers like to have somewhat more in stock -- 80 days' worth is pretty typical.

Got it? Back to GM's problem: Because sales of some models had slowed, GM had 105 days' worth of vehicles in its U.S. inventory as of June 30. That was too many vehicles, so many that investors were becoming concerned. 

But it ended the third quarter with just 76 days' worth of vehicles in inventory, a much healthier number. 

How GM reduced its inventory in the third quarter

How did GM get that inventory number down? Not by boosting discounts, which would have clobbered its profit margin. Instead, it cut production at several factories during the quarter:

  • Fairfax Assembly, where the midsize Chevrolet Malibu sedan is made, shut down for five weeks.
  • Lordstown Complex, where the compact Chevy Cruze is produced, stopped production for a total of six weeks.
  • Fort Wayne Assembly, which builds GM's full-size pickups, had some planned downtime to begin upgrades ahead of the launch of all-new models next year.
  • Bowling Green Assembly, where the Chevrolet Corvette is built, closed on July 28 for some renovations and remained closed through the end of the quarter.

GM also cut back production of its subcompact Chevrolet Sonic at a factory in Michigan, and it lost about two weeks of production of the hot-selling Chevrolet Equinox crossover during the quarter because of a strike at a Canadian factory. 

The assembly line at GM's Lordstown Complex, in Lordstown, Ohio.

GM shut down the Ohio factory that makes the Chevy Cruze for a total of six weeks in the third quarter. Image source: General Motors.

The upshot? GM's wholesale shipments in North America fell from about 1,030,000 in the third quarter of 2016 to about 762,000 last quarter, a 26% drop. Because GM's sales in North America remained strong during the period (they were up about 0.6% from a year ago), GM's inventory fell significantly. 

What does that have to do with revenue?

Like most big automakers, GM books revenue when vehicles are shipped from its factories. GM's dealers are independent franchises; technically, they buy vehicles from GM at wholesale and sell them at retail. That means -- again, technically -- that GM gets paid for the vehicles when they're shipped. 

GM's North America factories shipped fewer vehicles in the third quarter, so its revenue in North America fell year over year. 

But wait: There's good news hidden in there

GM's production in North America was down 26% year over year. That should have put a $2.1 billion dent in GM's adjusted pre-tax earnings year over year. But that number fell by just $1.2 billion: GM still managed to earn $2.5 billion in North America in the third quarter. Why? Here's how CFO Chuck Stevens explained it during GM's earnings call:

The performance was driven by improved mix of about $600 million as we reduced production of cars, which more than offset the mix headwind from truck retooling. Solid improvements in costs, including warranty, of about $300 million, also contributed to the performance. The actions we have taken will allow us to end the year with dealer inventory down compared to the end of 2016. 

Look again at the list of factories that closed: Much of the lost production was on the Chevy Sonic, Cruze, and Malibu -- all sedans. Generally speaking, pickups and SUVs sell at higher prices than comparable sedans. Put another way, the average truck or SUV generates more revenue for GM than the average sedan when it's shipped. 

GM lost some pickup production because of the work being done at the Fort Wayne factory. But it lost much more production of the 3 Chevy sedans, and that means that its "mix" improved year over year, even though the total volumes were way down. That helped cushion the drop in revenue. 

The takeaway: A test of GM's recession readiness

The takeaway for investors: A big drop in production doesn't necessarily mean an equally big drop in GM's revenue. When GM is selling or shipping a larger percentage of trucks and SUVs relative to sedans, it has more leeway to withstand a production cut -- or the big drop in sales that we'd expect in a recession.

In a way, this quarter was a test of how well GM has prepared its business for the next downturn. Investors should note that it did pretty well.