1. Calculation functions
  2. All Functions
  3. Numeric functions
  4. ROUND

The ROUND function rounds a value to a specified number of decimal places, an integer, or a power of 10.

For example, you can use ROUND to calculate the number of products a certain number of parts can create.

Syntax

ROUND(Number to round [, Number of decimal places] [, Rounding direction] [, Rounding method])

Arguments

ArgumentData typeDescription
Number to round (required)NumberThe number to round.
Number of decimal placesNumber

The number of decimal places to round to.

If you omit this argument, the ROUND function rounds to the nearest whole integer.

Rounding directionKeyword

The direction to round in.

The keywords are UP, DOWN, NEAREST, TOWARDSZERO, and AWAYFROMZERO. There's more information in the Rounding direction keywords section below.

If you provide the Number of decimal places argument, but omit this argument, the ROUND function uses the NEAREST keyword by default.

Rounding methodKeyword

The rounding method to use.

The keywords are NORMAL and EXACT. There's more information in the Rounding direction keywords section below.

The ROUND function returns a number-formatted result.

Rounding direction keywords

KeywordDescription
UP

Rounds the value of the Number to round argument up, toward positive infinity.

This behavior is different to the Excel function ROUNDUP, which rounds away from zero.

DOWN

Rounds the value of the Number to round argument down, toward negative infinity.

This behavior is different to the Excel function ROUNDDOWN, which rounds towards zero.

NEAREST

The default keyword if you omit the Rounding direction argument.

Rounds the value of the Number to round argument to the nearest number or decimal place. Halves are rounded up.

TOWARDSZERORounds the value of the Number to round argument toward zero.
AWAYFROMZERORounds the value of the Number to round argument away from zero.

Rounding method keywords

KeywordDescription
NORMAL

The default keyword if you omit the Rounding method argument.

When you use the NORMAL keyword, for some rare input values, the ROUND function results in a small degree of floating point error for the least significant digits.

EXACTWhen you use the EXACT keyword, the ROUND function performs additional processing to minimize the effect of floating point error.

Syntax example

ROUND((Payment amount * Exchange rate), 2, UP, EXACT)

This formula multiplies a payment amount by an exchange rate and rounds the result to two decimal places. The formula uses the UP keyword to round upwards toward positive infinity and uses the EXACT keyword to minimize any floating point error.

Additional Information

Round to powers of ten

You can use a negative number for the Number of decimal places argument. If you do this, the ROUND function rounds the Number to round argument to a power of ten. You can also use the MROUND function to do this, and that function can also round to numbers that are not a power of ten.

Excel equivalent

Related Anaplan functions

MROUND

Examples

General examples

FormulaDescriptionResult
ROUND(12.344)Only the value to be rounded, 12.344, has been provided. The formula uses the default arguments of: 0 decimal places, the NEAREST direction, and NORMAL rounding method12.0
ROUND(12.399, 1, DOWN)This formula contains arguments of 1 decimal place and the DOWN direction. This means that 12.399 is rounded down to one decimal place.12.3
ROUND(-12.5)As this formula only contains ROUND and a value to be rounded, it uses the default arguments of: 0 decimal places, the NEAREST direction, and NORMAL rounding method. As -12.5 is a negative number, it rounds down.-13
ROUND(532.8399, 2, TOWARDSZERO)This formula contains arguments of 2 decimal places and the TOWARDSZERO direction. This means that 532.8399 is rounded down towards zero to 2 decimal places. This usage of ROUND can calculate the price of a product. Rounding towards zero maximizes profit margin.532.83
ROUND(28.135, 1, UP)This formula contains arguments of 1 decimal place and the UP direction. This means that 28.135 is rounded up to one decimal place.28.2
ROUND(2.509, 2, NEAREST, NORMAL)This is an example where the NORMAL rounding method results in a small degree of error.2.5100000000000002
ROUND(2.509, 2, NEAREST, EXACT)The additional processing performed by the EXACT rounding method corrects the small degree of error in the previous example.2.51

ROUND with currencies

In foreign exchange, exchange rates often include up to 5 decimal places. However, some currencies such as Euros, U.S. Dollars, or Pound Sterling can only be paid in increments of two decimal places.

In this example, payments are made from a company in U.S. Dollars to an account that uses Euros. It contains a Transaction list on columns, and line items on rows. The line items include:

  • The amount paid in U.S. dollars.
  • The detailed exchange rate for U.S. Dollars to Euros, to five decimal places.
  • A formula that applies the detailed exchange rate to the U.S. Dollar amount, then uses the ROUND function to round the final amount up to two decimal places for payment.

Transaction 1Transaction 2Transaction 3Transaction 4Transaction 5
Amount to be paid (USD)USD 500USD 750USD 100USD 125USD 375
Exchange rate at time of payment0.842710.840370.824730.828290.85154

Amount paid (EUR)

ROUND(('Amount to be paid (USD)' * 'Exchange rate at time of payment'), 2, UP, EXACT)

EUR 421.36EUR 630.28EUR 82.48EUR 103.54EUR 319.33