Rounding calculator
Type a number, pick how many places to keep and a rounding rule. The result is worked out on the exact decimal digits you typed, so 1.005 rounds half-up to 1.01, not to the 1.00 that floating-point arithmetic often gives.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Enter a number. Spaces and commas between digit groups are ignored; the decimal mark is a dot.
- Choose the place to round to: 0 to 10 decimals, or the nearest ten, hundred or thousand.
- Choose the rule. The big result uses it; the list below shows what every other rule would give for the same number.
How it works
The number is split into its digits and a decimal position, so no floating-point value is ever involved. Dropping the unwanted digits leaves a remainder; the rule decides whether to keep the truncated value or step one unit further away from zero:
- Half up / half down / half even look at the remainder. Below half, they truncate; above half, they step away; at exactly half, they differ (away from zero, toward zero, or to the even neighbour).
- Up, down, toward zero, away from zero ignore the size of the remainder and only look at the sign.
The “change” line shows rounded minus original, exactly.
Worked example
Round 2.675 to 2 decimals. The digits after the second decimal are 5, exactly half.
- Half up: 2.68
- Half even: 2.68 (the last kept digit becomes 8, an even number)
- Half down: 2.67
- Up: 2.68, Down: 2.67
Tips
- Use half even when you add up many rounded values, such as ledger lines; ties then cancel out on average.
- Spreadsheets usually round half away from zero (half up in this tool’s wording), the rule most people learn at school.
- Rounding to 0 decimals gives a whole number; rounding to the nearest ten with 4 gives 0, and -4 also gives 0, never “-0”.
Frequently asked questions
What is the difference between half up and half even?
Both round normally unless the digit dropped is exactly a 5 with nothing after it. Half up then always goes away from zero (2.5 becomes 3, 3.5 becomes 4). Half even, also called banker's rounding, goes to the neighbour whose last digit is even (2.5 becomes 2, 3.5 becomes 4), so ties do not push totals in one direction.
Why does 1.005 round to 1.01 here but to 1 in some programs?
Many programs store 1.005 as the closest binary fraction, 1.00499999999999989…, and round that. This calculator reads the digits you typed and works on them as a decimal, so the tie is seen as a tie and half-up gives 1.01.
How are negative numbers rounded?
Half up and half down are symmetric around zero, so -2.5 rounds half up to -3. Up (ceiling) always moves toward positive infinity (-1.5 becomes -1) and down (floor) toward negative infinity (-1.5 becomes -2). Toward zero cuts the digits off (-1.5 becomes -1), and away from zero does the opposite (-1.5 becomes -2).
How do I round to the nearest 10, 100 or 1000?
Pick Nearest ten, hundred or thousand in the Round to list. 1234.5678 to the nearest hundred is 1200; 1250 to the nearest hundred is 1300 with half up and 1200 with half even.
Can I round very long numbers?
Yes. The digits are handled as exact integers, so a number with dozens of digits keeps every digit that is not rounded away.