Rounding Calculator

Round to decimal places, significant figures or any nearest increment.

Decimals, negatives and 1.2e-3 are fine. It is rounded exactly as typed.

Round to

Try an example

Rounded

18.38

18.379 rounded to 2 decimal places (nearest hundredth) is 18.38.

The next digit is 9, which is 5 or more, so the 7 becomes 8.

Fix the highlighted field to update the result.

Every rounding mode

The same number rounded in each mode
ModeRuleResult
Half up (school rule)5 or more rounds up; ties go away from zero18.38
Half downTies go toward zero; otherwise nearest18.38
Half even (banker’s)Ties go to the even digit; otherwise nearest18.38
Ceiling (up)Always toward +∞18.38
Floor (down)Always toward −∞18.37
Truncate (toward zero)Drop the extra digits18.37
Away from zeroAlways away from zero18.38

How to use

  1. Type the number exactly as you have it. Commas between thousands and E notation (1.2e-3) are fine.
  2. Choose what to round to: decimal places, significant figures or the nearest multiple of a step such as 5, 0.5 or 1/8.
  3. Pick a rounding mode. Half up is the rule taught in school.
  4. Read the result, the reason, and the same number in every mode.

How rounding works

Look at the digit just after the place you keep. If it is 5 or more, the kept digit goes up by 1; if it is less than 5, it stays. Then drop the rest.

The modes differ only for ties (a dropped part of exactly 5) or in direction:

  • Half up: ties go away from zero, so 2.5 → 3 and −2.5 → −3.
  • Half even (banker’s): ties go to the even digit, so 2.5 → 2 and 3.5 → 4. NIST uses this rule.
  • Ceiling, floor, truncate: always toward +∞, toward −∞ or toward zero.

Examples

  • 18.379 to 2 decimal places: the next digit is 9, so the 7 becomes 8: 18.38.
  • 29,504 to the nearest thousand: the next digit is 5, so 29 becomes 30: 30,000.
  • 37 to the nearest 5: 37 ÷ 5 = 7.4, which rounds to 7, and 7 × 5 = 35.
  • 7.3 to the nearest 0.5: 7.3 ÷ 0.5 = 14.6, which rounds to 15, and 15 × 0.5 = 7.5.

Rounding modes compared

Mode 2.5 −2.5 2.675 (2 places)
Half up 3 −3 2.68
Half down 2 −2 2.67
Half even 2 −2 2.68
Ceiling 3 −2 2.68
Floor 2 −3 2.67
Truncate 2 −2 2.67
Away from zero 3 −3 2.68
Why some software gives 2.67 for 2.675

Computers usually store decimals in binary, where 2.675 becomes 2.67499999999999982236… That value is just below the tie, so float-based rounding gives 2.67.

This calculator rounds the decimal you typed, digit by digit, so 2.675 → 2.68 and 1.005 → 1.01 with half up. For money, check which rule your bank, tax office or software requires.

To count significant figures as well as round to them, use the significant figures calculator.

Frequently asked questions

How do I round to 2 decimal places?

Look at the third decimal digit. If it is 5 or more, add 1 to the second digit; otherwise leave it, then drop the rest. 18.379 becomes 18.38.

What is banker’s rounding?

It is round half to even: an exact tie goes to the even neighbour, so 2.5 → 2 and 3.5 → 4. Ties split evenly up and down, so totals don’t drift upward.

Why do some apps round 2.675 to 2.67?

Computers store 2.675 in binary as 2.67499999…, just below the tie, so Python’s round() gives 2.67. This calculator rounds the decimal you typed, giving 2.68.

How are negative numbers rounded?

Half up here means away from zero, so −2.5 becomes −3. Ceiling always moves toward +∞ (−2.5 → −2), floor toward −∞ (−3), and truncate just drops digits (−2).

How do I round to the nearest 5, 10 or 0.5?

Round to the closest multiple of that step. 37 to the nearest 5: 37 ÷ 5 = 7.4, which rounds to 7, and 7 × 5 = 35. 7.3 to the nearest 0.5 is 7.5.

What is the difference between rounding and truncating?

Truncating just cuts off digits, so 2.79 truncated to one place is 2.7. Rounding picks the nearest value instead, giving 2.8.

Embed this calculator

Add this calculator to your own website for free. Copy the code below and paste it into your page’s HTML. The attribution link is optional.