What rounding does
Rounding replaces a number with a nearby one that is simpler, shorter or closer to the precision you need. You round when reporting measurements, splitting bills, setting prices or fitting a value into a fixed number of digits. The simplest rule, taught in school, looks at the first dropped digit: 5 or more rounds up and 4 or less rounds down. The trouble is exact halves, where the number sits precisely between two candidates. Different fields settle those ties differently, and this calculator supports each convention.
Choosing a precision
Precision names the place value you keep. Rounding 3.14159 to the hundredths place keeps two decimals and gives 3.14. A negative place such as tens or hundreds rounds to the left of the decimal point, so 1,284 to the nearest hundred is 1,300. You can also round to fractions of an inch, such as eighths or sixteenths, which is handy in woodworking: 15.65 rounded to the nearest eighth is 15 5/8, because 15.65 is closest to 15.625.
Rounding modes explained
| Mode | Rule | 5.5 | -5.5 | 6.5 |
|---|---|---|---|---|
| Nearest (default) | Ties go away from zero, the way most people round by hand | 6 | -6 | 7 |
| Half up | Ties go toward positive infinity | 6 | -5 | 7 |
| Half down | Ties go toward negative infinity | 5 | -6 | 6 |
| Half away from zero | Ties go to the larger magnitude | 6 | -6 | 7 |
| Half toward zero | Ties go to the smaller magnitude | 5 | -5 | 6 |
| Half to even | Ties go to the even neighbor | 6 | -6 | 6 |
| Half to odd | Ties go to the odd neighbor | 5 | -5 | 7 |
| Ceiling | Always toward positive infinity | 6 | -5 | 7 |
| Floor | Always toward negative infinity | 5 | -6 | 6 |
Why half to even exists
Always rounding ties upward introduces a small upward bias when you add many rounded values. Half to even, also called banker's rounding, sends ties to the even neighbor so that roughly half go up and half go down, and the errors cancel. It is the default in the IEEE 754 floating-point standard and is common in accounting software and statistics.
Ceiling and floor
Ceiling and floor ignore the halfway point entirely. Ceiling always moves up, so 5.01 becomes 6. Floor always moves down, so 5.99 becomes 5. Use ceiling when you must have at least enough, such as ordering boards or boxes, and floor when you can only use whole units, such as counting full packages.
Negative numbers
Rounding rules that mention "up" and "down" refer to the number line, not to magnitude. Rounding -5.5 half up gives -5, because -5 is higher on the number line than -6. If you want the larger magnitude, choose half away from zero.
Worked example
Round 2.675 to two decimals. Because this calculator works with exact decimal values, 2.675 is treated as exactly 2.675, a tie between 2.67 and 2.68. Half up gives 2.68, half down gives 2.67 and half to even gives 2.68 (8 is even). Many programming languages show 2.67 for the same input because the binary floating-point value stored for 2.675 is slightly below the true tie.
Rounding and significant figures
Rounding to a decimal place is different from rounding to significant figures. Three significant figures of 0.0012345 is 0.00123, which is five decimal places. When you need a fixed number of significant digits, count from the first non-zero digit and pick the matching place in the precision list.