Rounding Calculator
Pick a rounding kind and a digit count. Half up, half down, and half even disagree on ties. Floor and ceil step toward -infinity or +infinity. Significant figures use the digits field as the significant count.
Rated 4.7 out of 5 based on 301 reviews
How to round a number
- Enter the number x. The default 1.25 is a half-up tie at one decimal place.
- Set digits from 0 to 12. For significant figures, digits is the significant count.
- Pick half up, half down, half even, floor, ceil, or significant figures.
- Read the rounded value and the original. IEEE float still applies before the chosen rule.
Decimal rounding modes
Half up, half down, half even, floor, ceil, or significant figures
| Half up | Ties move away from 0 after scaling |
|---|---|
| Half down | Ties move toward 0 after scaling |
| Half even | Banker's rounding. Ties go to the even digit |
| Floor and ceil | Math.floor and Math.ceil on the scaled value |
| Significant figures | Digits field is the significant count, defaulting to 6 if 0 |
| Digit cap | 0 to 12 |
What this rounding page does
You choose a rule, not a single schoolbook round. Half up on 1.25 to one decimal is 1.3. Half even on a .5 tie looks at whether the kept digit is already even. Floor and ceil are not synonyms for half up. Scientific notation of the same number is a converter job on the scientific notation page.
How each kind rounds
The engine scales by 10 to the digits power, then applies the kind. Half up uses floor(scaled + 0.5) for positives and the mirrored step for negatives. Half down uses ceil(scaled - 0.5) for positives. Half even sends an exact .5 tie to the even integer. Floor and ceil use the JavaScript functions on the scaled value. Significant figures pick an exponent from log10 of |x| and then Math.round.
Ties, bankers rounding, and significant figures
IEEE 754 default rounding in hardware is often round-ties-to-even, close in spirit to half even, but this page applies the rule after a decimal scale, not at the last binary bit. Binary float can make 1.25 inexact before the rule runs. Significant figures on 0 stay 0. Digits 0 with kind sig uses 6 significants because the engine treats 0 digits as 6 in that branch.
Use cases
A homework check of 1.25 to one decimal, a money example that needs half even, or a lab value that must keep three significant figures. Currency legal rounding can differ by jurisdiction.
Limits
Digits must be an integer from 0 to 12. Binary float still applies. No BigDecimal. CZNull does not receive the numbers.