Formualizer Docs

ROUND

Rounds a number to a specified number of digits.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=ROUND(number, num_digits)

Arguments

ArgumentTypeRequiredDefault
numbernumberRequired—
num_digitsnumberRequired—

Remarks

  • Positive digits rounds to the right of the decimal point.
  • Negative digits rounds to the left of the decimal point.
  • The input is first reduced to 15 significant decimal digits, matching Excel's numeric precision, then rounded at the requested position.
  • Halfway cases round away from zero.

Examples

Round to two places to the right of the decimal point.

Formula =ROUND(12.345,2)

Expected result 12.35

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Round to a place left of the decimal point.

Formula =ROUND(127,-1)

Expected result 130

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Select zero decimal places to return an integer.

Formula =ROUND(12.345,0)

Expected result 12

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

The number cannot be read from nonnumeric text.

Formula =ROUND("invalid",2)

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Round to two decimals

Formula =ROUND(3.14159,2)

Expected result 3.14

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Round to nearest hundred

Formula =ROUND(1234,-2)

Expected result 1200

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

What does a negative digits argument do in ROUND?

It rounds digits to the left of the decimal point (for example, tens or hundreds).

Implementation

Engine source

On this page