CALCULATORCASTLE

Rounding Calculator

Round numbers to any decimal place or significant figure.

About

Rounding Calculator

Rounding a number means replacing it with an approximation that gives a shorter, simpler or more explicit representation, according to a specific rounding definition. Rounding 2.7 to the nearest integer gives 3.

Use the settings above to change the rounding method or define your own precision level.

Rounding methods

Several different definitions can be used to round a number. The calculator defaults to rounding to the nearest integer, and the settings switch it to any of the other modes and levels of precision. All nine are described below.

Only one thing separates them: what happens at an exact tie, when the value sits precisely halfway. Away from a tie, every mode except ceiling and floor gives the same answer.

Round half up

One of the more common methods. Values exactly halfway between two options go up. Rounding to the ones place:

5.50 โ†’ 6, 5.51 โ†’ 6, 5.49 โ†’ 5

With negative numbers the definition gets ambiguous. Some round -5.5 to -5, others to -6. Here "up" means towards the bigger, more positive value:

-5.50 โ†’ -5, -5.51 โ†’ -6, -5.49 โ†’ -5

Round half down

The same idea with ties going down instead:

5.50 โ†’ 5, 5.51 โ†’ 6, 5.49 โ†’ 5

Negative numbers are ambiguous here too. Half down means towards the smaller, more negative value:

-5.50 โ†’ -6, -5.51 โ†’ -6, -5.49 โ†’ -5

Round up (ceiling)

Taking the ceiling means rounding up to the nearest integer. At the ones place, any non-integer goes up to the next highest whole number: 5.01 โ†’ 6.

For negatives, rounding up means moving to the next closest, more positive integer: -5.01 โ†’ -5, -5.50 โ†’ -5, -5.99 โ†’ -5.

Round down (floor)

Taking the floor rounds down to the nearest integer: 5.99 โ†’ 5.

For negatives it moves to the next nearest, more negative integer: -5.01 โ†’ -6, -5.50 โ†’ -6, -5.99 โ†’ -6.

Round half to even

A tie-breaking rule with no bias towards positive or negative, or towards or away from zero, which several of the other methods do have. Half values go to the nearest even integer:

5.5 โ†’ 6, 6.5 โ†’ 6, -7.5 โ†’ -8, -8.5 โ†’ -8

This is the default in IEEE 754 floating-point arithmetic and the reason it is often called banker's rounding. Over a long column of figures, half up quietly adds a small upward drift because every tie moves the same way; half to even sends about half of them each way and the bias cancels.

Round half to odd

The mirror image, and also a tie-breaking rule. Half values go to the nearest odd integer:

5.5 โ†’ 5, 6.5 โ†’ 7, -7.5 โ†’ -7, -8.5 โ†’ -9

Round half away from zero

Exactly what the phrase describes: half values move away from zero, towards positive or negative infinity depending on their sign. No bias towards positive or negative numbers, though it does carry a bias away from zero.

5.5 โ†’ 6, -5.5 โ†’ -6

This is the rule most people were taught at school as simply "rounding", and it is what this calculator uses by default.

Round half towards zero

The opposite direction. Half values go to whichever integer is closer to zero. No bias towards positive or negative, but a bias towards zero.

5.5 โ†’ 5, -5.5 โ†’ -5

Rounding to fractions

Rounding to fractions means rounding to the nearest multiple of the chosen fraction. Rounding to the nearest 1/8:

15.65 โ†’ 15 5/8 = 15.625

15.70 โ†’ 15 6/8 = 15.75

15.80 โ†’ 15 6/8 = 15.75

This is useful in engineering, where fractions are widely used to describe the size of components such as pipes and bolts. Note that the eighths are left unreduced: 6/8 rather than 3/4, because a drawing calling for eighths should read in eighths.

The arithmetic is the same as any other rounding. Divide by the fraction, round the quotient to a whole number, multiply back. 15.65 divided by 0.125 is 125.2, which rounds to 125, and 125 times 0.125 is 15.625.

Choosing a precision

The precision dropdown covers three families. Decimal places run from tenths through millionths. Whole-number places run from ones up to millions, and are entered as negative powers of ten: tens is -1, thousands is -3. Fractions run from halves to sixty-fourths.

The pattern behind them is one formula. A precision level of p means rounding to multiples of 10 to the power of -p, so p = 2 gives hundredths and p = -3 gives thousands. Switching the settings to "input a precision level" lets you type any p directly, including values the dropdown does not list.

PrecisionRounds to multiples of56.654333 becomes
Thousandths (3)0.00156.654
Hundredths (2)0.0156.65
Tenths (1)0.156.7
Ones (0)157
Tens (-1)1060
Hundreds (-2)100100

Why the mode matters

For a single number it usually does not. For thousands of them it can.

Round half up across a large set of prices and every tie moves upward, so the total drifts high by roughly half a cent per tie. That is why accounting standards, tax software and the IEEE floating-point standard reach for half to even instead. The bias is small per item and entirely real in aggregate.

Direction matters more than symmetry in some settings. Materials estimates use the ceiling, because 6.2 lengths of pipe means buying 7. Dosage and safety limits often use the floor for the same reason in reverse. Neither is about accuracy; both are about which direction an error is survivable in.

Rounding is not the same as truncating

Truncating chops the unwanted digits off and keeps what is left. Rounding looks at what is being discarded and may adjust the last kept digit.

Truncating 5.99 to the ones place gives 5. Rounding it gives 6. For positive numbers truncation and floor agree; for negatives they do not, since truncating -5.99 gives -5 while the floor gives -6. Truncation is really "round towards zero", which is why it appears under that name in most programming languages.

Two things that trip people up

Rounding twice. Rounding 2.44 to one decimal gives 2.4, and rounding that to the ones place gives 2. Rounding 2.44 straight to the ones place also gives 2. But 2.45 to one decimal is 2.5, and 2.5 to the ones place is 3, while 2.45 rounded directly is 2. Always round once, from the original value, not in stages.

Binary floating point. Computers cannot store most decimal fractions exactly. 2.675 is held as 2.67499999999999982โ€ฆ, so a naive program rounds it to 2.67 rather than 2.68, and the answer looks wrong to anyone who checked by hand. This calculator normalises the value before applying the rule, which is why it returns 2.68. It is also why financial software stores money in integer cents rather than decimal fractions.

Significant figures against decimal places

Decimal places count digits after the point. Significant figures count meaningful digits from the first non-zero one, wherever it sits.

0.004567 to three decimal places is 0.005, which throws away almost all the information. To three significant figures it is 0.00457, which keeps it. For measurements spanning very different magnitudes, significant figures are usually the right choice; for money and anything with a fixed unit, decimal places are.

The rule of thumb in science is that a calculated result should carry no more significant figures than the least precise measurement that fed it. Multiplying a length measured to three significant figures by one measured to two gives an answer good to two, however many digits the calculator prints.

Common questions

Frequently asked questions

Replacing a number with the closest whole number. 56.654333 becomes 57 because it is nearer to 57 than to 56. Only an exact tie, such as 5.5, needs a rule to break it, and that is what the rounding modes decide.

Only what happens on a tie. Half up sends every tie in the same direction, which adds a small upward bias across a large set of numbers. Half to even sends 5.5 to 6 but 6.5 to 6, so the bias cancels out. That is why accounting and the IEEE floating-point standard use half to even.

Another name for round half to even. It is the IEEE 754 default and is used in accounting because it has no directional bias: over many values, ties go up about as often as they go down, so totals do not creep upward.

It depends on the mode, and this is where the definitions genuinely differ. Half up sends -5.5 to -5, since up means more positive. Half down sends it to -6. Half away from zero also gives -6, while half towards zero gives -5. The calculator shows all nine side by side.

Ceiling always rounds up to the next integer and floor always rounds down, regardless of how close the value is. 5.01 gives 6 with ceiling and 5 with floor. For negatives, ceiling takes -5.99 to -5 and floor takes -5.01 to -6.

Divide by the fraction, round the quotient to a whole number, then multiply back. To the nearest 1/8, 15.65 divided by 0.125 is 125.2, which rounds to 125, and 125 times 0.125 is 15.625, or 15 5/8. Useful in engineering, where pipes and bolts come in fractional sizes.

Rounding to a place left of the decimal point. A precision of -1 rounds to the nearest ten, -2 to the nearest hundred and -3 to the nearest thousand. The rule is that precision p rounds to multiples of 10 to the power of -p.

No. Truncating discards the unwanted digits and keeps the rest, so 5.99 truncates to 5 but rounds to 6. For positive numbers truncation matches the floor; for negatives it does not, since truncating -5.99 gives -5 while the floor gives -6. Truncation is really round towards zero.

Because binary floating point cannot hold 2.675 exactly; it is stored as 2.67499999999999982, which is genuinely below the tie. This calculator normalises the value before applying the rule, so it returns 2.68. It is also why financial software stores money as integer cents.

Decimal places for money and anything with a fixed unit. Significant figures for measurements spanning very different magnitudes, since 0.004567 to three decimal places is 0.005 and loses almost everything, while three significant figures keeps 0.00457.