A computer rounding problem that I like to call "The Penny Rounding Problem" has persisted for many years. This issue even made its way into popular culture, serving as a core plot element in movies like The Office and Superman III. At its essence, the problem arises when a column of numbers does not sum up to the expected total due to rounding errors.
Understanding the Problem
Consider this example: 1/3 is represented as 0.33 or even 0.333. However, adding 0.33 three times yields 0.99, not 1.00—a penny off. Similarly, take 2/3 or 0.67. Multiplying 0.66666… by 3 equals 2.00, while multiplying 0.67 by 3 gives 2.01. These small discrepancies add up, leading to noticeable errors in financial calculations, operational metrics, or any system reliant on accurate summation.
This is why your final mortgage payment (if you fully pay off your loan) is often slightly different from your regular monthly payment. The problem’s implications stretch across industries, from banking to retail to accounting systems.
Solving the Problem
Addressing the Penny Rounding Problem is straightforward but requires vigilance. Every calculation involving potential fractional results must be explicitly rounded to the appropriate number of decimal places. Here are some practical guidelines:
- Round Sub-Penny Calculations: For operations like dividing by three or multiplying by values like 0.0475, always round to the required decimal precision.
- Currency-Based Calculations: Always round currency values to two decimal places to avoid discrepancies in financial systems.
- Downstream Calculations: Ensure that intermediate results used in further computations are rounded appropriately to prevent error propagation.
For example, when entering an interest equation in Excel:
= A3 * A4 / 12
It should be modified to:
= ROUND(A3 * A4 / 12, 2)
This ensures that the result is rounded to two decimal places, minimizing the risk of inaccuracies.
Real-World Examples
The concept of "salami slicing," popularized in movies, involves siphoning off small fractions of pennies from financial transactions. While Snopes debunks this as a myth in modern systems, it illustrates the importance of precision in rounding operations. Similarly, questions about whether gas stations engage in rounding tricks with pump prices highlight consumer awareness of rounding practices in everyday transactions.
Closing Thought
The Penny Rounding Problem serves as a timeless reminder of the significance of precision in computation. Whether working in Excel, developing financial software, or designing operational algorithms, attention to rounding can prevent small errors from snowballing into major discrepancies. Let’s embrace diligence and robust practices to keep our systems both accurate and trustworthy.
The original post was on February 10, 2011. This post was updated for 2025.
For example: 1/3 is represented as .33, or even .333. But if you add .33 together 3 times, you get .99, not 1.00 - a penny off. This is why your final mortgage payment (if you ever actually paid it off) is never exactly the same as the monthly amount. Even worse, take 2/3 or .67. Multiple .66666... by 3, and you get 2.00; multiply .67 by 3, and you get 2.01.
Solving the problem is relatively simple but requires diligence. Each calculation must be rounded to the correct number of decimal places.
When I teach Excel at the college, I require the student to ROUND the answer to any mathematical operation involving explicitly
- possible sub-penny answers (divide by three, multiply by .0475, etc.)
- currency
- down-stream use of the answer.
Taken individually --- addition of two numbers will never generate sub-penny digits, non-currency measurements (weight, speed, etc) do not bother people when the totals are off by small decimal fractions, and if the result to the mathematical calculation is never to be used then no one cares.
So when an interest equation is entered into Excel
= A3 * A4 / 12,
you should change it to be
= ROUND( A3 * A4 / 12, 2 ) so that the answer is rounded to 2 decimal places.
So can Richard Pryor get rich by taking all of the rounded, fractional pennies and putting them in his account? This is called Salami Slicing and Snopes calls it a legend. But do gas stations do it with your pump price?