A Simple Rounding Error

Sometimes simple errors may bubble up and produce something big. A classic example of this is rounding off with floor() or ceil() methods in an arithmetic operation too early. In that case the off-by-one error propagates and may lead to a significant deviation.

While preparing this year’s tax return a few days ago (I am one of those lazy ones), I encountered a problem that may have million dollar consequences.

TurboTax automatically fetches data about stock purchase and sales and calculates short term and long term capital gains taxes. It is very good at doing that and supports a lot of vendors, perhaps far more than other tax preparation software. It gets the purchase price and the sale price. The problem is that it rounds off the purchase price and sale price before calculating the capital gains. Consider the following transaction that I actually did last year. TurboTax summarizes it as:

But the actual transaction was:

If the rounding was done in the end, I would have to give tax for $435. Now I was giving tax for $434 according to TurboTax. So, I underreported the case.

TurboTax hopes that this early round off error evens out. Perhaps in another case, we would have calculated more capital gains for another transaction. But what if the odds are in our favor all the time. Or never. If the round off always helps me, I may end up paying taxes for a lesser amount of capital gains.

Say, TurboTax underreported $20 for me. TurboTax was used by 40 million tax payers in 2019. Assuming the same happens this year, let us assume that again 40 million tax payers will be using it. One would assume that about 75% of these customers had some stock sales in the past year, perhaps more. So, assuming that 30 million people each have $20 underreported, it will be underreporting $600M. At an average of 25% tax bracket, it may happen that $150M in tax was lost by the government.

Why aren’t people talking about it? They are. After discovering the bug, I looked up and found this thread:


One of the posts say that TurboTax will fix it in future. But if this underreporting triggers an audit and a tax payer has to pay extra penalties for it, that will be really unfortunate.

OpenRefactory’s iCR will be detecting this early rounding off problem in its next major version release.

Recent Posts