How rounding works
Pick a "place" (10k) you want to round to. The number is divided by that place value and the remainder is dropped according to the rule you chose. Multiplying back gives the rounded result.
For example, rounding 12,345 to the nearest hundred: 12,345 ÷ 100 = 123.45 → round to 123 → × 100 = 12,300.
FAQ
Why does 2.5 round to 2 with banker's rounding?
"Half to even" breaks ties by rounding to the nearest even integer. 2.5 → 2 (even); 3.5 → 4 (even). It's the IEEE 754 default and reduces statistical bias when many half-values are rounded.
What about negative numbers?
"Half away from zero" rounds −2.5 to −3; "half toward zero" rounds it to −2. The "half up" option follows mathematical convention (toward +∞), so −2.5 → −2.
How many decimal places does JavaScript support?
About 15 significant digits before floating-point representation noise creeps in. The calculator handles up to ~12 places safely.