On Monday, Treasury Secretary Jacob Lew made it official: The controversial 2008-09 government bailout of the auto industry is over.

Lew said the Treasury Department has sold off its last 31.1 million shares of General Motors, the final two percent of what was once a 60 percent stake in the company. "With the final sale of GM stock, this important chapter in our nation's history is now closed," he added.

Punctuating the turning of this new page, GM announced Tuesday that it is replacing CEO Daniel Akerson with Mary T. Barra, who will be the first female chief executive of a major automotive company. Barra, 51, is executive vice president of global product development and has been with GM for 33 years. With its government stake gone, GM can now pay executives whatever it wants.

Ridding itself of the unwanted epithet "Government Motors" wasn't pain-free for GM. When President Obama decided to step in and restructure the company and its fellow Detroit automaker Chrysler — following an initial infusion of cash from outgoing President George W. Bush — his team required GM to axe brands like Pontiac and Saturn, close down dealerships, lay off workers, and kick out CEO Rick Waggoner and several board members.

Chrysler is now a unit of Fiat, and GM is doing pretty decently, with rising sales, $26.8 billion in cash, and 15 straight quarters of turning a profit. But it wasn't cost-free for the U.S. government, either. Here's a look at what the U.S. and its taxpayers lost in the auto bailout, and what the country gained by aggressively stepping in to save America's automotive industry.

The most tangible loss is money. Between Obama and Bush, the U.S. spent about $80 billion to rescue GM, Chrysler, and their auto-part suppliers. With all the government-held shares sold, Uncle Sam booked a $10.5 billion loss on its GM investment. The U.S. lost another $1.2 billion on Chrysler.

More intangibly, the U.S. lost what would have emerged from the ashes of GM, Chrysler, and perhaps Ford, which didn't take any bailout money but benefited from the stemming of market panic and closure of suppliers.

Lew insists that "inaction could have cost the broader economy more than one million jobs, billions in lost personal savings, and significantly reduced economic production." And at least one recent study backs him up.

On Monday, the Ann Arbor, Mich., think tank the Center for Automotive Research (CAR) put out these numbers:

1.88 million: Job losses in 2009-2010 if only GM had gone under.
4.15 million: Job losses in 2009-2010 if the whole U.S. auto industry had shut down.
$39.4 billion: The hit to federal and state governments, from lost tax revenue and jobless benefit payments, if just GM went under.
$105.3 billion: The hit to federal and state governments if the whole auto industry had collapsed.

The federal government had to step in "because the entire industry was in a depression, and it could have dragged the whole country into one," says former CAR chairman David E. Cole.

The Treasury also points out that while it lost money on GM, taxpayers came out ahead when you look at the entire TARP bailout, of which the auto bailout was a relatively small part. In total, Treasury spent $421.8 billion to rescue financial institutions and the auto industry, and it has recovered $432.7 billion so far — a tidy $10.9 billion profit — including the GM losses.

Politico's Ben White makes an interesting point: