Calcoid
Math

Rounding Calculator

Round any number to decimal places, significant figures, a specific place value, or the nearest multiple. Seven rules including banker's rounding.

Rounding Calculator

Round to a fixed number of digits after the decimal point.

Between 0 and 15.

Ties go toward +infinity.

Rounded value

3.14

3.14159 rounded to 2 decimal places (half up (standard school rule)) = 3.14.

Step-by-step trace
Original value
3.14159
Scaling factor
100
Scaled value
314.159
Integer part
314
Fractional part
0.158999999999992
Tie (exactly 0.5)?
No
Rule applied
Half up (standard school rule)
Result
3.14

Frequently Asked Questions about the Rounding Calculator

What is the difference between half-up and half-even rounding?
Half-up is the standard school rule: any value ending in exactly .5 rounds up, so 2.5 becomes 3 and 3.5 becomes 4. Half-even, also called banker's rounding, sends ties to the nearest even digit instead. That turns 2.5 into 2 and 3.5 into 4. Half-even is preferred in accounting, statistics, and IEEE 754 floating-point math because it removes the upward bias you get from always rounding .5 up across a long list of numbers.
Why does 3.145 sometimes round to 3.14 in JavaScript?
Because 3.145 cannot be stored exactly as a binary float. Internally it is closer to 3.1449999999999996, so a naive Math.round call sees it as below the halfway point and rounds down. This calculator corrects for that by detecting ties with a small tolerance, so 3.145 rounds to 3.15 with half-up, the way you would expect on paper.
How do I round to significant figures versus decimal places?
Decimal places count digits after the decimal point: 0.004567 to 2 decimal places is 0.00. Significant figures count meaningful digits from the first non-zero digit: 0.004567 to 2 significant figures is 0.0046. Use sig figs when the scale of the number can vary a lot, like in scientific measurements, and decimal places when you need a fixed number of digits after the point, like in currency.
What does ceiling, floor, and truncate mean?
Ceiling always rounds toward positive infinity: 3.2 becomes 4, and -3.7 becomes -3. Floor always rounds toward negative infinity: 3.7 becomes 3, and -3.2 becomes -4. Truncate always rounds toward zero by dropping the fractional part: 3.7 becomes 3, and -3.7 becomes -3. None of these care whether the fraction is above or below 0.5; they only care about direction.
What does negative place value mean?
A negative place value rounds to a digit after the decimal point. Place value 0 rounds to the nearest whole number, 1 to the nearest ten, 2 to the nearest hundred. Going the other way, -1 rounds to the nearest tenth (0.1), -2 to the nearest hundredth (0.01), and -3 to the nearest thousandth (0.001). So 12345 at place value 2 becomes 12300, and 12.3456 at place value -2 becomes 12.35.