Paritian

Mathematics

Rounding Calculator

The same number by five different rounding rules, plus significant figures and the nearest multiple.

Results

Rounded, half away from zero 3
Rounded, half to the even one 2
Do the two rules disagree? Yes
Half from zero · half to even · down · up · cut 3 2 2 3 2
Always down 2
Always up 3
Digits simply cut off 2
To that many significant figures 2.5
To the nearest multiple 2.5
What rounding changed 0.5
The same as a share 20.0000 %

What this tool does

Rounding sounds like one operation and is at least five, and they only ever disagree at the exact midpoint — which is precisely where it matters. This page shows half up, half to even, floor, ceiling and truncation side by side, along with rounding to significant figures and to the nearest multiple of anything you like. It also tells you when the rules disagree, so you know whether the choice you make is going to change the answer.

Formula

⌊x × 10ᵈ + 0,5⌋ ÷ 10ᵈ · ⌊x × 10ᵈ⌋ ÷ 10ᵈ · ⌈x × 10ᵈ⌉ ÷ 10ᵈ · n × ⌊x ÷ n + 0,5⌋

Variables

SymbolMeaningUnit
valueThe number
placesDecimal places
figuresSignificant figures
multipleNearest multiple of
HURounded, half away from zero
HERounded, half to the even one
DFDo the two rules disagree?
TBHalf from zero · half to even · down · up · cut
FLAlways down
CLAlways up
TCDigits simply cut off
SGTo that many significant figures
MUTo the nearest multiple
DIWhat rounding changed
DPThe same as a share%

Worked example

  • The number2.5
  • Decimal places0
  • Significant figures3
  • Nearest multiple of0.05
  • Rounded, half away from zero3
  • Rounded, half to the even one2
  • Do the two rules disagree?Yes
  • Half from zero · half to even · down · up · cut3 2 2 3 2
  • Always down2
  • Always up3
  • Digits simply cut off2
  • To that many significant figures2.5
  • To the nearest multiple2.5
  • What rounding changed0.5
  • The same as a share20.0000 %

Limitations

  • The calculation runs at full precision and only the display is rounded. If you copy an intermediate value and retype it, small differences can appear.

Frequently asked questions

Why are there two different answers for 2.5?

Because there is no natural answer, and different fields made different choices. Half up always goes away from zero, so 2.5 becomes 3 — that is what most people were taught and what this page shows first. Half to even sends the exact midpoint to the nearest even number, so 2.5 becomes 2 and 3.5 becomes 4. It looks strange and exists for a good reason: always rounding halves upwards biases a long column of figures upwards, and over thousands of rows that bias is real money. It is the default in accounting standards, in IEEE floating point, and in Python's own round function, which is why a spreadsheet and a script can disagree about the same number.

What is the difference between decimal places and significant figures?

Decimal places count from the point; significant figures count from the first digit that is not a leading zero. For 3.14159 they nearly coincide, which is why the distinction is easy to miss. For 0.0001234 they are completely different: two decimal places gives zero, while two significant figures gives 0.00012 and keeps the information. Measurements should be quoted to significant figures, because that reflects how precisely they were made; money should be quoted to decimal places, because that reflects what the currency can express.