Mathematical Functions in Formulas
- 12 minutes to read
This document describes mathematical and trigonometry functions supported by DevExpress Spreadsheet Document API.
Name | Description | Syntax | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns the absolute value of a number. The absolute value of a number is the number without its sign. | ABS(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the arccosine, or inverse cosine, of a number. The function returns the angle in radians in the range from 0 (zero) to pi. | ACOS(number) The argument must be from -1 to 1. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the inverse hyperbolic cosine of a number. The number must be greater than or equal to 1. | ACOSH(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the inverse cotangent (the arccotangent) of a number. | ACOT(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the inverse hyperbolic cotangent of a number. | ACOTH(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns an aggregate in a list or database. | Reference form: AGGREGATE(function_num, options, ref1, [ref2], …) Array form: AGGREGATE(function_num, options, array, [k]) The function_num argument specifies which function to use.
The options argument defines which values to ignore during calculation.
Ref1, [ref2], … specify numeric arguments for the function in the reference form (you can supply up to 253 ref arguments). The array argument specifies an array, an array formula, or a reference to a cell range in the array form. [k] is the second argument that the following functions require: LARGE, SMALL, PERCENTILE.INC, QUARTILE.INC, PERCENTILE.EXC, and QUARTILE.EXC. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Converts a Roman numeral to an Arabic numeral. | ARABIC(text) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the arcsine, or inverse sine, of a number. The function returns the angle in radians in the range from -pi/2 to pi/2. | ASIN(number) The argument must be from -1 to 1. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the inverse hyperbolic sine of a number. | ASINH(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the arctangent, or inverse tangent, of a number. The function returns the angle in radians in the range from -pi/2 to pi/2. | ATAN(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Calculates the arctangent (or inverse tangent) of the specified x- and y-coordinates. The function returns the angle in radians between -pi and pi, excluding -pi. | ATAN2(x_num, y_num) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the inverse hyperbolic tangent of a number. The number must be between -1 and 1 (excluding -1 and 1). | ATANH(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Converts a number into a text representation with a given base. | BASE(number, radix [min_length]) The number must be a positive integer less than 2^53. Radix is the base that you want to convert the number into. Radix must be an integer greater than or equal to 2 and less than or equal to 36. Min_length is the minimum length of the returned string. If you specify min_length, the function adds leading zeros to the result if necessary. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns a number rounded up, away from zero, to the nearest multiple of significance. | CEILING(number, significance) The number is the value to round, and the significance is the multiple to which you want to round. If the number and the significance are negative, the function rounds the value down, away from zero. If the number is negative and the significance is positive, the function rounds the value up, toward zero. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rounds a number up to the nearest integer or to the nearest multiple of significance. | CEILING.MATH(number, [significance], [mode]) The number is the value to round, and the optional significance parameter is the multiple to which you want to round. The optional mode parameter affects negative numbers only and specifies whether the function rounds the number toward or away from zero. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns a number that is rounded up to the nearest integer or to the nearest multiple of significance. | CEILING.PRECISE(number, [significance]) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the number of combinations for a given number of items. | COMBIN(number, number_chosen) Number is the total number of items, and number_chosen is the number of items in each combination. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the number of combinations (with repetitions) for a given number of items. | COMBINA(number, number_chosen) Number is the total number of items, and number_chosen is the number of items in each combination. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the cosine of an angle specified in radians. | COS(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the hyperbolic cosine of a number. | COSH(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the cotangent of an angle specified in radians. | COT(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the hyperbolic cotangent of a number. | COTH(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the cosecant of an angle specified in radians. | CSC(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the hyperbolic cosecant of an angle specified in radians. | CSCH(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Converts a text representation of a number in a given base into a decimal number. | DECIMAL(text, radix) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Converts radians into degrees. | DEGREES(angle) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns a number rounded up to the nearest even integer. | EVEN(number) Regardless of the sign of the number, the function rounds the value up, away from zero. If the number is an even integer, the function does not round the number. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns e raised to the power of number. The constant e equals 2.71828, the base of the natural logarithm. | EXP(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the factorial of a number. | FACT(number) The number must be nonnegative. If the number is not an integer, the function truncates the number. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the double factorial of a number. | FACTDOUBLE(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rounds a number down, toward zero, to the nearest multiple of significance. | FLOOR(number, significance) The number is the value to round, and the significance is the multiple to which you want to round. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rounds a number down to the nearest integer or to the nearest multiple of significance. | FLOOR.MATH(number, [significance], [mode]) The number is the value to round, and the significance is the multiple to which you want to round. The optional mode parameter specifies the direction (toward or away from 0) in which to round negative numbers. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rounds a number down to the nearest integer or to the nearest multiple of significance. Regardless of the sign of the number, the function rounds the number down. | FLOOR.PRECISE(number, [significance]) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the greatest common divisor of two or more integers. | GCD(number1, [number2], …) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rounds a number down to the nearest integer. | INT(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns a number that is rounded up to the nearest integer or to the nearest multiple of significance. | ISO.CEILING(number, [significance]) The number is the value to round, and the optional significance is the multiple to which you want to round. If you omit the significance, the default value is 1. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the least common multiple of integers. | LCM(number1, [number2], …) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the natural logarithm of a number. | LN(number) The number is a positive real number. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the logarithm of a number to the base you specify. | LOG(number, [base]) The number is a positive real number. The base parameter is the base of the logarithm. If you omit the base parameter, the function uses base 10. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the base-10 logarithm of a number. | LOG10(number) The number is a positive real number. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the matrix determinant of an array. | MDETERM(array) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the inverse matrix for a matrix stored in an array. | MINVERSE(array) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the matrix product of two arrays. The result is an array with the same number of rows as array1 and the same number of columns as array2. | MMULT(array1, array2) The number of columns in array1 must be the same as the number of rows in array2, and both arrays must contain only numbers. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the remainder after a number is divided by a divisor. | MOD(number, divisor) The number is the number for which to find the remainder, and the divisor is the number by which you want to divide the number. The result has the same sign as the divisor. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns a number rounded to the desired multiple. | MROUND(number, multiple) The number is the value to round, and the second parameter is the multiple to which you want to round the number. The function rounds up, away from zero, if the division of the number by the multiple leaves a remainder that is greater than or equal to half the value of the multiple. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the unit matrix for the specified dimension. | MUNIT(dimension) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the multinomial of a set of numbers. | MULTINOMIAL(number1, [number2], …) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rounds a number up to the nearest odd integer. | ODD(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the number 3.14159265358979, the mathematical constant pi, accurate to 15 digits. | PI() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the result of a number raised to a power. | POWER(number, power) The number is a real number, and the power is the exponent to which the function raises the number. You can use the “^” operator instead. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Multiplies all numbers given as arguments and returns the product. | PRODUCT(number1, [number2], …) If an argument is an array or reference, the function multiplies only numbers in the array or reference. The function ignores empty cells, logical values, and text. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the integer portion of a division. | QUOTIENT(numerator, denominator) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Converts degrees to radians. | RADIANS(angle) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns an evenly distributed random real number greater than or equal to 0 and less than 1. The function returns a new random real number every time the worksheet is calculated. | RAND() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns a random integer number between the numbers you specify. The function returns a new random integer number every time the worksheet is calculated. | RANDBETWEEN(bottom, top) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Converts an Arabic numeral to a Roman numeral, as text. | ROMAN(number, [form]) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rounds a number to a specified number of digits. | ROUND(number, num_digits) If num_digits is 0, the function rounds the number to the nearest integer. If num_digits is greater than 0, the function rounds the number to the specified number of decimal places. If num_digits is less than 0, the function rounds the number to the left of the decimal point. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rounds a number down (toward zero) to a specified number of digits. | ROUNDDOWN(number, num_digits) If num_digits is 0, the function rounds the number down to the nearest integer. If num_digits is greater than 0, the function rounds the number down to the specified number of decimal places. If num_digits is less than 0, the function rounds the number down to the left of the decimal point. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rounds a number up (away from zero) to a specified number of digits. | ROUNDUP(number, num_digits) If num_digits is 0, the function rounds the number up to the nearest integer. If num_digits is greater than 0, the function rounds the number up to the specified number of decimal places. If num_digits is less than 0, the function rounds the number up to the left of the decimal point. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the secant of an angle specified in radians. | SEC(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the hyperbolic secant of an angle specified in radians. | SECH(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the sum of a power series based on the formula. | SERIESSUM(x, n, m, coefficients) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Determines the sign of a number. Returns 1 if the number is positive, zero (0) if the number is 0, and -1 if the number is negative. | SIGN(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the sine of an angle specified in radians. | SIN(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the hyperbolic sine of a number. | SINH(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns a positive square root. | SQRT(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Multiplies a specified number by pi and returns the square root of the product. | SQRTPI(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns a subtotal in a list or database. | SUBTOTAL(function_num,ref1,[ref2],…) Function_num is the number that specifies the calculation type. The function_num argument accepts the following values:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Adds all numbers that you specify as arguments. | SUM(number1,[number2],…) Each argument can be a range, a cell reference, an array, a constant, a formula, or the result from another function. If an argument is an array or reference, the function counts only numbers in that array or reference. The function ignores empty cells, logical values, and text. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Adds cells that meet a given condition or criterion. | SUMIF(range, criteria, [sum_range]) Range is the range of cells that you want to evaluate by criteria. Criteria is a number, expression, cell reference, text, or function that defines which cells to add. The optional sum_range parameter specifies the actual cells to add. If you omit sum_range, the function adds the cells that the range argument specifies. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sums all cells that meet multiple criteria. | SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], …) Sum_range is the range of cells to sum. Criteria_range is the cell range in which to evaluate the specified criteria. The criteria is a number, expression, cell reference, or text that defines which cells in the criteria_range argument to add. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the sum of the products of the corresponding ranges or arrays. | =SUMPRODUCT(array1, [array2], [array3], …) The array arguments must have the same dimensions. The function treats nonnumeric array entries as zeros. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the sum of the squares of the arguments. | SUMSQ(number1, number2, …) You can also use a single array or a reference to an array instead of arguments separated by commas. The function ignores empty cells, logical values, and text in the array or reference. If the array or reference contains an error value, the function returns this error. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the sum of the difference of squares of corresponding values in two arrays. | SUMX2MY2(array_x, array_y) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the sum of the sum of squares of corresponding values in two arrays. | SUMX2PY2(array_x, array_y) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the sum of squares of differences of corresponding values in two arrays. | SUMXMY2(array_x, array_y) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the tangent of an angle specified in radians. | TAN(angle) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the hyperbolic tangent of a number. | TANH(number) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Truncates a number to an integer by removing the fractional part of the number. | TRUNC(number, [num_digits]) |