Davided.

Rounding Calculator

Round any number to decimal places, the nearest ten/hundred/thousand, or significant figures — with half-up, banker's, ceiling, floor, or truncate rounding.

✓ Last reviewed: Sources: Rounding — Wikipedia

Report a correction

Spotted a wrong result, label or typo? Tell us — we review every report.

The value you want to round.

0 rounds to the nearest whole number.

Ceiling and floor always go toward +∞ and −∞; half up and truncate stay symmetric around zero. E.g. −2.5 → −3 (half up), −2 (banker's, ceiling, truncate), −3 (floor).

Your result

Fill in the fields above to see your result.

Related calculators

Rounding calculator: decimal places, nearest ten, or significant figures — every method in one place

The Davided rounding calculator rounds any number the way you actually need it rounded. Type a number, choose what you’re rounding to — a fixed number of decimal places, the nearest ten/hundred/thousand, or a set number of significant figures — and pick how it should round: the everyday “half up” rule, banker’s rounding, ceiling, floor, or truncation. Most rounding tools online only offer one or two of these; this one covers all five modes and all three targets in a single calculator.

That matters most on negative numbers and exact ties (numbers ending in exactly .5), where the five modes genuinely disagree. −2.5 rounded to a whole number is −3 under the everyday rule, but −2 under banker’s rounding, and −2 again under ceiling — three different, all “correct,” answers depending on which rule you mean. This calculator spells out which mode you’re using and, when it matters, shows you what the other modes would have given instead.

How to use the rounding calculator

  1. Enter the number. Positive, negative, whole, or decimal — any value works.
  2. Choose what to round to. Pick decimal places (0 for a whole number), nearest ten/hundred/thousand/ten thousand/million, or a number of significant figures.
  3. Pick the rounding mode. Half up (the default, “away from zero”), banker’s rounding (half to even), ceiling, floor, or truncate.
  4. Read the result. If the other four modes would give a different answer for your specific number, the calculator shows you what each one produces, so you can see exactly where the modes diverge.

How rounding works

The general rule: round to any target

Every rounding target — decimal places, tens, hundreds, thousands, significant figures — works the same way underneath: divide the number by the target step, round that to the nearest whole number using your chosen mode, then multiply back. To round 12,345 to the nearest thousand, divide by 1,000 to get 12.345, round that to 12, then multiply back to get 12,000.

The five rounding modes, including negative numbers

  • Half up (round half away from zero). The rule taught in school: round down if the next digit is below 5, round up if it’s 5 or above. Ties always move away from zero, so 2.5 → 3 and −2.5 → −3. This is the calculator’s default.
  • Banker’s rounding (round half to even). Identical to half up except at exact ties, which round to the nearest even whole number instead: 2.5 → 2, 3.5 → 4, and −2.5 → −2. It’s the default rounding rule in IEEE 754 (the standard behind most computer arithmetic) and in Python’s round().
  • Ceiling. Always rounds toward positive infinity, regardless of sign. For positive numbers it behaves like rounding up; for negative numbers it moves toward zero: ceiling(−2.7) = −2.
  • Floor. Always rounds toward negative infinity, regardless of sign. For negative numbers it moves away from zero: floor(−2.1) = −3.
  • Truncate. Simply drops everything past the target position, without looking at its value. It always moves toward zero, so truncate(−7.89, 1 decimal) = −7.8 — the same direction as ceiling for negative numbers, not floor, which trips people up.

Significant figures

Significant figures count meaningful digits starting from the first non-zero digit, no matter where the decimal point sits. Leading zeros (like the “0” in 0.045) never count; zeros between other digits always count; trailing zeros after a decimal point count, but trailing zeros in a whole number (like the zeros in 1300) are ambiguous about whether they’re meaningful. Rounding can also push a number into a different order of magnitude — 9.96 rounded to 2 significant figures becomes 10, gaining a digit in the process.

The floating-point rounding trap

Some decimals that look simple, like 2.675, aren’t stored exactly in a computer’s binary floating-point format — 2.675 is actually held as a value fractionally below 2.675. That’s why a naive calculation in a spreadsheet or a script can round 2.675 to 2 decimal places as 2.67 instead of the mathematically correct 2.68: it’s rounding the stored approximation, not the number you typed. This calculator works from the number’s decimal representation directly, so it rounds 2.675 to 2.68, matching what you’d get rounding it by hand.

Step-by-step examples

Example 1: a normal decimal round — 3.14159 to 2 decimal places

The third decimal digit is 1, below 5, so half-up rounds down: 3.14159 → 3.14. Ceiling, which always rounds toward +∞ for a positive number, instead gives 3.15 — the only mode that disagrees here.

Example 2: an exact tie — 2.5 rounded to a whole number

Half up moves away from zero: 2.5 → 3. Banker’s rounding instead goes to the nearest even whole number, and 2 is even: 2.5 → 2.

Example 3: a negative tie, all five modes — −2.5 rounded to a whole number

Half up: −3 (away from zero). Banker’s rounding: −2 (2 is even). Ceiling: −2 (toward +∞). Floor: −3 (toward −∞). Truncate: −2 (toward zero). Four of the five modes land on different pairs of values — this is the case where mode choice matters most.

Example 4: rounding to the nearest thousand, with a tie — 12,345 and 12,500

12,345 rounded to the nearest thousand (half up) is 12,000 (12.345 rounds down to 12). 12,500 sits exactly on the boundary: half up rounds it to 13,000, while banker’s rounding rounds it to 12,000, since 12 is even.

Example 5: significant figures that change the order of magnitude — 9.96 to 2 significant figures

The third significant digit (6) rounds the second digit up, carrying through the whole number: 9.96 → 10. The result now has one more digit before the decimal point than the original number.

Example 6: negative decimals, truncate vs. floor — −7.89 to 1 decimal place

Truncate simply drops the second decimal digit and moves toward zero: −7.89 → −7.8. Floor always moves toward −∞, so it rounds further away from zero instead: −7.89 → −7.9.

Example 7: the floating-point trap in practice — 2.675 to 2 decimal places, half up

Mathematically, the digit being dropped is 5, so half-up rounds away from zero: 2.675 → 2.68. A calculator or script that multiplies the raw floating-point value by 100 and rounds it will often get 2.67 instead, because 2.675 isn’t stored exactly in binary — this calculator avoids that trap by rounding the decimal value directly.

Frequently asked questions

What is the standard rounding rule (round half up)?

Round half up — also called “round half away from zero” — is the everyday rule taught in school: round down if the next digit is below 5, round up if it’s 5 or higher. Ties always move away from zero, so 2.5 rounds to 3 and −2.5 rounds to −3. It’s this calculator’s default mode and matches how most people round by hand.

How do you round to the nearest ten, hundred, or thousand?

Divide the number by the target (10, 100, or 1,000), round that result to the nearest whole number in your chosen mode, then multiply back. For example, 12,345 rounded to the nearest thousand (half up) gives 12,000, since 12.345 rounds down to 12. At an exact halfway point like 12,500, half up rounds up to 13,000, while banker’s rounding rounds down to 12,000, because 12 is even.

What is banker’s rounding (round half to even) and why is it used?

Banker’s rounding resolves exact ties — numbers ending in precisely .5 — by rounding to the nearest even whole number instead of always rounding up: 2.5 becomes 2, 3.5 becomes 4. It’s the default in IEEE 754 (the standard behind most computer math) and in Python’s round(), because across many roundings it avoids the small upward bias that always-round-up introduces.

What’s the difference between rounding and truncating a number?

Rounding looks at the digit being dropped and decides whether to round the previous digit up or leave it, based on that value. Truncating just deletes everything past the target position, regardless of what it was, always moving toward zero. Truncating −7.89 to 1 decimal gives −7.8, while normal rounding would look at the dropped “9” and round to −7.9.

How do you round to a given number of significant figures?

Count digits starting from the first non-zero digit, then round at the position after your target count. Rounding 9.96 to 2 significant figures means rounding at the second digit: the third digit (6) rounds it up, giving 10 — a result with an extra digit, because rounding can shift a number into a new order of magnitude.

What is the difference between ceiling and floor rounding?

Ceiling always rounds toward positive infinity; floor always rounds toward negative infinity — regardless of the number’s sign. On a positive number they act like “round up” and “round down.” On a negative number they flip: ceiling(−2.7) gives −2 (smaller in magnitude), while floor(−2.7) gives −3 (larger in magnitude).

Why does 0.5 sometimes round to 0 and sometimes to 1?

It depends on the mode. Round half up always pushes exact ties away from zero, so 0.5 rounds to 1. Banker’s rounding instead rounds to the nearest even whole number, and 0 counts as even, so 0.5 rounds to 0 under that rule. Same number, different rule, two different — equally correct — results.

How do you round negative numbers?

It depends entirely on the mode. Half up treats negatives symmetrically, so −2.5 rounds to −3, the same distance from zero as 2.5 rounding to 3. Ceiling and floor stay fixed to +∞ and −∞ regardless of sign, so ceiling(−2.7) = −2 while floor(−2.7) = −3. Truncate always moves toward zero, so truncating −7.89 to 1 decimal gives −7.8.

Why do Excel, Python, and JavaScript sometimes round differently?

Two separate reasons. First, they default to different modes: Excel’s ROUND function rounds ties away from zero, while Python’s round() defaults to banker’s rounding (round half to even), per IEEE 754. Second, all three store decimals in binary floating-point, so a number like 2.675 is actually stored as slightly less than 2.675 — which is why a naive calculation can return 2.67 instead of the mathematically correct 2.68.

How do you round money to the nearest cent?

Round to 2 decimal places, typically using round half up (some accounting systems use banker’s rounding for high-volume calculations to avoid systematic bias). $2.675 rounds to $2.68 under standard half-up rounding — and this is exactly the case where the floating-point trap bites: a naive binary calculation can round it down to $2.67 by mistake, so the rounding method matters even for something as simple as a cent.

Sources