A day after hitting a new all-time high, Wells Fargo (WFC 2.74%) lost their case in federal appeals court, which essentially leaves the bank open to additional legal action by the Federal Housing Administration (FHA).

This definitely creates some level of uncertainty for the bank, which is why the stock price retreated a bit after the news, but in this case I don't think Wells' shareholders have much to worry about.

Why was Wells Fargo appealing the case?
Wells Fargo is not saying it didn't do anything wrong in its mortgage practices during the pre-crisis years. On the contrary, the company admits its misconduct and says that's precisely why it paid $5 billion in a 2012 settlement with the Justice Department over mortgage-related issues.

However, the court ruled the case Wells Fargo already paid to settle does not have enough similarity to the FHA's current lawsuit. This should not come as much of a surprise to anyone who has actually read both cases.

The 2012 settlement had to do mostly with the bank's foreclosure and loan servicing practices, not originations. The FHA's lawsuit accuses the bank of willfully originating and underwriting substandard mortgages that ended up costing the FHA lots of money in their insurance program. Really, the only similarity here is that both cases have to do with mortgages.

How much could it cost Wells Fargo?
After the 2012 settlement, the FHA pursued legal action against four banks. In addition to Wells Fargo, the rest of the "big four": Citigroup, Bank of America, and JPMorgan Chase all faced similar accusations.

All three of the others decided to settle with the FHA and be done with the matter, so it's pretty straightforward to determine how much this could end up costing Wells Fargo.

The FHA settlements so far have ranged from Citigroup's $158.3 million on the low end to $1 billion from Bank of America. According to one banking analyst, Wells Fargo's settlement in the case would be closest to JPMorgan's $614 million. Of course, there is some risk of having to pay more if they let the lawsuit work its way through the courts, but bear in mind what a small payout this would be in the big picture.

A drop in the bucket
To put this in perspective, consider some of the various financial crisis-related settlements banks have already paid out.

JPMorgan holds the record for the largest individual settlement (for now) at $13 billion with the U.S. government over misrepresenting the quality of mortgages sold to investors. Bank of America has already paid out a combined $60 billion in settlements, and is facing anywhere from $12-$17 billion to the Justice Department in the near future.

When you look at numbers like these, Wells Fargo's legal expenses don't seem too bad. Granted, the bank's mortgage practices weren't quite as bad as those from say, B of A's Countrywide, but they still had a hand in the bad behavior.

Best in breed
You can be certain that Wells Fargo is anticipating a settlement at some point, and is planning for it by setting legal reserves aside. The company expects their total remaining litigation expense to be under $1 billion, and is one of the only U.S. banks to actually revise its projections downward.

Wells Fargo is well capitalized, has a large and rising dividend (how many other banks pay more than they did before the crisis?), and has done an excellent job of growing many areas of its business.

The bottom line here is this: don't let headlines about legal issues distract you from how solid Wells Fargo's business is. If anything, the legal drama could produce buying opportunities if shares react negatively to the news, but Wells' legal expenses are not a big deal for the company at all.