Posted November 14, 2012 By Presh Talwalkar. Read about me , or email me .

Imagine one day you are running a few errands. You grab some coffee, then buy groceries, and you withdraw some cash for later. You also treat yourself to a nice meal.

In your mind, you have done the following transactions:

$5 coffee

$30 groceries

$60 cash at ATM

$80 nice meal

When you get home, you realize you overdrew your account. You had $100 to start the day, and you expected a payment from the client which got delayed.

You are unhappy at your mistake, but you don’t beat yourself up about it. After all, the $100 should have covered the first three transactions, so you would owe a single $35 overdraft fee for the nice meal. It’s an annoying fee, but it won’t damage you too much.

Only later you find out you were hit with 3 overdraft fees, making the total fees $105! You angrily complain, but what your bank did was completely legal.

Why did they charge you so many fees?

.

.

"All will be well if you use your mind for your decisions, and mind only your decisions." Since 2007, I have devoted my life to sharing the joy of game theory and mathematics. MindYourDecisions now has over 1,000 free articles with no ads thanks to community support! Help out and get early access to posts with a pledge on Patreon. .

.



Transaction re-ordering

As a consumer, you expected the transactions to clear in the chronological order in which you made them. This system would mean the following order:

$100 to start

$5 coffee

$30 groceries

$60 cash at ATM

—–

$5 remaining $80 nice meal–>overdraft fee

(Example based on this article)

Many banks instead use a different, and currently completely legal, method. They will post the transactions in the highest-to-lowest order. This would mean the following order:

$100 to start

$80 nice meal

—–

$20 remaining $60 cash at ATM–>overdraft fee

$30 groceries–>overdraft fee

$5 coffee–>overdraft fee

The number of overdraft fees jumped from 1 to 3 by re-ordering the transactions.

One view is this method is implemented intentionally to increase overdraft fees (not unreasonable, as fees = banking profits). A counterpoint–and apparent justification–is that higher dollar amounts could be related to more important transactions. For example, one would rather have the heating bill getting paid rather than paying for coffee.

But this justification doesn’t make sense when all transactions clear anyway, and the consumer is stuck with overdraft fees. In fact, banks are coming under fire for this practice of transaction re-ordering.

Wells Fargo, for instance, was sued and lost a case in which it re-ordered transactions. The Pew Charitable Trusts website has a fantastic graphic that illustrates how one consumer’s transactions were re-ordered.

See how a single $22 overdraft fee was turned into $88 of overdraft fees by clicking below or visiting their website:

As the graphic proves, the order matters a lot!

Practices at major banks

As of this writing in November 2012, I gathered the information for some of the big banks’ websites. This list is meant to be a guide and not a definitive source.

The reason is that banks can change their method at any time. In fact, many banks are moving to chronological order as of this writing (perhaps to pre-emptively avoid potential lawsuits).

So always check with your bank to be sure. Here’s a small list of what I found out. I have provided links to the documents so you should double check before you make any conclusions.

Banks with highest-to-lowest

Bank of America

TD Bank

Banks with chronological order*

*this only matters for transactions when a time order is known, like buying coffee. Even with this system, checks often clear in highest-to-lowest order

Wells Fargo

JPMorgan Chase

CitiGroup

US Bank

PNC (after December 7, 2012; before it is highest-to-lowest)

Optional topic: greedy algorithm

Consider the following mathematical problem. A customer debits his account with transactions numbered 1, 2, 3, …, n during a given day, such that the sum of transaction costs is larger than the starting balance in the account.

An overdraft fee occurs whenever a particular debit is larger than the remaining balance in the account.

Your goal is to maximize overdraft fees by re-ordering the transactions. Of the n! choices, which order will result in the maximal number of overdraft fees?

The answer is simple: the highest-to-lowest method! In computer science, this is an example of a “greedy” algorithm because in each step one selects the largest of the remaining values. Or, as one author puts it, A greedy algorithm from greedy banks

Proof of why this is maximal

At each step, the greedy algorithm deducts the highest remaining transaction. Thus, the available balance will deplete as fast as possible, yielding overdraft fees for every remaining transaction.

More formally, label the transaction in descending order such that t 1 ≥ t 2 ≥ … ≥ t n .

Suppose there is another order {u i , i = 1,…,n} in which the checking account depletes in one or more steps further. If we start with balance B, then there will be a transaction i in which:

B – u 1 -…-u i < B – t 1 -…-t i

Then by rearranging terms it must be the case that:

u 1 +…+u i > t 1 +…+t i

That means at some transaction i, u i ‘s exceeds the sum of the t i ‘s. But by assumption we have chosen the t i ‘s in descending order, and hence their sum must be maximal. Therefore this is a contraction, and the greedy algorithm produces the maximal number of fees.

In short, the highest-to-lowest transaction fee is a greedy algorithm that maximizes overdraft fees from the n! possible transaction orders. What are the odds that banks did this by accident? You be the judge of that.