Rounding and significant figures calculator

Round a number to decimal places, significant figures or the nearest ten or hundred under nine rules, including banker's rounding, floor and ceiling.

Drafted with AI writing toolsUpdated Checked examples: 8

Negative decimal places round to tens (−1), hundreds (−2) and so on
Try
Rounded
Rounded: 1234.57
Rounding error (rounded − original)
0.0022
Scientific notation
1.23457 × 10³
Engineering notation
1.23457 × 10³

Rounded to 2 decimal places with the “Half up (school rounding)” rule, the number becomes 1234.57 (it lay between 1234.56 and 1234.57); the rounding changed it by +0.0022.

Rounding to 2 decimal places

1234.561234.57halfwayyour number
Every rounding rule at 2 decimal places Rows: 9
RuleResultChange
Half up (school rounding)1234.570.0022
Half to even (banker's)1234.570.0022
Half down1234.570.0022
Half toward +∞1234.570.0022
Half toward −∞1234.570.0022
Floor (always down)1234.56−0.0078
Ceiling (always up)1234.570.0022
Truncate (toward zero)1234.56−0.0078
Away from zero1234.570.0022
How it's calculated S
  1. Neighbours at this precision

    1234.56<1234.5678<1234.57,m=1234.5651234.56 < 1234.5678 < 1234.57,\quad m = 1234.565

    m is the midpoint between the two neighbours.

  2. Apply the rule: Half up (school rounding)

    The number is above halfway, so it rounds to the nearer neighbour, 1234.57. (This rule only decides exact ties: ties go away from zero.)

  3. Scientific and engineering notation

    1.23457×1031.23457×1031.23457 \times 10^{3} \qquad 1.23457 \times 10^{3}

About the rounding and significant figures calculator

Rounding replaces a number with the nearest value that has a chosen number of decimal places or significant figures. The calculator finds the two candidates either side of the number at that precision and applies one of nine rules: the five “half” rules (up, to even, down, toward +∞, toward −∞) differ only when the number sits exactly halfway, while floor, ceiling, truncate and away-from-zero always move in one direction.

Lab reports round measurements to significant figures, prices are rounded to two decimal places, and programmers check which rule their language uses. The default, 1234.5678 to 2 decimal places, gives 1234.57, a change of +0.0022; the table lists the result under all nine rules at once. Negative decimal places round to tens (−1), hundreds (−2) and so on.

The rounded result keeps significant trailing zeros, so 999.96 to one place shows 1000.0, not 1000. Scientific notation shows exactly the significant figures kept, which removes the ambiguity of trailing zeros in a number like 1200.

In the formula, R applies the chosen rule to reach a whole number, and R_d rounds to d decimal places. Negative d rounds to tens, hundreds and larger powers of ten.

How to round a number

Find the last digit you are keeping and look at the digit after it: 5 or more rounds the kept digit up, and 4 or less leaves it unchanged. Rounding 7.3482 to two decimal places gives 7.35, because the next digit is 8. An exact tie, such as 2.345 to two places, depends on the rounding rule.

Decimal places vs significant figures

Decimal places count digits after the decimal point. Significant figures count from the first nonzero digit, so leading zeros never count. 0.0012345 is 0.001 to three decimal places but 0.00123 to three significant figures.

To round to tens, hundreds or thousands, use −1, −2 or −3 decimal places. 4,567 to the nearest hundred (−2 places) is 4,600.

Zeros at the end of a decimal are significant: 1000.0 says the value is known to the tenths place. A whole number like 1200 is ambiguous, so scientific notation such as 1.2 × 10³ is used to show exactly two significant figures.

Worked rounding examples

NumberRound toHow manyRuleRounded
2.345Decimal places2Half up2.35
2.345Decimal places2Half to even2.34
−2.5Decimal places0Half up−3
−2.1Decimal places0Floor−3
−2.1Decimal places0Ceiling−2
−2.1Decimal places0Truncate−2
1250Decimal places−2Half to even1200
0.0012345Significant figures3Half up0.00123
999.96Decimal places1Half up1000.0

1250 sits exactly halfway between 1200 and 1300, so the tie rule decides: half to even keeps 1200 because 2 is even, while half up would give 1300. Rounding 999.96 to one place carries into a new digit and keeps the trailing zero, 1000.0.

Round half to even (banker's rounding)

Round half to even sends an exact tie to the neighbor whose last digit is even: 2.345 becomes 2.34, and 2.355 becomes 2.36. Ties then go up and down equally often, so long sums do not drift.

Rounding 0.5, 1.5, 2.5 and 3.5 to whole numbers shows the drift. Half up gives 1, 2, 3 and 4, which sum to 10; half to even gives 0, 2, 2 and 4, which sum to 8, the same as the original values.

Half to even is the default in IEEE 754 floating-point arithmetic, and NIST SP 811 uses it when the digits dropped are a 5 followed only by zeros.

The nine rounding rules

The first five rules pick the nearer neighbor and differ only at exact ties. The last four always move in one direction, however close the number is to the other neighbor.

  • Half up: ties go away from zero, so 2.5 → 3 and −2.5 → −3.
  • Half down: ties go toward zero, so 2.5 → 2 and −2.5 → −2.
  • Half to even: ties go to the even neighbor, so 2.5 → 2 and 3.5 → 4.
  • Half toward +∞: ties go to the larger neighbor, so −2.5 → −2.
  • Half toward −∞: ties go to the smaller neighbor, so 2.5 → 2.
  • Floor: always down, so −2.1 → −3.
  • Ceiling: always up, so −2.1 → −2.
  • Truncate: drops the extra digits, moving toward zero, so 1.99 → 1 and −2.1 → −2.
  • Away from zero: always outward, so 2.1 → 3 and −2.1 → −3.

Python's decimal module has seven of these rules. Its names can mislead: ROUND_DOWN means truncate toward zero, and ROUND_UP means away from zero.

Common rounding mistakes

  • Rounding twice. 2.345 to two places is 2.35, and rounding that to one place gives 2.4. Rounding 2.345 straight to one place gives 2.3.
  • Dropping significant zeros. Writing 1000 for 1000.0 hides the precision you rounded to.
  • Assuming half up makes negatives larger. Half up moves ties away from zero, so −2.5 becomes −3.
  • Trusting binary floating point at ties. In Python, round(2.675, 2) returns 2.67, because 2.675 is stored as a binary number slightly below 2.675.
  • Rounding intermediate results. Keep full precision through a calculation and round only the final answer.

Input formats

  • Decimal places can run from −15 to 50, and significant figures from 1 to 50. The count must be a whole number.
  • Numbers are handled as exact decimals, so 2.675 is a true tie and rounds to 2.68 under half up or half to even.

For numbers written as powers of ten, use the scientific notation calculator. To carry measurement uncertainty through a calculation, use the percent error and propagation calculator.

Worked examples

1234.5678 to 2 decimal places

Number
1234.5678
Round to
Decimal places
How many
2
Rounding rule
Half up (school rounding)
Rounded
1,234.57
Rounding error (rounded − original)
0.0022

Checked against: Independent calculation

Banker's rounding of a tie, 2.345

Number
2.345
Round to
Decimal places
How many
2
Rounding rule
Half to even (banker's)
Rounded
2.34

Checked against: Independent calculation

Same tie rounded half up

Number
2.345
Round to
Decimal places
How many
2
Rounding rule
Half up (school rounding)
Rounded
2.35

Checked against: Quantize with ROUND_HALF_UP = 2.35

0.0012345 to 3 significant figures

Number
0.0012345
Round to
Significant figures
How many
3
Rounding rule
Half up (school rounding)
Rounded
0.00123
Scientific notation
1.23 × 10⁻³

Checked against: Independent calculation

Questions

How do you round to significant figures?

Count from the first non-zero digit, keep the number of digits you need, and round on the next one. For 0.0012345 to 3 significant figures, skip the leading zeros, keep 1, 2 and 3, and look at the 4: it is below 5, so the answer is 0.00123, or 1.23 × 10⁻³. Rounding 1234.5 to 2 significant figures gives 1200, where the two zeros only hold place value.

What is banker's rounding?

Banker's rounding, or round half to even, sends an exact tie to whichever candidate ends in an even digit: 2.345 to two places becomes 2.34, and 2.355 becomes 2.36. Ties then go up and down equally often, so long sums do not drift upward. NIST SP 811 (B.7.1) gives this as its rule for discarding a 5 followed by zeros, and it is the default in IEEE 754 arithmetic and Python's round(), where round(2.5) is 2.

Does 5 round up or down?

Under school rounding (half up) an exact 5 rounds up, away from zero: 2.345 to two places is 2.35, and −2.5 to a whole number is −3. Under banker's rounding the same ties go to the even digit, giving 2.34 and −2. The rule matters only for exact ties; 2.3451 becomes 2.35 under both because it lies above halfway.

What is the difference between floor, ceiling and truncate?

Floor always moves down toward −∞, ceiling always up toward +∞, and truncation drops the extra digits, which moves toward zero. Floor and truncate agree for positive numbers but split for negatives: −2.5 to a whole number floors to −3, truncates to −2, and has a ceiling of −2. None of them looks at which candidate is nearer, so 1.99 floors to 1.

How do you round to the nearest ten, hundred or thousand?

Enter negative decimal places: −1 rounds to tens, −2 to hundreds and −3 to thousands. 1234.5678 to −2 places is 1200 under every half rule. 1250 sits exactly halfway between 1200 and 1300, so it becomes 1300 under half up but 1200 under banker's rounding, because 2 is the even digit.

About this calculator

Rd(x)=R(x⋅10d)10dR_d(x) = \frac{R(x \cdot 10^{d})}{10^{d}}

Sources

  1. IEEE 754-2019 — rounding-direction attributes (roundTiesToEven, roundTiesToAway, toward ±∞, toward 0)
  2. NIST SP 811, Appendix B.7 — rounding numerical values
  3. Python decimal module — rounding modes

Checked against references

This calculator includes 8 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.