Rounding replaces a number with a nearby value at a chosen level of precision. The answer is intentionally less detailed, so the chosen rule must be clear.
It is useful when an estimate is easier to read or sufficient for a decision, while the original exact value is still retained for later checking.
For nearest rounding, the digit immediately to the right of the retained place helps decide which value is closer. Exact halfway cases need a stated convention; directed modes instead move toward zero, away from zero, floor, or ceiling.
Key idea
See the relationship
4←4.5→5
Quick guide
How to use this calculator
Enter a finite decimal.
Choose decimal places or significant figures.
Choose the rounding mode before reading the result.
Calculation method
Quotient and remainder decide the direction
The calculator divides by the target power of ten exactly, compares the discarded remainder with half the divisor, then applies the selected tie and direction rule.
Worked example
A half-even tie
At zero decimal places, 2.5 is exactly halfway. The retained 2 is even, so half-even keeps it.
roundHalfEven(2.5) = 2
Supported inputs
Precision and limits
Exact decimal input
Finite decimals use integer-scaled arithmetic, with no binary floating-point conversion.
Input boundary
Unless stated otherwise, use at most 200 digits total and 100 digits after the decimal marker.