We've all been there. The train is coming into the station, and you grab your MetroCard and quickly try and swipe it at a turnstile.

"Please Swipe Again." "Please Swipe Again." "Insufficient Fare."

The last two words are killer. You think to yourself, "I swear I had a balance on this card." You go and check the card out and you see you have "\$2.45." Yes, you need \$2.50 to ride the subway, and you have \$2.45 on your MetroCard. Sure enough you miss that train all because of that nickel.

How did you end up in that situation any way? It turns out the MTA has designed it that way. Imagine how many tourists come to NYC and leave with balances that never get used. Imagine how many people lose MetroCards with balances still on them. And even if it gets used on a later refill, the MTA gets to collect the cash earlier this way! Win win for them, right?

But now, with some simple math, you can fight back.

First, let's see how the MTA tricks you out of your money earlier than you might want to release it to them.

When you are buying a MetroCard, you can get a 5% bonus if your purchase is big enough, so you get the following screen early on in the purchase process:

If you click the button on the left, they just got you. Your card will have \$9.45 on it, meaning you will get 3 rides and end up with \$1.95. That is a great deal for the MTA. They get all the money from every rider who does that, and they get the interest on that until you refill again and repeat the cycle.

Let's say you don't take the bait. You click MetroCard. Then you get this screen with three new short cuts:

Three quick options. But wait a minute. One button leaves you with the same \$9.45 card, and gives a remainder of \$1.95 after just three uses. The next one is even more frustrating: you end up with a \$19.95 card, leaving a remainder after 7 uses of \$2.45! That's right, the nickel we were talking about earlier. The last option does not leave you much better off. You'll get a \$40.95 card, which leads to \$0.95 on your card after you use 16 rides. So all three buttons presented leave quite a bit of "insufficient fare" on the card.

So how do you fight back? Well, click "Other Amounts" and type your own values:

and remember these three magic numbers: \$9.55, \$19.05 and \$38.10. That's right. Never use the shortcuts. Just type in one of those numbers.

Once you do, you'll see your excess balances nearly vanish once you apply the 5% bonuses:

Buy a \$19.00 card? \$2.45 left on card after use. Buy a \$19.05 card? No balance left after use! Magic. But what if you want a \$10.00 MetroCard? There is literally no way to buy one because of the 5% bonus and the fact that all payments need to be divisible by a nickel. Your options are to pay \$9.50 to get a \$9.98 card after bonus, or pay \$9.55 to get a \$10.03 card after bonus. Once again, you literally can't buy a \$10 metro card from a machine.

If you absolutely don't want any left over money, you really only have three choices of payments below \$40, as seen in the table below:

If the pennies bother you, then maybe memorize these three numbers: \$11.90, \$19.05, \$30.95.

Well here at I Quant NY, I've been hard at work coming up with a proposed software change. After much thought, check out this before and after:

Before:

After:

Not a big change you say? Echm. That's right. If they really wanted to fix the issue, they could ask "How much do you want on your MetroCard" instead of "How much do you want to pay." But don't count on those changes coming to a MetroCard Vending Machine near you anytime soon, given how lucrative the current set up is.

Which means it's up to you. Write down the three numbers, \$9.55, \$19.05 and \$38.10 or pick just the one that matches your buying habits best. You could even write it on the back of your MetroCard if you can figure out how to get ink to stay on it. (There's a reason they are so shiny.)

A side note: one reason that the MTA may do this is to make paying with cash easier. It would be a nightmare to dispense change if cash buyers used this technique. But that does not explain why they can't update the credit card only machines or all other machines if they first ask if you are using cash or credit. And of course unlimited card buyers avoid this all together. Also, this does not include the \$1 fee associated with new metro cards. So in closing, math is useful.

The MTA has since responded to this post from I Quant NY with a statement to WPIX:

"These machines do not hold an infinite amount of change and the denominations are suggested to insure there is ample change to accommodate customers who pay with cash," a spokesperson said in a statement.

"That being said, we will certainly look at this as part of the process involved in rolling out the next scheduled fare increase slated for next year"