Banker's Rounding
A fair rounding method that breaks exact ties by rounding to the nearest even number.
What Is Banker's Rounding?
Banker's rounding (Round Half Even) resolves exact ties by rounding to the nearest even number.
How Does Banker's Rounding Work?
Use these steps to apply Banker's Rounding correctly:
Choose the position
Choose the rounding position.
Look at the discarded portion
Look at the discarded portion.
Determine distance
Determine whether it is below, exactly at, or above halfway.
Below Halfway
Below halfway, round down to the nearest value.
Above Halfway
Above halfway, round up to the nearest value.
Exactly Halfway
If exactly halfway, inspect the retained digit.
Even Retained Digit
If the retained digit is even, keep it.
Odd Retained Digit
If the retained digit is odd, increase it by one so the result becomes even. The even rule applies only to exact halfway cases.
Banker's Rounding Rule
The Banker's Rounding rule dictates that ties are broken by looking at the parity of the candidate results. When rounding to the nearest value, any discarded portion that is strictly less than 5 rounds to the closer lower-magnitude number. Any discarded portion strictly greater than 5 rounds to the closer higher-magnitude number. When the discarded portion is precisely 5 followed by no other non-zero digits, the result that has an even number as its least significant digit is chosen.
Why Does 2.5 Round to 2?
2.5 is exactly halfway between 2 and 3. Banker's Rounding chooses the even result, and 2 is even while 3 is odd. Therefore, 2.5 rounds to 2.
Conversely, 3.5 is exactly halfway between 3 and 4. Since 4 is even and 3 is odd, Banker's Rounding selects 4. Thus, 3.5 → 4. This pattern alternates for every halfway case.
What Happens When Rounding a Number Ending in 5?
Not every number ending in 5 is an exact halfway case. The even rule only applies to exact halfway values. For example, when rounding to the nearest whole number:
- 2.5 is exactly halfway. The rule applies, and it rounds to 2.
- 2.51 is above halfway. It is closer to 3, so it rounds to 3. The even rule is skipped.
- 2.49 is below halfway. It is closer to 2, so it rounds to 2. The even rule is skipped.
Banker's Rounding Examples
| Input | Result | Explanation |
|---|---|---|
| 2.5 | 2 | 2 is even |
| 3.5 | 4 | 4 is even |
| 4.5 | 4 | 4 is even |
| 5.5 | 6 | 6 is even |
| 6.5 | 6 | 6 is even |
| 7.5 | 8 | 8 is even |
| 8.5 | 8 | 8 is even |
| 9.5 | 10 | 10 is even |
This pattern ensures that half of the tie cases round down (e.g. 2.5 → 2, 4.5 → 4) and the other half round up (e.g. 3.5 → 4, 5.5 → 6), balancing the overall outcomes.
Banker's Rounding to Decimal Places
When rounding to a specific decimal place, the exact halfway condition occurs when the next digit is 5 and all subsequent digits are zero. The retained digit determines the tie result.
To 1 Decimal Place
- 2.25 → 2.2
- 2.35 → 2.4
- 2.45 → 2.4
- 2.55 → 2.6
To 2 Decimal Places
- 2.125 → 2.12
- 2.135 → 2.14
- 2.145 → 2.14
- 2.155 → 2.16
It is important to remember that the even rule only applies when the discarded portion is exactly halfway (like .05, .005). If the value was 2.1251, it is above halfway, so it rounds up to 2.13.
Banker's Rounding With Negative Numbers
The exact same rule applies to negative numbers. Banker's Rounding always selects the even candidate for ties. Parity (even/odd) does not change with the sign.
−3.5 → −4
−4.5 → −4
−5.5 → −6
Banker's Rounding vs Round Half Up
Round Half Up always pushes exact ties away from zero (upward for positive numbers), while Banker's Rounding pushes ties to the nearest even number.
| Input | Banker's Rounding | Round Half Up |
|---|---|---|
| 2.5 | 2 | 3 |
| 3.5 | 4 | 4 |
| 4.5 | 4 | 5 |
| 5.5 | 6 | 6 |
Banker's Rounding vs Round Half Down
Round Half Down always pushes exact ties toward zero, whereas Banker's Rounding depends on the even-number rule.
| Input | Banker's Rounding | Round Half Down |
|---|---|---|
| 2.5 | 2 | 2 |
| 3.5 | 4 | 3 |
| 4.5 | 4 | 4 |
| 5.5 | 6 | 5 |
Banker's Rounding vs Traditional Rounding
In many elementary math contexts, the familiar rounding rule is Round Half Up, where an exact halfway value is rounded upward. Banker's Rounding uses a different tie-breaking rule.
Banker's Rounding vs Round to Even
Banker's Rounding and Round Half Even are the exact same rounding method. They are different names for identical logical operations.
Why Is Banker's Rounding Used?
When repeated calculations contain many exact halfway values, always rounding ties in one direction (like Half Up does) can create systematic bias. Round Half Even sends some ties upward and some ties downward based on parity. This can reduce rounding bias over large collections of calculations.
Banker's Rounding and Rounding Bias
Consider the task of summing a dataset containing several exact halfway values. By comparing the results of Half Up and Half Even against the exact mathematical sum, the bias-reducing effect becomes clear:
| Original | Half Up | Half Even (Banker's) |
|---|---|---|
| 1.5 | 2 | 2 |
| 2.5 | 3 | 2 |
| 3.5 | 4 | 4 |
| 4.5 | 5 | 4 |
| Total: 12.0 | Total: 14 | Total: 12 |
The exact sum is 12.0. Half Up introduces a +2 bias because every tie was rounded upward. Half Even produces no net rounding error in this particular example because the upward and downward tie adjustments balance each other. This does not mean Half Even always produces an exact total.
Where Is Banker's Rounding Used?
Banker's Rounding is used in some financial, accounting, statistical, scientific, and software systems. The actual rounding rule depends on the applicable standard, software, or organization.
Banker's Rounding in Programming
Different languages and libraries implement different rounding rules. Never assume that a function named round() defaults to a specific method. Check the documentation or explicitly request the desired rounding mode.
Does Python Use Banker's Rounding?
Yes. Python's built-in round() function uses Banker's Rounding (Round Half Even) by default for tie cases. For example, round(2.5) evaluates to 2, and round(3.5) evaluates to 4. Note that due to binary floating-point representation, some decimal fractions might not be stored as exact halfway values, which can occasionally bypass the tie rule.
C# / .NET
In C# and .NET, `Math.Round()` defaults to Banker's Rounding (MidpointRounding.ToEven). You can change this behavior by explicitly passing `MidpointRounding.AwayFromZero`.
Java
Java's `Math.round()` uses Round Half Up. To use Banker's Rounding, you must use the `BigDecimal` class and explicitly specify `RoundingMode.HALF_EVEN`.
JavaScript
JavaScript's `Math.round()` uses Round Half Up (specifically, toward positive infinity). JavaScript does not have a built-in Banker's Rounding function, so you must implement a custom rounding algorithm.
Does Excel Use Banker's Rounding?
No. Excel's standard ROUND function uses Round Half Up. To perform Banker's Rounding in Excel, you must either write a custom VBA function or use a more complex array formula to evaluate parity.
Common Banker's Rounding Mistakes
"Every 5 rounds up."
This describes Round Half Up, not Banker's Rounding. Banker's Rounding rounds half of the exact tie cases up, and half of them down based on parity.
"Every 5 rounds down."
This describes Round Half Down. Banker's Rounding alternates direction for exact ties.
"Banker's Rounding means rounding toward zero."
Rounding toward zero is truncation. Banker's Rounding targets the nearest value first, and only uses the even rule for ties.
"Banker's Rounding and Half Down are the same."
Half Down always sends ties toward zero. Banker's Rounding sends ties to the even number, which can be away from zero (e.g. 3.5 → 4).
"Banker's Rounding eliminates all rounding bias."
It can reduce systematic bias in large datasets, but it does not magically eliminate all bias in every arbitrary sample of numbers.
"All programming languages use Banker's Rounding."
JavaScript, PHP, and Java's default `Math.round()` use forms of Half Up. You must verify technical behavior per environment.
"All banks use Banker's Rounding."
Many financial institutions actually use Round Half Up due to historical legislation or simpler software limitations. Actual usage depends entirely on the organization and system.
"Any number containing 5 is a halfway case."
A value is only exactly halfway if the first discarded digit is 5 and there are no other non-zero digits after it (e.g., 2.500 is halfway; 2.501 is not).
Banker's Rounding Quick Reference
| Situation | Rule |
|---|---|
| Below halfway | Round to nearest value |
| Above halfway | Round to nearest value |
| Exact halfway + even retained digit | Keep it |
| Exact halfway + odd retained digit | Increase to next even digit |
2.5 → 2 (Exact halfway, 2 is even)
3.5 → 4 (Exact halfway, 3 is odd, increases to 4)
Banker's Rounding Formula
Conceptually, the Banker's Rounding rule states: evaluate the distance from the original number to the two closest allowed values. If one distance is shorter, select that value. If the distances are identical (an exact halfway case), compare the two possible rounded results and choose the one whose retained digit is even (divisible by 2).
Banker's Rounding Practice
Test your understanding with these practice questions.
1. Round 2.5 to the nearest whole number
Show Answer
Answer: 2. It is exactly halfway. The even candidate is 2.
2. Round 3.5 to the nearest whole number
Show Answer
Answer: 4. It is exactly halfway. The even candidate is 4.
3. Round −4.5 to the nearest whole number
Show Answer
Answer: −4. The candidates are −4 and −5. −4 has an even digit.
4. Round 6.51 to the nearest whole number
Show Answer
Answer: 7. It is above halfway (closer to 7). The even rule is not applied.
5. Round 2.35 to 1 decimal place
Show Answer
Answer: 2.4. Exactly halfway. The candidates are 2.3 and 2.4. 4 is the even digit.
6. Round 2.45 to 1 decimal place
Show Answer
Answer: 2.4. Exactly halfway. The candidates are 2.4 and 2.5. 4 is the even digit.
7. Round 1,250 to the nearest hundred
Show Answer
Answer: 1,200. Exactly halfway between 1,200 and 1,300. 2 is even.
8. Round 1,350 to the nearest hundred
Show Answer
Answer: 1,400. Exactly halfway between 1,300 and 1,400. 4 is even.
9. Round 2.145 to 2 decimal places
Show Answer
Answer: 2.14. Exactly halfway. The candidates are 2.14 and 2.15. 4 is even.
10. Round 2.155 to 2 decimal places
Show Answer
Answer: 2.16. Exactly halfway. The candidates are 2.15 and 2.16. 6 is even.
Frequently Asked Questions
What is Banker's Rounding?
Banker's Rounding is a tie-breaking method that resolves exact halfway cases by rounding to the nearest even number.
What is another name for Banker's Rounding?
Banker's Rounding is also called Round Half Even. IEEE 754 is a floating-point arithmetic standard that specifies several rounding-direction attributes, including roundTiesToEven, which uses the same even-number tie-breaking principle.
Is Banker's Rounding the same as Round Half Even?
Yes. Banker's Rounding and Round Half Even are the exact same rounding method.
Why does 2.5 round to 2?
2.5 is exactly halfway between 2 and 3. Banker's Rounding chooses the even result, and 2 is even while 3 is odd. Therefore, 2.5 rounds to 2.
Why does 3.5 round to 4?
3.5 is exactly halfway between 3 and 4. Banker's Rounding chooses the even result, and 4 is even while 3 is odd. Therefore, 3.5 rounds to 4.
Does Banker's Rounding round 5 up or down?
Banker's Rounding does not simply round every 5 up or down. For an exact halfway case, it chooses the result whose retained digit is even. For example, 2.5 rounds to 2 because 2 is even, while 3.5 rounds to 4 because 4 is even.
How does Banker's Rounding handle negative numbers?
Negative numbers follow the exact same parity rule. For example, −2.5 rounds to −2 because 2 is the even candidate.
What is Banker's Rounding used for?
It is used in finance, statistics, and software engineering to reduce systematic rounding bias over large datasets.
Why does Banker's Rounding reduce bias?
By sending approximately half of all tie cases upward and half downward, it prevents the cumulative drift that occurs when always rounding in a single direction.
What is the difference between Banker's Rounding and Half Up?
Half Up always rounds exact ties away from zero. Banker's Rounding rounds exact ties to the nearest even number.
What is the difference between Banker's Rounding and Half Down?
Half Down always rounds exact ties toward zero. Banker's Rounding rounds exact ties to the nearest even number.
Does Python use Banker's Rounding?
Yes. Python's built-in round() function uses Banker's Rounding (Round Half Even) by default.
Does Excel use Banker's Rounding?
No. Excel's standard ROUND function uses Round Half Up. You must write a custom formula or VBA function to achieve Banker's Rounding in Excel.