Skip to content
Tutorials Center
My learning

Topics

Lesson 32 of 39 ยท Estimation, Units and Money

Rounding and Significant Figures

Round numbers to the nearest ten, to decimal places and to significant figures, avoid common mistakes, and learn why Python's round() surprises people.

Real-life numbers are rarely neat. A road is 4.8732 km long, a phone costs 349.99, a population is 7,962,418. We often want a simpler number that is close enough. Rounding replaces a number with a nearby, simpler one. Knowing how to round, and how much accuracy to keep, is a basic skill in math, science and finance.

The rounding rule

  1. Decide which digit is the last one you want to keep.
  2. Look at the digit right after it.
  3. If that digit is 5 or more, round up (add 1 to the kept digit). If it is 4 or less, leave the kept digit as it is.
  4. Replace the digits after the kept digit with zeros (for whole-number places) or drop them (for decimal places).

Example 1. Round 3,467 to the nearest hundred. The hundreds digit is 4; the next digit is 6, so round up: 3,500.

Example 2. Round 12,349 to the nearest thousand. The thousands digit is 2; the next digit is 3, so leave it: 12,000.

A common mistake: rounding 2,996 to the nearest ten gives 3,000, not 2,990. The carry flows through: ...96 โ†’ ...00 with a 1 added to the hundreds.

Decimal places

To round to n decimal places (d.p.), keep n digits after the decimal point.

Example 3. Round 4.8732 to 2 d.p. The third decimal digit is 3, so round down: 4.87.

Example 4. Round 0.0498 to 2 d.p. Look at the third decimal digit, 9: round the second digit up, 4 โ†’ 5, so 0.05.

Example 5. Round 7.996 to 1 d.p. The second decimal digit is 9, so the first digit 9 rounds up and carries: 8.0. Keep the trailing zero to show the precision.

Significant figures

Significant figures (s.f.) count from the first non-zero digit. They tell you how many digits are meaningful, regardless of where the decimal point is.

  • Leading zeros are not significant: 0.00340 has 3 s.f. (3, 4, 0).
  • Zeros between non-zero digits are significant: 1,005 has 4 s.f.
  • Trailing zeros after a decimal point are significant: 2.50 has 3 s.f.
  • Trailing zeros in a whole number like 4,500 are ambiguous; standard form removes the doubt (4.5 ร— 10ยณ has 2 s.f.).

To round to n s.f.: count n significant digits from the first non-zero digit, then apply the rounding rule.

Example 6. Round 0.0045678 to 2 s.f. The first non-zero digit is 4. Two s.f. are 4 and 5; the next digit is 6, so round up: 0.0046.

Example 7. Round 58,239 to 3 s.f. Keep 5, 8, 2; the next digit is 3, so round down and fill with zeros: 58,200.

When rounding a whole number to some s.f., fill the gap with zeros. 58,200 not 582. The magnitude must stay the same.

Python Round to decimal places and significant figures

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The program uses Python's Decimal type, which works on the digits exactly as written. The first line reproduces Examples 3, 4 and 5; the second reproduces the s.f. examples.

The "exactly 5" rule

School math rounds a digit of exactly 5 up: 2.5 โ†’ 3, 0.35 โ†’ 0.4 (1 d.p.). Python's built-in round() uses banker's rounding (round half to even), so round(2.5) gives 2 and round(3.5) gives 4. Also, binary floating point stores 2.675 slightly below 2.675, so round(2.675, 2) gives 2.67. These are quirks of the computer, not of the math you learn. That is why the code above uses Decimal with ROUND_HALF_UP.

Python Why Python's round() can surprise you

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The last line prints the exact value that Python really stores for 2.675; it is a hair below the decimal you typed, which explains the 2.67.

When to round

  • Round only at the end. Rounding inside a long calculation lets small errors pile up.
  • Match the accuracy of the data. If a length is measured as 4.8 m (2 s.f.), do not give a result like 23.4567 mยฒ.
  • In money, round to the smallest unit (cents, pence), usually 2 d.p.

Rounding is the first step toward Estimating Calculations.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Round 6,451 to the nearest hundred.

    The hundreds digit is 4 and the digit after it (the tens digit) is 5, so the 4 rounds up to 5, giving 6,500.
  2. 2. How many significant figures does 0.0602 have?

    The leading zeros are not significant. The significant digits are 6, 0, 2, so there are 3.
  3. 3. Round 2.0963 to 3 significant figures.

    Keep 2, 0, 9. The next digit is 6, so the 9 rounds up and carries: 2.10. The zero is kept to show 3 s.f.
  4. 4. Why should you avoid rounding in the middle of a multi-step calculation?

    Each rounding introduces a small error, and later steps can multiply it. Round once, at the end.

Summary

  • Look at the digit after the last one you keep: 5 or more rounds up, 4 or less leaves it.
  • Decimal places count after the point; significant figures count from the first non-zero digit.
  • Keep trailing zeros that show precision (2.50, 8.0).
  • Round only at the end of a calculation.
  • Python's round() uses round-half-to-even; use Decimal for school-style rounding.

Next: Estimating Calculations