The Round function rounds a number to the specified number of digits. When digits is not specified, the number is rounded to the nearest whole number by default.

Usage

Round(number, [digits])

Function arguments:

  • number (required) Number to be rounded.
  • digits (optional) Number of decimal places to round the number. If not provided, defaults to 0.

The underlying formula is as follows:

(number/10^digits) * (10^digits)

πŸ“˜

A negative digits value returns an integer with the specified least-significant digits zeroed.

πŸ“˜

Rounding is different than formatting. The result can have fewer digits than specified. Rounding does not add trailing zeroes.

Example

Round(Pi())
  • Returns 3
Round(3.1, 2)
  • Returns 3.1
Round(1234, -2)
  • Returns 1200

More examples