Math

Rounding Calculator

Round numbers to decimal places, significant figures or any interval, using the rounding mode you actually need.

Last reviewed by the Radiatus Cloud team

Need this done properly for your business?

Radiatus delivers secure cloud, DevOps & compliance engineering.

Book a free consult

There is more than one correct way to round

Round half up sends 2.5 to 3 and is what most people were taught. Round half to even, also called banker's rounding, sends 2.5 to 2 and 3.5 to 4, choosing whichever neighbour is even. The second exists because always rounding halves upward introduces a small upward bias that accumulates across many values — over a million transactions that bias is real money. Banker's rounding is the IEEE 754 default, which is why Python, R and most languages disagree with the spreadsheet you compared them against.

Decimal places and significant figures answer different questions

Rounding to two decimal places fixes absolute precision: 0.00123 becomes 0.00, losing everything. Rounding to two significant figures fixes relative precision: 0.00123 becomes 0.0012, keeping the information. For measurements spanning several orders of magnitude, significant figures are almost always what is wanted, and decimal places are what gets used by default.

Rounding twice changes the answer

2.44 rounded to one decimal is 2.4, then to an integer is 2. Rounded directly to an integer it is also 2 — but 2.46 goes to 2.5 then 3, while direct rounding gives 2. Always round once, from the original value. Chained rounding through intermediate steps is a common source of totals that do not match their components.

Money has its own rules

Currency should be stored as integer minor units — cents, paise, pence — not as floating point, because 0.1 has no exact binary representation and errors accumulate. Tax and interest calculations often specify a rounding direction in law or contract, and it is not always to nearest. Some jurisdictions require rounding down for tax withheld and up for tax charged, which no general-purpose rounding function will do for you.

Floating point rounds before you do

2.675 is stored as slightly less than 2.675, so rounding it to two decimals gives 2.67 rather than the expected 2.68. This is not a bug in the rounding function; the value was never exactly 2.675. Working in integers or a decimal type avoids it, and no amount of care in the rounding step will.

Rounding to an interval

Rounding to the nearest 5, 25 or 100 is division, rounding, then multiplication back. It is how prices are set to psychological points, how time is billed in quarter-hours, and how estimates are presented without implying precision nobody has. Presenting 47.3 as "about 50" is more honest than the decimal when the underlying measurement is not that good.

Related tools

  • Percentage Calculator — Calculate percentages, percentage change, increase and decrease, and reverse percentages, with the working shown for each result.
  • Statistical Calculator — Calculate mean, median, mode, standard deviation, and more.
  • Probability Calculator — Calculate probabilities for single and combined events, including conditional probability and Bayes' theorem.
  • Scientific Calculator — Perform advanced mathematical operations including trig, log, and exponents.

Frequently Asked Questions

What is banker's rounding?

Rounding halves to the nearest even number, so 2.5 becomes 2 and 3.5 becomes 4. It removes the upward bias of always rounding halves up, and is the IEEE 754 default in most languages.

What is the difference between decimal places and significant figures?

Decimal places fix absolute precision, so 0.00123 to two decimals becomes 0.00. Significant figures fix relative precision, keeping 0.0012. For values spanning orders of magnitude, use significant figures.

Why do my totals not match after rounding?

Usually chained rounding. Rounding through an intermediate step gives different results than rounding once from the original, so 2.46 can become 3 or 2 depending on the path.

Why does rounding 2.675 give 2.67?

Because it is stored as slightly less than 2.675 in binary floating point. The value was never exactly 2.675, so no rounding function can produce 2.68 from it.

How should money be stored?

As integer minor units such as cents, not floating point. Tax and interest rules often also specify a rounding direction that no general-purpose function applies.

Privacy & Security

All processing happens locally in your browser — nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Enter a number and choose how to round it.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.