Rounding Calculator: Decimals, Significant Figures, Nearest 10

Enter a number, choose how to round it, and see the rounded value and how much it changed. Halves round away from zero.

Updated

Embed this calculator

Paste this code into your page. The calculator runs inside the frame and links back to the full version.

Keep the credit link in place. Do not resell the calculator.

Formula

  • Decimals: round(x × 10^n) / 10^n
  • Significant figures: n_dec = sig - 1 - floor(log10(|x|)), then round to n_dec decimals
  • Nearest 10 or 100: round(x / 10) × 10, round(x / 100) × 100

Halves round away from zero.

Worked example

3.14159 to 2 decimals is 3.14; 123456 to 3 significant figures is 123000; 1234 to the nearest 100 is 1200.

Frequently asked questions

How do I round to 2 decimal places?

Look at the third decimal digit: 5 or more rounds up, otherwise down. 3.14159 has a 1 there, so it becomes 3.14.

What are significant figures?

Significant figures count digits from the first non-zero digit. 123456 to 3 significant figures is 123000, and 0.0012345 to 2 is 0.0012.

How does it round exact halves such as 2.5?

Away from zero: 2.5 becomes 3 and -2.5 becomes -3. Some systems round halves to the nearest even number instead, which gives 2.

How do I round to the nearest 10 or 100?

Divide by 10 (or 100), round to a whole number, then multiply back. 1234 to the nearest 10 is 1230, and to the nearest 100 is 1200. The "how many" box is ignored for these.