Returns a specified number rounded to the nearest integer or a specified number of decimal places.

Syntax

ROUND(<expN 1> , <expN 2>)

<expN 1>

The number you want to round.

<expN 2>

If <expN 2> is positive, the number of decimal places to round <expN 1> to. If <expN 2> is negative, whether to round <expN 1> to the nearest tens, hundreds, thousands, and so on.

Description

Use ROUND( ) to round a number to a specified number of decimal places or to a specified tens, hundreds, thousands value, and so forth. Use ROUND( ) with SET DECIMALS to round a number and remove trailing zeros.

If the digit in position <expN 2> + 1 is between 0 and 4 inclusive, <expN 1> (with <expN 2> decimal places) remains the same; if the digit in position <expN 2> + 1 is between 5 and 9 inclusive, the digit in position <expN 2> is increased by 1.

Use 0 as <expN 2> to round a number to the nearest whole number. Using –1 rounds a number to the nearest multiple of ten; rounding to a –2 rounds a number to the nearest multiple of one hundred; and so on. For example, ROUND(14932,–2) returns 14900 and ROUND(14932,–3) returns 15000.

For example, if the default number of decimal places is 2,

ROUND(2.50,0) returns 3.00

ROUND(–2.50,0) returns –2.00

ROUND(2.00,0) returns 2.00

See the table in the description of INT( ) that compares INT( ), FLOOR( ), CEILING( ), and ROUND( ).