Rounding Calculator
Rounding 2.675 to 2 decimal places gives 2.68 with the usual “half up” rule: 2.675 is exactly halfway between 2.67 and 2.68, and half up sends a tie away from zero. Other modes disagree on a tie: half even (banker’s rounding) gives 2.68, half down 2.67, and floor, ceiling and toward zero always pick a side (2.67, 2.68, 2.67). Enter any number, then round it to a number of decimal places, to a place value such as tens or hundreds, or to the nearest multiple such as 0.05 or 5. The arithmetic is exact decimal, not floating point, so 1.005 rounds to 1.01 as it should.
Updated Runs in your browser: nothing you enter is uploadedHow this tool works
2.675 rounded to 2 decimal places, half up
2.68
Exactly halfway between 2.67 and 2.68; half up gives 2.68. Changed by +0.005.
The same number in every mode
- Half up
- 2.68
- Half even (banker’s)
- 2.68
- Half down
- 2.67
- Up (ceiling)
- 2.68
- Down (floor)
- 2.67
- Toward zero (truncate)
- 2.67
The working
- The step is 0.01: the result must be a multiple of it.
- 2.675 lies between the multiples 2.67 and 2.68.
- It is exactly halfway: 0.005 from each. This is a tie, so the mode decides.
- Half up: a tie goes away from zero (the school rule, and what spreadsheets do). Result: 2.68.
The six rounding modes compared
| Number | Rounded to | Half up | Half even | Half down | Up | Down | Toward zero |
|---|---|---|---|---|---|---|---|
| 2.5 | whole number | 3 | 2 | 2 | 3 | 2 | 2 |
| 3.5 | whole number | 4 | 4 | 3 | 4 | 3 | 3 |
| -2.5 | whole number | -3 | -2 | -2 | -2 | -3 | -2 |
| 2.675 | 2 decimal places | 2.68 | 2.68 | 2.67 | 2.68 | 2.67 | 2.67 |
| 1.005 | 2 decimal places | 1.01 | 1.00 | 1.00 | 1.01 | 1.00 | 1.00 |
Rounding to a place value or a multiple
| Number | Round to | Result | Note |
|---|---|---|---|
| 1234.5678 | Tens | 1230 | The digit in the ones place decides: 4 rounds down |
| 1234.5678 | Hundreds | 1200 | Tens digit 3 rounds down |
| 1250 | Hundreds | 1300 | Half up; half even gives 1200 |
| 1499.99 | Thousands | 1000 | Hundreds digit 4 rounds down |
| 2.62 | Multiple of 0.05 | 2.60 | Nearest five cents |
| 2.62 | Multiple of 0.05, up (ceiling) | 2.65 | Always to the larger multiple |
| 17.5 | Multiple of 5 | 20 | Exactly halfway between 15 and 20 |
| 130 | Multiple of 25 | 125 | Nearest quarter of a hundred |
Rounding 3.14159265 to 0 through 6 decimal places
| Decimal places | Half up | Half even | Up (ceiling) | Down (floor) |
|---|---|---|---|---|
| 0 | 3 | 3 | 4 | 3 |
| 1 | 3.1 | 3.1 | 3.2 | 3.1 |
| 2 | 3.14 | 3.14 | 3.15 | 3.14 |
| 3 | 3.142 | 3.142 | 3.142 | 3.141 |
| 4 | 3.1416 | 3.1416 | 3.1416 | 3.1415 |
| 5 | 3.14159 | 3.14159 | 3.14160 | 3.14159 |
| 6 | 3.141593 | 3.141593 | 3.141593 | 3.141592 |
Rounding 1234.5678 to each place value
| Place value | Step | Result | Digit that decides |
|---|---|---|---|
| Thousands | 1000 | 1000 | 2 |
| Hundreds | 100 | 1200 | 3 |
| Tens | 10 | 1230 | 4 |
| Ones | 1 | 1235 | 5 |
| Tenths | 0.1 | 1234.6 | 6 |
| Hundredths | 0.01 | 1234.57 | 7 |
| Thousandths | 0.001 | 1234.568 | 8 |
Rounding to the nearest 0.05, 0.25, 0.5, 5 or 25
| Number | Nearest 0.05 | Nearest 0.25 | Nearest 0.5 | Nearest 5 | Nearest 25 |
|---|---|---|---|---|---|
| 2.62 | 2.60 | 2.50 | 2.5 | 5 | 0 |
| 7.13 | 7.15 | 7.25 | 7.0 | 5 | 0 |
| 19.99 | 20.00 | 20.00 | 20.0 | 20 | 25 |
| 43.5 | 43.50 | 43.50 | 43.5 | 45 | 50 |
| 87 | 87.00 | 87.00 | 87.0 | 85 | 75 |
| 130 | 130.00 | 130.00 | 130.0 | 130 | 125 |
Negative numbers and ties rounded to a whole number in all six modes
| Number | Half up | Half even | Half down | Up | Down | Toward zero |
|---|---|---|---|---|---|---|
| -0.4 | 0 | 0 | 0 | 0 | -1 | 0 |
| -0.5 | -1 | 0 | 0 | 0 | -1 | 0 |
| -1.5 | -2 | -2 | -1 | -1 | -2 | -1 |
| -2.4 | -2 | -2 | -2 | -2 | -3 | -2 |
| -2.5 | -3 | -2 | -2 | -2 | -3 | -2 |
| -2.6 | -3 | -3 | -3 | -2 | -3 | -2 |
Why half even keeps a total from drifting
| Number | Half up | Half even |
|---|---|---|
| 0.5 | 1 | 0 |
| 1.5 | 2 | 2 |
| 2.5 | 3 | 2 |
| 3.5 | 4 | 4 |
| 4.5 | 5 | 4 |
| Total (exact total 12.5) | 15 | 12 |
Exact decimal rounding against binary floating point, to 2 decimal places
| Number | This calculator (half up) | JavaScript toFixed(2) | Same answer? |
|---|---|---|---|
| 0.125 | 0.13 | 0.13 | Yes |
| 1.005 | 1.01 | 1.00 | No |
| 1.255 | 1.26 | 1.25 | No |
| 2.675 | 2.68 | 2.67 | No |
| 8.345 | 8.35 | 8.35 | Yes |
| 0.615 | 0.62 | 0.61 | No |
Worked examples of rounding
| Number | Rounded to | Mode | Result |
|---|---|---|---|
| 4.5 | Whole number | Half up | 5 |
| 4.5 | Whole number | Half even | 4 |
| 0.125 | 2 decimal places | Half even | 0.12 |
| -7.5 | Whole number | Half down | -7 |
| 18.349 | 1 decimal place | Up | 18.4 |
| 65432 | Thousands | Half up | 65000 |
| 0.7349 | Multiple of 0.05 | Half up | 0.75 |
| 99.995 | 2 decimal places | Half up | 100.00 |
How to round a number
- Enter the number. Type it with digits, one decimal point and an optional minus sign, up to 60 characters. The page starts with 2.675.
- Choose where to round. Pick decimal places (0 to 30), a place value from millions down to ten thousandths, or the nearest multiple of a number such as 0.05 or 5.
- Choose a rounding mode. Half up is the school rule and the default. Pick half even for banker’s rounding, half down, up (ceiling), down (floor) or toward zero.
- Read the result and the working. The big figure is the rounded number. Below it the same number is shown in all six modes, and the working lists the two neighbouring multiples and which one is nearer: 2.675 lies between 2.67 and 2.68, exactly halfway.
Frequently asked questions
- How do you round a number to 2 decimal places?
- Look at the third decimal digit. If it is 5 or more, add 1 to the second decimal digit; if it is 4 or less, keep it. For 2.674 that gives 2.67, for 2.676 it gives 2.68, and for the tie 2.675 the half up rule gives 2.68. If the third digit is 5 and only zeros follow, the number is exactly halfway and the rounding mode decides; the directed modes (up, down, toward zero) ignore which side is nearer.
- Why do spreadsheets and JavaScript round differently?
- They store numbers as binary floating point, where most decimals cannot be held exactly: 2.675 is really 2.674999999999999822364316…, a hair below the tie, so (2.675).toFixed(2) returns 2.67 and (1.005).toFixed(2) returns 1.00. Spreadsheets such as Excel, Google Sheets and LibreOffice round the 15 significant digits they display, so ROUND(2.675, 2) gives 2.68. JavaScript’s Math.round also treats ties differently from the school rule: Math.round(2.5) is 3 but Math.round(-2.5) is -2, because it sends ties toward positive infinity, while half up here goes away from zero and gives -3. This calculator reads the digits you type as an exact decimal, so none of these surprises occur.
- What is banker’s rounding (round half to even)?
- A tie is sent to the neighbour whose last digit is even, so ties round up half the time and down half the time. 2.5 gives 2 and 3.5 gives 4, where half up gives 3 and 4. Over many values the rounding errors cancel instead of drifting upward, which is why it is the default in IEEE 754 arithmetic, Python’s round(), .NET’s Math.Round and much financial and statistical software. Only exact ties are affected: 2.6 rounds to 3 in every half mode.
- What is the difference between half up, half down and half even?
- They differ only when the number is exactly halfway between two candidates. Half up sends the tie away from zero, half down sends it toward zero, and half even sends it to the even neighbour. For 2.5 they give 3, 2 and 2; for -2.5 they give -3, -2 and -2. Away from a tie all three agree.
- What do up, down and toward zero mean?
- They ignore which neighbour is nearer. Up (ceiling) always goes to the larger neighbour, down (floor) to the smaller one, and toward zero (truncate) drops the extra digits. They only differ for negative numbers: -2.5 rounded to a whole number is -2 with ceiling, -3 with floor and -2 toward zero, while 2.5 gives 3, 2 and 2.
- How do I round to the nearest 0.05, 5 or 25?
- Choose “The nearest multiple of…” and type the step. The calculator divides the number by the step, rounds that quotient to a whole number with your mode, and multiplies back. 2.62 to the nearest 0.05 is 2.60, 17 to the nearest 5 is 15, and 130 to the nearest 25 is 125. The step must be greater than zero and at most 30 characters.
- How do I round to the nearest ten, hundred or thousand?
- Choose “A place value” and pick it from the list. 1234.5678 rounds to 1230 at the tens place, 1200 at the hundreds and 1000 at the thousands. Rounding to a place value is the same as rounding to a multiple of 10, 100 or 1,000, so the result has no decimals.
- Why is 1.005 rounded to 1.01 here but 1.00 in my code?
- Because 1.005 is exactly halfway between 1.00 and 1.01 as a decimal, and half up sends it to 1.01. In binary floating point the stored value is slightly below 1.005, so (1.005).toFixed(2) returns 1.00. To get the decimal answer in code, do the arithmetic on integers or a decimal type, or round the digits as text, which is what this calculator does.
- What is the result for a negative number that rounds to zero?
- It is shown as plain 0 with no minus sign: -0.4 rounded to a whole number is 0, and -0.001 to 2 places is 0.00. A negative zero has no meaning in decimal arithmetic.
- What does 0.5 round to?
- It depends on the mode, because 0.5 is exactly halfway between 0 and 1. Half up gives 1, the school answer, and half even gives 0 because 0 is the even neighbour. For -0.5, half up gives -1 (away from zero) and half even and half down give 0. Any value below 0.5 rounds to 0 in every half mode, for example 0 for 0.4999.
- Does rounding a list of numbers change their total?
- It can. The five ties 0.5, 1.5, 2.5, 3.5, 4.5 add up to 12.5. Rounded half up to whole numbers they add up to 15, because every tie moves up; rounded half even they add up to 12, because the ties split between up and down. When many numbers have to add up to a stated total, round the total once at the end rather than adding rounded values, and say which rule you used.
- Why is rounding in two steps a mistake?
- Each rounding throws digits away, so a second one can land on the wrong side. Rounding 2.4999 to one decimal place gives 2.5, and rounding that to a whole number gives 3, but rounding 2.4999 to a whole number in one step gives 2, because 2.4999 is below the halfway point 2.5. Always round the original, unrounded number once, to the final place.
- How do I round to one decimal place?
- Look at the second decimal digit: 5 or more raises the first decimal digit by 1, 4 or less keeps it. 3.14159265 rounds to 3.1, 2.25 is an exact tie that gives 2.3 half up and 2.2 half even, and 18.349 gives 18.3 to the nearest tenth but 18.4 when you always round up. Choose 1 in the decimal places box of the calculator.
- How do I round a price to the nearest 5 cents?
- Choose “The nearest multiple of…” and type 0.05. A price of 2.62 becomes 2.60, 2.63 becomes 2.65 and 2.625, exactly between two multiples, becomes 2.65 half up or 2.60 half even. Use up (ceiling) to always go to the higher multiple: 2.65 for 2.61. Whether a shop or tax rule rounds a total this way is set by that rule, not by this calculator.
- Is there a limit on the size of the number?
- The number may be up to 60 characters, the decimal places up to 30 and a multiple up to 30 characters. Within that every digit is kept: 123456789012345678901234567890.5 rounds half up to 123456789012345678901234567891. Commas, exponents such as 1e5 and spaces are not accepted; write plain digits. Nothing you enter leaves your browser.
How it works
The number you type is read as exact decimal digits: a whole number made from every digit, and a count of how many sit after the point, so 2.675 is 2675 with 3 decimals and never a binary approximation. The target is turned into a step: 10^-n for n decimal places, 10^k for a place value such as tens (10) or hundreds (100), or the multiple you typed. The number is divided by the step as an exact fraction; integer division gives the lower multiple and the remainder says how far past it the number is. Comparing twice the remainder with the divisor tells whether the number is below, exactly at or above the halfway point. Half up sends a tie away from zero, half down toward zero, half even to the neighbour with an even quotient; ceiling goes to the larger multiple, floor to the smaller and toward zero drops the remainder. The magnitude is rounded first and the sign applied after, so the rules are symmetric around zero, apart from ceiling and floor, which look at the sign. The answer is the rounded quotient times the step, written with the target’s number of decimals (a multiple shows the decimals of the multiple). A result of zero never carries a minus sign. Input is limited to 60 characters, 30 decimal places and a 30-character multiple, which keeps every calculation instant. Everything runs in your browser and nothing you type is sent anywhere.
Sources
More free tools
- Significant Figures CalculatorCount sig figs with each digit’s rule shown, round to N sig figs (half up or half to even), and add, subtract, multiply or divide by the sig fig rules.
- Decimal to Fraction ConverterTurn a decimal like 0.375 or 0.1(6) into an exact fraction, or round inches to the nearest 1/16 or 1/32 on a tape measure, with the working shown.
- Square Root CalculatorSquare roots, cube roots and nth roots with the simplified radical (√72 = 6√2), perfect-power check, 30-digit decimals, negative inputs and fractions.
- Ratio CalculatorSimplify a ratio like 12:18 to 2:3, scale it up or down, compare two ratios, turn it into fractions and percentages, or split a total such as 500 in 3:2.
- Percent Change CalculatorPercent increase or decrease from an old to a new value, a number raised or cut by x%, the original value, percentage points, chained changes and CAGR.
- Long Division CalculatorLong division with remainder and the decimal worked out step by step, the repeating block marked (1/7 = 0.(142857)). Exact for decimals and big numbers.
More: Percent, fractions and arithmeticAll math & numbersAll toolsHome & DIY calculators