Skip to content

How does each rounding mode change a number?

Round to decimals or significant figures and see what each of six rounding modes gives.

Round to

Half up (ties away from zero)

3

A tie goes away from zero: for example 2.5 becomes 3 and −2.5 becomes −3.

Half up (ties away from zero)
3
Half even (banker’s)
2
Down (toward −∞)
2
Up (toward +∞)
3
Toward zero
2
Away from zero
3

Round to decimals or significant figures and see what each of six rounding modes gives.

How to use

  1. Enter the number you want to round.
  2. Choose decimal places or significant figures, how many, and the rounding mode.
  3. Compare all six modes beneath the selected result.

How it works

Rounding replaces a number with a nearby value at a chosen precision. Decimal places count positions after the point; significant figures count from the first nonzero digit.

Half up here means ties away from zero: ±2.5 becomes ±3. Half even sends ties to the even neighbour: 2.5 becomes 2 and 3.5 becomes 4. Down and up follow IEEE 754 direction terminology and mean toward negative and positive infinity.

Toward zero discards the fractional part; away from zero chooses the next larger magnitude. Decimal shifting uses the shortest decimal representation, so 1.005 rounds half up to 1.01 at two decimal places. Inputs are JavaScript numbers, limited to ±10¹²; this is not an arbitrary-precision decimal engine.

Worked example

A halfway value

  1. 2.5 → 3 (half up), 2 (half even), 2 (down), 3 (up).

Default input → 3.

Frequently asked questions

What is banker’s rounding?

Half even: an exact halfway value goes to the neighbour with an even final digit.

Does down always mean toward zero?

No. Down means toward negative infinity: −2.1 becomes −3 at zero decimal places.

How are negative ties handled?

Half up sends them away from zero. Half even chooses the even neighbour.

How do significant figures differ from decimals?

They start at the first nonzero digit, so 1234 to two significant figures becomes 1200.

Why does 1.005 round to 1.01?

The half-up calculation uses the visible decimal representation rather than its nearby binary approximation.

Send feedback