Rounding calculator

Round to a chosen number of decimal places, to the nearest, down or up.

Inputs

Rounding calculator

3 fields

Results are reference estimates. Verify the inputs before making important decisions.

Fill in the fields and the result will appear here automatically.

Three directions cover the cases that actually differ. Rounding to the nearest sends a half away from zero, so 2.5 becomes 3 and −2.5 becomes −3. Down and up here mean floor and ceiling on the number line rather than dropping or padding the magnitude, and for negative numbers that distinction matters: −2.44 rounded down to one place is −2.5, not −2.4. The difference row shows exactly what the rounding threw away, which is the part that accumulates when the same operation is applied to a column of figures rather than to one.

FAQ
4 questions
Freshness
formula-based

How it works

Formula and logic

The value is scaled by ten to the power of the places, rounded in the chosen direction, then scaled back. Zero places rounds to a whole number. The decimal-place count is an integer from 0 to 10. The calculation quantizes the shortest decimal representation of the normalized finite numeric input; extra precision in a long original string beyond binary64 is not retained. Integer decimal arithmetic makes 1.005 round to 1.01 at two places without multiplying a double by 100. Difference = result − input, so its sign shows the direction of change. The requested decimal places are preserved in the result rather than replaced by a general four-place formatter.

Example

Rounding 2,748.536 to two places gives 2,748.54 and discards 0.004.

Fields and units

  • Value to round — unitless
  • Decimal places — unitless
  • Rounding direction — list option

How to use

  • — Enter the number you want to round.
  • — Enter how many decimal places to keep.
  • — Choose the direction: nearest, down or up.
  • — Read the difference row to see what was discarded.

Method and limitations

Calculation method
Formula and logic
Limitation
In nearest mode, an exact half goes away from zero: 2.5 → 3 and −2.5 → −3. This rounding rule does not establish the rule for an accounting, tax or banking document; use the method specified for that document.

FAQ

Where does a half go when rounding to the nearest?

In nearest mode, an exact half goes away from zero: 2.5 → 3 and −2.5 → −3. This chosen rule differs from ties to even. It does not establish the rule for an accounting, tax or banking document; use the method specified for that document.

Is rounding down the same as dropping the extra digits?

Only for positive numbers. For negatives, dropping digits moves towards zero while rounding down moves away from it: −2.44 becomes −2.5 at one place.

Why does the difference matter?

Because it accumulates. Rounding a thousand invoice lines the same direction can shift a total by a visible amount, which is why accounting rules specify the direction rather than leaving it open.

Can I round to tens or hundreds?

No. This tool accepts 0–10 decimal places: 0 rounds to an integer, 1 to tenths. Negative place counts and rounding to tens or hundreds are unsupported.