Use the **Calculation** action to perform mathematical calculations on numbers. For example, you can convert between currencies or find the sum of weighted responses.

## Example use cases

### Convert currencies

If you and your user are working across multiple currencies, you can provide accurate currency conversions. Once the user enters a value in a given currency, you can reference the currency conversion rate from a live database and use the **Calculation** action to multiply the entered value by the rate to convert it to a different currency.

### Score responses

Scoring is a technique to weight user responses. This is particularly useful in performing a risk analysis by summing up the total weighted responses using the **Calculation** action. After collecting and weighting the responses from your users, you can then evaluate the risk values using conditional logic.

## Procedure

Follow the steps below to create a Calculation node to your module

- Click the plus icon “
**+**” on a node. - Select
**New Action**. - In the attribute editor that opens choose
**Calculation**. - Double-click
**New Calculation**and give your calculation a name. This name will not be displayed to your users.

You should now see two empty parameters on the attribute editor, **CALCULATOR** and **DESCRIPTION**, as shown above.

## Parameters

### Calculator

Use this field to input a mathematical operation, just as you would in a spreadsheet calculator like Microsoft Excel. If you need help getting started, check out the list of available mathematical operations below. Use these operations while referencing values from other nodes in your module in order to perform calculations on them. Keep in mind that you cannot use commas “,” as decimals. Instead, decimals require a dot “.”

Don’t worry: if we detect an error as you input operations and variables into this field, you will see a red warning triangle to the right of the field.

### Description

In this field, you can provide an optional description for your calculation. This descriptor will display in the overview of your decision tree and help you keep track of what your calculation is doing. Your users will not be able to see your description.

## List of most frequently used mathematical functions

ABS: Returns the absolute value of a number. The absolute value of a number is the number without its sign. |

EXP: Returns e raised to the power of a given number |

MAX: Returns the maximum value in a list of arguments |

MEDIAN: Returns the median of the given numbers |

MIN: Returns the minimum value in a list of arguments |

POWER: Returns the result of a number raised to a power |

PRODUCT: Multiplies its arguments |

QUOTIENT: Returns the integer portion of a division |

RANDBETWEEN: Returns a random number between the numbers you specify |

ROUND: Rounds a number to a specified number of digits |

ROUNDDOWN: Rounds a number down, toward zero |

ROUNDUP: Rounds a number up, away from zero |

SQRT: Returns a positive square root |

SQRTPI: Returns the square root of (number * pi) |

SUM: Adds its arguments |

## List of all available mathematical functions

ABS: Returns the absolute value of a number |

ACOS: Returns the arccosine of a number |

ACOSH: Returns the inverse hyperbolic cosine of a number |

ACOT: Returns the arccotangent of a number |

ACOTH: Returns the hyperbolic arccotangent of a number |

AGGREGATE: Returns an aggregate in a list or database |

ASIN: Returns the arcsine of a number |

ASINH: Returns the inverse hyperbolic sine of a number |

ATAN: Returns the arctangent of a number |

ATAN2: Returns the arctangent from x- and y-coordinates |

ATANH: Returns the inverse hyperbolic tangent of a number |

CEILING: Rounds up a number to the nearest integer or to the nearest multiple of significance |

COS: Returns the cosine of a number |

COSH: Returns the hyperbolic cosine of a number |

COT: Returns the hyperbolic cosine of a number |

COTH: Returns the cotangent of an angle |

CSC: Returns the cosecant of an angle |

CSCH: Returns the hyperbolic cosecant of an angle |

DEGREES: Converts radians to degrees |

EVEN: Rounds a number up to the nearest even integer |

EXP: Returns e raised to the power of a given number |

FACT: Returns the factorial of a number |

FACTDOUBLE: Returns the double factorial of a number |

FLOOR: Rounds a number down, toward zero |

GCD: Returns the greatest common divisor |

INT: Rounds a number down to the nearest integer |

ISO.CEILING: Returns a number that is rounded up to the nearest integer or to the nearest multiple of significance |

LCM: Returns the least common multiple |

LN: Returns the natural logarithm of a number |

LOG: Returns the logarithm of a number to a specified base |

LOG10: Returns the base-10 logarithm of a number |

MAX: Returns the maximum value in a list of arguments |

MEDIAN: Returns the median of the given numbers |

MIN: Returns the minimum value in a list of arguments |

MOD: Returns the remainder from division |

MROUND: Returns a number rounded to the desired multiple |

MULTINOMIAL: Returns the multinomial of a set of numbers |

ODD: Rounds a number up to the nearest odd integer |

PI: Returns the value of pi |

POWER: Returns the result of a number raised to a power |

PRODUCT: Multiplies its arguments |

QUOTIENT: Returns the integer portion of a division |

RADIANS: Converts degrees to radians |

RAND: Returns a random number between 0 and 1 |

RANDBETWEEN: Returns a random number between the numbers you specify |

ROUND: Rounds a number to a specified number of digits |

ROUNDDOWN: Rounds a number down, toward zero |

ROUNDUP: Rounds a number up, away from zero |

SEC: Returns the secant of an angle |

SECH: Returns the hyperbolic secant of an angle |

SERIESSUM: Returns the sum of a power series based on the formula |

SIGN: Returns the sign of a number |

SIN: Returns the sine of the given angle |

SINH: Returns the hyperbolic sine of a number |

SQRT: Returns a positive square root |

SQRTPI: Returns the square root of (number * pi) |

SUBTOTAL: Returns a subtotal in a list or database |

SUM: Adds its arguments |

SUMPRODUCT: Returns the sum of the products of corresponding array components |

SUMSQ: Returns the sum of the squares of the arguments |

SUMX2MY2: Returns the sum of the difference of squares of corresponding values in two arrays |

SUMX2PY2: Returns the sum of the sum of squares of corresponding values in two arrays |

SUMXMY2: Returns the sum of squares of differences of corresponding values in two arrays |

TAN: Returns the tangent of a number |

TANH: Returns the hyperbolic tangent of a number |

TRUNC: Truncates a number to an integer |

Keywords: percentage; percent; per cent; %