It began with a recall of defective ignition switches in Chevrolet Cobalt compacts made last decade, but it has led to a huge and expensive mess for GM. Source: General Motors Co. 

Is the huge wave of recalls finally over for General Motors (GM 4.37%)

So far in 2014, GM has announced 55 different recalls in North America, affecting a total of almost 29 million vehicles. 

But there have been no new GM recalls June 30, the last day of the second quarter, when GM announced a slew of actions affecting over 7 million vehicles.

The timing is probably not a coincidence. By getting all of the past-due recalls announced in the first half of the year, CEO Mary Barra may be hoping to contain the damage to GM's earnings. 

But it raises a very big question: How much is this likely to cost GM, once all is said and done?

First, GM has to fix all of those recalled vehicles
Let's start with the costs of the recalls themselves. Recalls cost money because GM has to contact owners, supply replacement parts, and pay its dealers to make the repairs. 

Now, recalls happen to every automaker in the ordinary course of business. Most automakers maintain a reserve to deal with them as they arise. But because of the drastically heightened scrutiny following GM's long-overdue recall of millions of older vehicles with defective ignition switches, this has been far from an "ordinary" year for GM.

GM took a $1.3 billion charge in the first quarter to cover the costs of recalls announced through the end of March. On June 30, GM warned that it would take another recall-related charge of "up to approximately $1.2 billion" in the second quarter. 

So already we know that the costs of the recalls that have been announced so far will be about $2.5 billion. But how much more will GM need to spend before it gets to the end of this debacle?

Some very big fines seem likely
As I see it right now, there are three other factors that could hit GM's bottom line in a big way: Fines, settlements with victims, and lawsuits.

First the fines. GM has already paid a $35 million fine to the National Highway Traffic Safety Administration, of course. But there could be much bigger fines to come. 

What might "much bigger" mean? Well, back in March, Toyota (TM 0.05%) agreed to pay $1.2 billion to the U.S. Justice Department to settle charges related to its own recall scandal in 2009 and 2010. It's entirely possible that GM will end up paying something similar.

How big will GM's settlement fund need to be?
Settlements with victims will almost certainly be a significant expense. GM has retained attorney Kenneth Feinberg, who administered funds for victims of the 9/11 attacks and the Boston Marathon bombings, to create and manage a fund to pay settlements to people who were injured and the families of those killed in accidents related to the ignition-switch defect. 

GM has been very clear that the amount of those settlements is for Feinberg to decide, and he has, in essence, a blank check. Victims can file claims to learn how much GM would pay them without giving up their right to sue -- they only sign away that right if they decide to take the money.  

Feinberg has been talking to attorneys representing many of the victims, and he has said that the reaction to his proposed terms has mostly been quite positive. That suggests that these settlements are likely to be fairly generous.

But how big will that check be when all is said and done? GM has said for a while that they know of "at least" 13 cases where someone died in an accident as a result of the defect, but it's becoming clear that the total number of victims is likely a lot higher.

GM CEO Mary Barra appeared before a U.S. Senate panel in April to answer questions about GM's recalls. She is expected to appear before Congress again soon. Source: General Motors Co.

The Wall Street Journal recently conducted an extensive review of U.S. government accident data, and reported that "309 drivers and passengers were killed in accidents in which an air bag didn't deploy in a GM model that is now subject to the ignition-switch recalls." There were also another 228 people injured, according to the Journal.

Let's assume that those numbers are at least approximately correct. In the past, Feinberg has used a formula that looks at a victim's lost earning potential, as well as other factors. The Journal noted that Feinberg's 9/11 fund paid an average of $2 million to those injured, while payments to the families of the deceased ranged from $500,000 to $7.1 million.

How will those compare to payments from the GM fund? It's hard to tell. On the one hand, 9/11 was over a decade ago. On the other, many 9/11 victims were well-paid bankers and investment professionals, with likely much higher expected lifetime earnings than the average person driving a Chevy Cobalt. On the other other hand, as we said, GM will want Feinberg to err on the side of generosity, to head off as many court claims as possible.

But it gives us enough to do a back of the envelope calculation. If we estimate that the average payout to a person injured in one of these accidents will be $2 million, and the average payout to the families of those who died will be $5 million, and we multiply by the Journal's estimates of the number of victims, we get... $1.545 billion for the deceased, and $456 million for those injured.

Long story short, "around $2 billion" is probably a reasonable guess.

And what about the lawsuits?
GM is facing a slew of lawsuits for "economic loss" -- essentially, owners of the vehicles affected by the recalls are arguing that the negative publicity has hurt their resale value.

Plaintiffs' lawyers have claimed that GM's exposure could exceed $10 billion. But that seems wildly overblown: Analysts who track used-car values say that, if anything, the value of the affected GM vehicles may have increased since the beginning of the year.

After a hard look at the data, veteran industry observer Paul Eisenstein of The Detroit Bureau concluded that "the class action lawsuit appears, at best, to rest on shaky data and emotional appeal. If anything, the numbers generally suggest that the maker's recall problems have had little, if any impact on the sale of either its new or used vehicles, nor on the prices consumers have been willing to pay."

Things could change, of course -- and they well might. But right now, it doesn't look like those lawsuits will be a significant factor.

The upshot: a very costly adventure for GM
So what did we get? $2.5 billion in known charges related to the direct costs of the recalls. Another potential $1.2 billion or more in fines. And a settlement fund that could end up costing $2 billion.

Call it $6 billion, give or take. It's a huge bill, roughly three good quarters' worth of pre-tax profits for GM. And of course it could be significantly bigger once all is said and done.

But GM had a little over $28 billion in cash on hand at the end of the first quarter. It's a huge sum, but it's bill that GM can afford to pay. 

It's not going to put the General out of business, and it's not going to put critical product-development programs at risk.

But it's worth asking about opportunity cost: What won't GM be able to do as a result of that $6-billion-plus bill? Scroll down to leave a comment with your thoughts.