Sumivo · Mathematics
Rounding Calculator
Compare six exact rounding rules. Use 0 (or integer) for whole numbers, 2 for hundredths, −1 for tens or −2 for hundreds. Half-up means ties away from zero: −2.5 becomes −3, not −2 as with ties toward +∞.
01 / inputs
02 / result
Half-up (ties away from zero)
3
- Rounding unit
- 10^0
- Exact midpoint?
- Yes
Calculation trace
- 10^0Choose the rounding unit
- 2 retained units; discarded digits: 5Split the magnitude into retained units and a remainder
- 2.5 ≈ 3Apply half-up
Discarded digits: 5. The discarded magnitude is exactly half of one rounding unit. Half-up ties go away from zero; half-down ties go toward zero; half-even ties keep an even retained integer.
| Mode | Result |
|---|---|
| Half-up (ties away from zero) | 3 |
| Half-down (ties toward zero) | 2 |
| Half-even (bankers rounding) | 2 |
| Floor (toward −∞) | 2 |
| Ceiling (toward +∞) | 3 |
| Truncate (toward zero) | 2 |
How it works
The selected decimal place defines a power-of-ten unit. Exact integer division separates retained units from the discarded digits, then compares the remainder with half a unit. All six modes use that same exact comparison. Half-up chooses the nearest value with ties away from zero; half-down chooses the nearest with ties toward zero; half-even chooses the nearest with an even retained integer at a tie. Floor moves toward negative infinity, ceiling toward positive infinity, and truncate toward zero.
Assumptions & limits
- Half-up here means the school rule on the magnitude: −2.5 becomes −3. It does not mean ties toward positive infinity, which would make −2.5 become −2. Half-down ties go toward zero, not toward negative infinity.
- Enter decimal strings or e/E notation, with at most 4096 characters and 2000 coefficient digits. Input and normalized exponents must be between −1000 and 1000. Places must be an integer from −2000 to 2000; 0 or integer means the ones place, −1 tens and −2 hundreds. Invalid inputs are rejected, never clamped.
- Positive places preserve that many fractional digits, even for zero. Negative zero is normalized. This tool rounds a value to a place; it does not infer measurement precision. Half-even is also called bankers rounding and uses the tie principle of the IEEE default nearest-even mode. This tool uses decimal arithmetic, not a binary IEEE format.
FAQ
- How do I round a number to two decimal places?
- Enter 2 for decimal places. The tool compares the discarded magnitude with 0.005. With half-up, 0.125 becomes 0.13; half-even makes it 0.12 because the retained 2 is even.
- How do you round negative numbers?
- The direction depends on the rule. At the ones place, −2.5 becomes −3 with half-up and floor, but −2 with half-down, half-even, ceiling and truncate.
- What is bankers rounding?
- Half-even rounding selects the nearest value and breaks exact ties by keeping an even retained integer: 2.5 becomes 2 and 3.5 becomes 4 at the ones place. A value above the midpoint, such as 2.5001, still becomes 3.
- How do I round to the nearest ten or hundred?
- Use −1 decimal places for tens or −2 for hundreds. With half-up, 150 rounded to hundreds is 200. Enter 0 or integer to round to a whole number.
- What is the difference between rounding and truncation?
- Truncation discards the remainder toward zero: −2.9 becomes −2. Nearest rounding uses the remainder to choose a neighbor, so half-up makes −2.9 become −3. Floor always moves toward negative infinity.
Related calculators
SOURCES
- OpenStax, Rice UniversityPrealgebra 2e — 5.1 Decimals ↗
Section 5.1, Round Decimals: place values and nearest rounding using the next digit. Signed tie rules and input limits are explicitly defined by this calculator.
Accessed 2026-10-02
- National Institute of Standards and Technology (NIST)Guide for the Use of the International System of Units (SI) — NIST Special Publication 811 ↗
Appendix B.7.1, Rounding numbers: exact-half ties retain an even last digit; discarded digits above half increase the retained digit. Other selectable rounding modes are calculator conventions.
Accessed 2026-10-02
- Institute of Electrical and Electronics Engineers (IEEE)Floating-point arithmetic — IEEE Technology Navigator ↗
IEEE overview: rounding directions and the default round-to-nearest ties-to-even mode. This decimal calculator implements the tie principle, not a binary floating-point format or IEEE conformance suite.
Accessed 2026-10-02