Skip to content
ToolPaxaAll Tools for Everyone, in One Place.All calculators

Rounding Calculator

Round decimal places, significant figures or a chosen increment. Compare explicit tie rules, see exact error and follow the result on a number line.

Formula reference

R = q × roundₘ(x/q); q > 0; k = R/q ∈ ℤ; q = 10^(−p); p ∈ ℤ

All formulas
  • R = q × roundₘ(x/q); q > 0; k = R/q ∈ ℤ
  • q = 10^(−p); p ∈ ℤ
  • q = 10^(⌊log₁₀|x|⌋−s+1); x ≠ 0; s ∈ ℕ
  • Δ = R − x; absolute error = |Δ|
  • Relative error (%) = 100|Δ|/|x|; x ≠ 0
  • Nearest: |Δ| ≤ q/2; y = x/q; k = ⌊y⌋; u = y−k
  • Nearest: u < ½ ⇒ k; u > ½ ⇒ k+1; u = ½ ⇒ tie rule
  • Tie away: y < 0 ⇒ k; y > 0 ⇒ k+1
  • Tie toward zero: y < 0 ⇒ k+1; y > 0 ⇒ k
  • Tie even: k ∈ 2ℤ ⇒ k; otherwise k+1
  • Tie odd: k ∈ 2ℤ+1 ⇒ k; otherwise k+1
  • Tie toward +∞: k+1; tie toward −∞: k
  • Ceiling: q⌈x/q⌉; floor: q⌊x/q⌋
  • Toward zero: q sgn(x)⌊|x/q|⌋; away: q sgn(x)⌈|x/q|⌉
R = roundₘ(
;
)

Your result

Your answer and calculation steps appear here.

Inputs and calculations stay in this browser tab. Copy or export your report before closing.

Rounding: precision, tie rules and worked examples

Choose a precision type and rounding rule. Enter x and its precision or positive step q. All decisions use exact rational arithmetic.

Choose decimal places, significant figures or an increment

Rounding selects a permitted multiple of a positive step q. For p decimal places, q = 10^(−p): p = 2 means hundredths and p = −2 means hundreds. For s significant figures and nonzero x, q = 10^(floor(log 10|x|)−s+1). Custom increments let you choose a step such as 0.05 or 1/8. The result is R = q×round_m(x/q), where m is the selected rule.

Worked positive, negative and carry examples

With nearest ties away from zero,2.675 to two decimal places is 2.68, while −2.675 becomes −2.68. With ties to even,1.245 becomes 1.24. Rounding 9.999 to three significant figures gives 1.00e+1, preserving the requested precision after the carry. To round 1.025 to increments of 0.05, x/q = 20.5: ties away selects 21 steps, giving 1.05; ties to even selects 20 steps, giving 1.00.

Read the rule’s direction explicitly

Nearest methods choose the closer permitted multiple and use the stated policy only at an exact halfway point. At −2.5 with step 1, ties toward positive infinity gives −2, while ties toward negative infinity gives −3. Ceiling and floor always follow those directions; truncation always approaches zero and directed away always increases magnitude for a nonmultiple. Even and odd refer to the integer multiplier k = R/q. For a custom step they do not describe the displayed decimal’s last digit.

Keep precision meaningful through formatting

Decimal-place output retains requested trailing zeros:1.2 to three decimal places is 1.200. Significant-figure output uses scientific notation to make trailing zeros explicit:12300 to three figures is 1.23e+4. Zero is formatted with s−1 zeros after the decimal point in this mode as a display convention. Formatting does not establish measurement accuracy. Repeated rounding can change a result; retain the original value and round once for the intended report.

Understand the error and the number line

Signed error is Δ = R−x; absolute error is |Δ|. For nonzero x, relative error in percent is 100|Δ|/|x|. It is undefined at x = 0 and is omitted there. For any nearest policy, |Δ| ≤ q/2; directed methods can approach q. The diagram shows adjacent permitted values and the chosen result within one step. Finite decimals and fractions are interpreted exactly, so halfway decisions do not depend on binary floating-point approximations.

Input limits, exactness and reports

Inputs permit 1000 digits per fraction component or decimal coefficient, up to 1000 fractional digits, and scientific exponents within ±1000. Decimal places range from −1000 to 1000; significant figures from 1 to 1000. Exact rational components are bounded at 4096 digits. No digit grouping, expressions, NaN or infinity. Nonterminating increment results remain exact fractions. Negative zero is normalized to zero. Copy, CSV and Print / Save as PDF include the precision type, rule, inputs, result, error and working; calculations stay in this tab.

Use Fraction Calculator to inspect exact rational values, Percent Error Calculator to compare an observed number with a reference, and Scientific Calculator for a longer expression before choosing its reporting precision.

ISO 80000-1:2022 supplies quantities-and-units context. General Decimal Arithmetic describes explicit rounding policies. These are scoped references; the calculator does not claim ISO or IEEE conformity.

Common questions

How does −2.5 round?

It depends on the rule. With step 1, ties away gives −3, ties toward zero gives −2, ties to even gives −2, and ties to odd gives −3. The selected rule is explicit.

Can I round to 0.05?

Yes. Choose Custom increment and enter 0.05. Halfway decisions apply to x/q, so even or odd means the multiplier k.

Why use scientific notation for significant figures?

It states the intended trailing-zero precision clearly, including after a carry.1.00e+3 has three significant figures; the plain string 1000 is ambiguous without context.

Does rounding give a measurement uncertainty?

The reported error compares the rounded number with the supplied number. It does not estimate uncertainty in the original measurement.

Are zero and negative zero handled?

Zero remains zero and negative zero is normalized. Relative percentage error is undefined for a zero original value.

Can fractions and recurring steps be used?

Integer fractions are accepted. A nonterminating rounded value such as a multiple of 1/3 is kept as an exact fraction.

Explore related tools