Rounding Calculator
Round to decimal places, significant figures or the nearest 10, 100 or any multiple, by any rounding rule, and count significant figures.
One number per line; a list is rounded line by line.
2.35
Deciding digit: 2.345
2.345 is exactly halfway between 2.34 and 2.35; half away from zero takes the one further from zero, 2.35.
Every rule
| Rule | Result |
|---|---|
| Half away from zero | 2.35 |
| Half up | 2.35 |
| Half down | 2.34 |
| Half to even (banker's) | 2.34 |
| Half toward zero | 2.34 |
| Up (ceiling) | 2.35 |
| Down (floor) | 2.34 |
| Toward zero (truncate) | 2.34 |
| Away from zero | 2.35 |
Round a number, or a whole column of them, to decimal places, significant figures, the nearest multiple of anything, or the nearest fraction of an inch. Nine rounding rules are offered, from the one taught at school to banker's rounding, and a table shows what each rule gives for your number. A second mode counts significant figures digit by digit and does arithmetic by the significant-figure rules.
Numbers are rounded as exact decimals, not as computer floating point, so a value such as 1.005 rounds the way it is written.
How to use it
Round takes one number per line: one gives the full working, several give a table and a column to copy, up to 1,000 lines. Numbers can be negative, use grouping (1,234.5), scientific notation (4.5e-7) or fractions (7/8). Round to 0 to 20 decimal places, 1 to 30 significant figures, any multiple (1, 10, 100, 1000, 5, 0.5, 0.25 are a click away), or the nearest 1/2, 1/4, 1/8, 1/16, 1/32, 1/64.
The rule starts as half away from zero. For a single number, the result shows the digit that decided the rounding (for decimal places, significant figures and multiples of 10, 100 and 1000), the two values it lay between, and a table of every rule.
Significant figures marks each digit of a number as significant, a leading zero, or an ambiguous trailing zero. Beside it, two numbers can be added, subtracted, multiplied or divided with the result rounded by the significant-figure rules, rounding halves away from zero.
Rounding rules
Five rules differ only at an exact half. Half away from zero, which is Excel's ROUND, sends 2.5 to 3 and −2.5 to −3. Half up sends halves toward +∞, so −2.5 becomes −2; half down sends them toward −∞. Half toward zero sends 2.5 to 2 and −2.5 to −2. Half to even sends a half to whichever neighbour ends in an even digit: 2.5 to 2, 3.5 to 4.
Four rules ignore halves and always go one way: up (ceiling) and down (floor) by the number line, toward zero (truncate) by dropping digits, and away from zero. Five of the nine are the rounding-direction attributes of IEEE 754, the standard for computer arithmetic: half away from zero (roundTiesToAway), half to even (banker's) (roundTiesToEven), up (ceiling) (roundTowardPositive), down (floor) (roundTowardNegative), toward zero (truncate) (roundTowardZero).
Half to even is called banker's rounding because it keeps totals honest. Rounding every half up adds a little each time, and over many values the sum drifts upward. Sending half of the halves down and half up cancels that drift on average, which is why it is the IEEE 754 default for binary arithmetic.
Significant figures count from the first non-zero digit. Zeros between other digits count; leading zeros only place the point; trailing zeros count when there is a decimal point. In a sum or difference the result keeps the last place that both numbers are precise to; in a product or quotient it keeps the fewer significant figures.
Examples
1.005 to 2 decimal places
With the default rule, 1.005 rounds to 1.01: it is exactly halfway. In JavaScript, (1.005).toFixed(2) gives 1.00, because the nearest binary double to 1.005 is slightly below it.
1234.5 to 3 significant figures
1234.5 becomes 1,230. Written out, its final zero looks like a fourth figure, so the result also gives 1.23 × 10³, which shows three.
3.3 inches to the nearest 1/16
Round to Fraction, nearest 1/16: 3.3 is 3 5/16 (3.3125), the nearest sixteenth on a ruler.
Adding and multiplying measurements
12.11 + 18.0 is 30.1: 18.0 is precise only to one decimal place.
- 12.11 is precise to 2 decimal places.
- 18.0 is precise to 1 decimal place.
- Work out the exact result. 12.11 + 18.0 = 30.11
- Round to 1 decimal place, the less precise of the two. 30.1
4.56 × 1.4 is 6.4: 1.4 has only two significant figures.
Every rule on the same halves
| Rule | 2.5 | 3.5 | −2.5 | 2.45 |
|---|---|---|---|---|
| Half away from zero | 3 | 4 | −3 | 2.5 |
| Half up | 3 | 4 | −2 | 2.5 |
| Half down | 2 | 3 | −3 | 2.4 |
| Half to even (banker's) | 2 | 4 | −2 | 2.4 |
| Half toward zero | 2 | 3 | −2 | 2.4 |
| Up (ceiling) | 3 | 4 | −2 | 2.5 |
| Down (floor) | 2 | 3 | −3 | 2.4 |
| Toward zero (truncate) | 2 | 3 | −2 | 2.4 |
| Away from zero | 3 | 4 | −3 | 2.5 |
Frequently asked questions
See also
- Scientific Notation Calculator — to write a rounded number in scientific or engineering notation.
- Decimal to Fraction Converter — to turn a rounded decimal into a fraction.
- Scientific Calculator — to work out the value before rounding it.