LibreOffice 25.2 Help
This category contains the Mathematical functions for Calc. To open the Function Wizard, choose Insert - Function.
This function returns an aggregate result of the calculations in the range. You can use different aggregate functions listed below. The Aggregate function enables you to omit hidden rows, errors, SUBTOTAL and other AGGREGATE function results in the calculation.
Adds a set of numbers.
Returns the sum of the values of cells in a range that meets multiple criteria in multiple ranges.
Returns the absolute value of a number.
ABS(Number)
Number is the value whose absolute value is to be calculated.
Entering the value -56 will return an absolute value of 56.
Entering the value 56 will return an absolute value of 56.
The inverse trigonometric sine of -1 returns the value -1.57.
Returns the inverse trigonometric cosine of a number.
ACOS(Number)
Number is the value, whose inverse trigonometric cosine value is to be calculated.
To return the angle in degrees, use the DEGREES function.
The inverse trigonometric cosine of -1 returns the value 3.14.
=DEGREES(ACOS(0.5)) returns 60. The cosine of 60 degrees is 0.5.
Returns the inverse hyperbolic cosine of a number.
ACOSH(Number)
Number is the value whose inverse hyperbolic cosine is to be calculated.
Number must be greater than or equal to 1.
The inverse hyperbolic cosine of 1 returns the value 0.
The inverse hyperbolic cosine of 1 returns the value 0.
Returns the inverse cotangent of the given number.
ACOT(Number)
Number is the value whose inverse cotangent is to be calculated.
To return the angle in degrees, use the DEGREES function.
The inverse cotangent of -1 returns the value 2.36.
=DEGREES(ACOT(1)) returns 45. The tangent of 45 degrees is 1.
Returns the inverse hyperbolic cotangent of the given number.
ACOTH(Number)
Number is the value whose inverse hyperbolic cotangent is to be calculated.
An error results if Number is between -1 and 1 inclusive.
The inverse hyperbolic cotangent of 1.1 returns the value 1.52.
Returns the inverse trigonometric sine of a number.
ASIN (Number)
Number is the value whose inverse trigonometric sine is to be calculated.
To return the angle in degrees, use the DEGREES function.
The inverse trigonometric sine of -1 returns the value -1.57.
The inverse trigonometric tangent of -1 returns the value -0.79.
=DEGREES(ASIN(0.5)) returns 30. The sine of 30 degrees is 0.5.
Returns the inverse hyperbolic sine of a number.
ASINH(Number)
Number is the value whose inverse hyperbolic sine is to be calculated.
The inverse hyperbolic sine of -90 returns the value -5.19.
The inverse trigonometric sine of -1 returns the value -1.57.
Returns the inverse trigonometric tangent of a number.
ATAN(Number)
Number is the value whose inverse trigonometric tangent value is to be calculated.
To return the angle in degrees, use the DEGREES function.
The inverse trigonometric tangent of -1 returns the value -0.79.
=DEGREES(ATAN(1)) returns 45. The tangent of 45 degrees is 1.
Returns the angle (in radians) between the x-axis and a line from the origin to the point (NumberX|NumberY).
ATAN2(Number x; number y)
NumberX is the value of the x coordinate.
Number y is the value for the y coordinate.
Programming languages have usually the opposite order of arguments for their atan2() function.
ATAN2 returns the angle (in radians) between the x-axis and a line from the origin to the point (NumberX|NumberY)
=ATAN2(-5;9) returns 2.07789 radians.
To get the angle in degrees apply the DEGREES function to the result.
=DEGREES(ATAN2(12.3;12.3)) returns 45. The tangent of 45 degrees is 1.
LibreOffice results 0 for ATAN2(0;0).
The function can be used in converting cartesian coordinates to polar coordinates.
=DEGREES(ATAN2(-8;5)) returns φ = 147.9 degrees
Returns the inverse hyperbolic tangent of a number.
ATANH(Number)
Number is the value whose inverse hyperbolic tangent is to be calculated.
Number must obey the condition -1 < number < 1.
The inverse hyperbolic tangent of 0.99 returns the value 2.65.
Returns the number of combinations for a given number of objects.
COMBIN(count 1; count 2)
Count 1 is the total number of elements.
Count 2 is the select count from the elements.
COMBIN returns the number of ordered ways to choose these items. For example if there are 3 items A, B and C in a set, you can choose 2 items in 3 different ways, namely AB, AC and BC.
COMBIN implements the formula: Count1!/(Count2!*(Count1-Count2)!)
If you enter 2 in text boxes Count 1 and 2, 1 will be returned as the result.
Returns the number of combinations for a given number of objects (repetition included).
COMBINA(count 1; count 2)
Count 1 is the total number of elements.
Count 2 is the select count from the elements.
COMBINA returns the number of unique ways to choose these items, where the order of choosing is irrelevant, and repetition of items is allowed. For example if there are 3 items A, B and C in a set, you can choose 2 items in 6 different ways, namely AA, AB, AC, BB, BC and CC.
COMBINA implements the formula: (Count1+Count2-1)! / (Count2!(Count1-1)!)
If you enter 2 in text boxes Count 1 and 2, 3 will be returned as the result.
Converts between old European national currency and to and from Euros.
EUROCONVERT(Value; "From_currency"; "To_currency" [; full_precision [; triangulation_precision]])
Value is the amount in the currency to be converted.
Text is the official abbreviation for the currency in question (for example, "EUR"). The first Text parameter gives the source value to be converted, the second Text parameter gives the destination value.
Full_precision is optional. If omitted or False, the result is rounded according to the decimals of the To currency. If Full_precision is True, the result is not rounded.
Triangulation_precision is optional. If Triangulation_precision is given and >=3, the intermediate result of a triangular conversion (currency1,EUR,currency2) is rounded to that precision. If Triangulation_precision is omitted, the intermediate result is not rounded. Also if To currency is "EUR", Triangulation_precision is used as if triangulation was needed and conversion from EUR to EUR was applied.
=CONVERT(100;"ATS";"EUR") converts 100 Austrian Schilling into Euro.
=CONVERT(100;"EUR";"DEM") converts 100 Euro into German Mark.
Converts to euros a currency value expressed in one of the legacy currencies of 19 member states of the Eurozone, and vice versa. The conversion uses the fixed exchange rates at which the legacy currencies entered the euro.
We recommend using the more flexible EUROCONVERT function for converting between these currencies. CONVERT_OOO is not a standardized function and is not portable.
CONVERT_OOO(Value; "Text1"; "Text2")
Value is the amount in the currency to be converted.
Text1 is a three-character string that specifies the currency to be converted from.
Text2 is a three-character string that specifies the currency to be converted to.
Text1 and Text2 must each take one of the following values: "ATS", "BEF", "CYP", "DEM", "EEK", "ESP", "EUR", "FIM", "FRF", "GRD", "IEP", "ITL", "LTL", "LUF", "LVL", "MTL", "NLG", "PTE", "SIT", and "SKK".
One, and only one, of Text1 or Text2 must be equal to "EUR".
=CONVERT_OOO(100;"ATS";"EUR") returns the euro value of 100 Austrian schillings.
=CONVERT_OOO(100;"EUR";"DEM") converts 100 euros into German marks.
Refer to the CONVERT_OOO wiki page for more details about this function.
Дава косинус на дадениот агол (во радијанси).
COS(Number)
Number is the value whose cosine is to be calculated.
To return the cosine of an angle in degrees, use the RADIANS function.
The angle 6.28 (2Pi) returns a cosine of 1.
The angle 3.14 (Pi) returns a cosine of -1.
Returns the hyperbolic cosine of a number.
COSH(Number)
Number is the value whose hyperbolic cosine is to be calculated.
Entering the value -5 will return a hyperbolic cosine of 74.21.
Returns the cotangent of the given angle.
COT(Number)
Number is the value whose cotangent is to be calculated.
To return the cotangent of an angle in degrees, use the RADIANS function.
The cotangent of an angle is equivalent to 1 divided by the tangent of that angle.
The angle -45 returns a cotangent of -0.62.
The angle 90 returns a cotangent of -0.5.
Returns the hyperbolic cotangent of a given number (angle).
COTH(Number)
Number is the value whose hyperbolic cotangent is to be calculated.
Entering the value 90 returns a hyperbolic cotangent of 1.
Returns the cosecant of the given angle (in radians). The cosecant of an angle is equivalent to 1 divided by the sine of that angle
COSH(Number)
Number is the value whose cosine is to be calculated.
To return the cosecant of an angle in degrees, use the RADIANS function.
=CSC(PI()/4) returns approximately 1.4142135624, the inverse of the sine of PI/4 radians.
The angle 3.14 (Pi) returns a cosine of -1.
Returns the hyperbolic cosine of a number.
COSH(Number)
Number is the value whose hyperbolic cosine is to be calculated.
=CSCH(1) returns approximately 0.8509181282, the hyperbolic cosecant of 1.
Converts radians into degrees.
DEG(Number)
Number is the value to be converted.
=DEGREES(PI()) returns 180 degrees.
Rounds a positive number up to the nearest even integer and a negative number down to the nearest even integer.
EVEN(number)
Number is the number that is to be rounded.
If you enter the number 0.01, 2 will be returned as the result.
If you enter the number 0.01, 2 will be returned as the result.
The inverse trigonometric sine of -1 returns the value -1.57.
If you enter the number 0.01, 2 will be returned as the result.
Returns e raised to the power of a number. The constant e has a value of approximately 2.71828182845904.
EXP(number)
Number is the power to which e is to be raised.
=EXP(1) returns 2.71828182845904, the mathematical constant e to Calc's accuracy.
Returns the factorial of a non-negative integer.
FACT(Integer)
Returns Integer!, the factorial of Integer, calculated as 1*2*3*4* ... * Integer.
Returns the "invalid argument" error if the argument is negative integer.
Returns the #VALUE! error if the argument is greater than 170, cause too large integer (approximately 7E+306.
=FACT(0) returns 1 by definition.
If the argument is a non-integer number, it is converted to its floor integer value.
FACT(10) returns 3628800.
=FACT(3.8) returns 6.
FACT(0) by definition returns 1.
Returns the greatest common divisor of two or more integers.
The greatest common divisor is the positive largest integer which will divide, without remainder, each of the given integers.
GCD(Integer 1 [; Integer 2 [; … [; Integer 255]]])
If you enter the numbers 512;1024 and 2000 in text boxes Integer 1;2 and 3, 16 will be returned as the result.
=GCD(B1:B3) where cells B1, B2, B3 contain 9, 12, 9 gives 3.
The result is the greatest common divisor of a list of numbers.
GCD_EXCEL2003(Number 1 [; Number 2 [; … [; Number 255]]])
=GCD_EXCEL2003(5;15;25) returns 5.
Rounds a number down to the nearest integer.
INT(number)
Number is the number that is to be rounded down to the nearest integer.
Negative numbers round down to the integer below.
If you enter the number -0.1, -1 will be returned as the result.
If you enter the number 23.74, 23 will be returned as the result.
Returns the least common multiple of one or more integers.
LCM(Integer 1 [; Integer 2 [; … [; Integer 255]]])
If you enter the numbers 512; 1024 and 2000 as Integer 1;2 and 3, then 128000 will be returned.
The result is the lowest common multiple of a list of numbers.
LCM_EXCEL2003(Number 1 [; Number 2 [; … [; Number 255]]])
=LCM_EXCEL2003(5;15;25) returns 75.
Returns the natural logarithm based on the constant e of a number. The constant e has a value of approximately 2.71828182845904.
LN(number)
Number is the value whose natural logarithm is to be calculated.
The natural logarithm to the base e of the value 3 will return the rounded value of 1.1 as the result.
=GESTEP(5;1) returns 1.
Returns the logarithm of a number to the specified base.
LOG(Number [; Base])
Number is the value whose logarithm is to be calculated.
Base is the base for the logarithm calculation.
The logarithm of the number 10 to the base 3 will return 2.1 as the result.
If you enter the number -0.1, -1 will be returned as the result.
Returns the base-10 logarithm of a number.
LOG10(number)
Number is the value whose logarithm to the base 10 is to be calculated.
The logarithm to the base 10 of the value 3 will return 0.48 as the result.
Returns the remainder after a number is divided by a divisor.
MOD(Dividend; Divisor)
Dividend is the value from which to find the remainder after dividing.
Divisor is the number by which to divide the specified value.
The value 17 in the Dividend field is to be divided by the divisor -1.4. -1.2 will be returned as the remainder.
Entering the value 56 will return an absolute value of 56.
The result is the nearest integer multiple of the number.
MROUND(Number; Multiple)
Returns Number rounded to the nearest multiple of Multiple.
An alternative implementation would be Multiple * ROUND(Number/Multiple).
Which integer multiple of 3 is the number 15.5 closest to?
=MROUND(1.6;0.5) returns 1.5, the nearest integer multiple of 0.5 to approach 1.6.
Returns the factorial of the sum of the arguments divided by the product of the factorials of the arguments.
MULTINOMIAL(Number 1 [; Number 2 [; … [; Number 255]]])
=MULTINOMIAL(F11:H11) returns 1260, if F11 to H11 contain the values 2, 3 and 4. This corresponds to the formula =(2+3+4)! / (2!*3!*4!)
Rounds a positive number up to the nearest odd integer and a negative number down to the nearest odd integer.
ODD(number)
Number is the number that is to be rounded.
If you enter the number 1.01, 3 will be returned as the result.
If you enter the number 1.01, 3 will be returned as the result.
If you enter the number 1.01, 3 will be returned as the result.
If you enter the number 1.01, 3 will be returned as the result.
Returns the value of PI (rounded value 3.14159).
PI()
Pi is 3.14159... as a rounded value.
Returns the result of a number raised to a power.
POWER(base; power) or base ^ power
Base is the number that is to be raised to a given power.
The same result may be achieved by using the exponentiation operator ^: Base^Exponent
=POWER(0,0) returns 1; =POWER(0,X) reports the #NUM! error when exponent X is negative.
=POWER(B,X) may or may not report a #NUM! error when B is negative and X is not an integer.
=POWER(4;3) returns 64, which is 4 to the power of 3.
=4^3 also returns 4 to the power of 3.
=POWER(2;-3) returns 0.125.
=POWER(-2;1/3) returns -1.25992104989487.
=POWER(-2;2/3) returns the #NUM! error.
Multiplies all the numbers given as arguments and returns the product.
PRODUCT(Number 1 [; Number 2 [; … [; Number 255]]])
If you enter the numbers 2; 3 and 4 in the Number 1; 2 and 3 text boxes, 24 will be returned as the result.
Returns the integer result of a division operation.
QUOTIENT(Numerator;Denominator)
Returns the integer part of Numerator divided by Denominator.
QUOTIENT is equivalent to INT(numerator/denominator) for same-sign numerator and denominator, except that it may report errors with different error codes. More generally, it is equivalent to INT(numerator/denominator/SIGN(numerator/denominator))*SIGN(numerator/denominator).
=QUOTIENT(11;3) returns 3. The remainder of 2 is omitted.
Converts degrees to radians.
RADIANS(number)
Number is the angle in degrees.
=RADIANS(90) returns 1.5707963267949, which is PI/2 to Calc's accuracy.
Returns a random number between 0 and 1.
RAND()
This function produces a new random number each time Calc recalculates. To force Calc to recalculate manually press F9.
To generate random numbers which never recalculate, either:
Copy cells each containing =RAND(), and use (with Paste All and Formulas not marked and Numbers marked).
Use the Fill Cell command with random numbers ().
Use the RAND.NV() function for non-volatile random numbers.
=RAND() returns a random number between 0 and 1.
Returns a non-volatile random number between 0 and 1.
RAND.NV()
This function produces a non-volatile random number on input. A non-volatile function is not recalculated at new input events. The function does not recalculate when pressing F9, except when the cursor is on the cell containing the function or using the command (Shift+CommandCtrl+F9). The function is recalculated when opening the file.
=RAND.NV() returns a non-volatile random number between 0 and 1.
ORG.LIBREOFFICE.RAND.NV
Returns an integer random number between Bottom and Top (both inclusive). To recalculate press Shift+Ctrl+F9.
RANDBETWEEN (Bottom; Top)
Returns an integer random number between integers Bottom and Top (both inclusive).
This function produces a new random number each time Calc recalculates. To force Calc to recalculate manually press F9.
To generate random numbers which never recalculate, copy cells containing this function, and use (with and not marked and marked).
=RANDBETWEEN (20;30) returns an integer of between 20 and 30.
Returns an non-volatile integer random number in a specified range.
RANDBETWEEN.NV(Bottom; Top)
Returns an non-volatile integer random number between integers Bottom and Top (both inclusive). A non-volatile function is not recalculated at new input events or pressing F9. However, the function is recalculated when pressing F9 with the cursor on the cell containing the function, when opening the file, when using the command (Shift+CommandCtrl+F9) and when Top or Bottom are recalculated.
=RANDBETWEEN.NV(20;30) returns a non-volatile integer between 20 and 30.
=RANDBETWEEN.NV(A1;30) returns a non-volatile integer between the value of cell A1 and 30. The function is recalculated when the contents of cell A1 change.
ORG.LIBREOFFICE.RANDBETWEEN.NV
Returns a number rounded to a certain number of decimal places.
ROUND(Number [; Count])
number is the number to be rounded.
This function rounds to the nearest number. See ROUNDDOWN and ROUNDUP for alternatives.
If you enter the number 17.546 in the number field, with 1 specified as the number of rounding places, 17.5 will be returned as the result.
=ROUND(-32.4834; 3) returns -32.483. Change the cell format to see all decimals.
If you enter the number 17.546 in the number field, with 1 specified as the number of rounding places, 17.5 will be returned as the result.
If you enter the number 1.01, 3 will be returned as the result.
Entering the value 123.343 and the value 2 in the count field will return the value 123.35.
Rounds a number up, according to the specified decimal place.
ROUNDUP(Number [; Count])
number is the number to be rounded up.
This function rounds away from zero. See ROUNDDOWN and ROUND for alternatives.
Entering the value 123.343 and the value 2 in the count field will return the value 123.35.
Entering the value 567.567 and the value 2 in the count field will return 567.56.
Entering the value 123.343 and the value 2 in the count field will return the value 123.35.
If you enter the number -4.5, -1 will be returned as the result.
Entering the value 123.343 and the value 2 in the count field will return the value 123.35.
Returns the secant of the given angle (in radians). The secant of an angle is equivalent to 1 divided by the cosine of that angle
SIN(number)
Number is the angle in radians.
To return the secant of an angle in degrees, use the RADIANS function.
=SEC(PI()/4) returns approximately 1.4142135624, the inverse of the cosine of PI/4 radians.
The angle 3.14 (Pi) returns a cosine of -1.
Returns the hyperbolic sine of a number.
SINH(number)
Number is the number whose hyperbolic sine is to be calculated.
If you enter the value -5, -74.2 will be returned as the hyperbolic sine.
Returns a sum of powers of the number x in accordance with the following formula:
SERIESSUM(x;n;m;c) = c1xn + c2xn+m + c3xn+2m + ... + cixn + (i-1)m.
SERIESSUM(x; n; m; coefficients)
x: the number as an independent variable
n: the starting power
m: the increment
coefficients: a series of coefficients. For each coefficient the series sum is extended by one section.
=SERIESSUM(A1; 0; 1; {1; 2; 3}) calculates the value of 1+2x+3x2, where x is the value in cell A1. If A1 contains 1, the formula returns 6; if A1 contains 2, the formula returns 17; if A1 contains 3, the formula returns 34; and so on.
Refer to the SERIESSUM wiki page for more details about this function.
Returns the sign of a number. The function returns the result 1 for a positive sign and -1 for a negative sign. If the number is zero, then the function likewise produces a zero.
SIGN(number)
Number is the number whose sign is to be determined.
If you enter the number 3.4, 1 will be returned as the result.
If you enter the number -4.5, -1 will be returned as the result.
Returns the sine of the given number (angle).
SIN(number)
Number is the angle in radians.
To return the sine of an angle in degrees, use the RADIANS function.
The sine of the angle (in radians) 3.14 (Pi) is 0.
The angle 3.14 (Pi) returns a cosine of -1.
Returns the hyperbolic sine of a number.
SINH(number)
Number is the number whose hyperbolic sine is to be calculated.
If you enter the value -5, -74.2 will be returned as the hyperbolic sine.
Returns the positive square root of a number. The value of the number must be positive.
SQRT(number)
Number is the number whose square root is to be calculated.
Number must be positive.
The square root of 16 is 4.
=SQRT(-16) returns an invalid argument error.
Returns the square root of a number*PI.
SQRTPI (Number)
Returns the positive square root of (PI multiplied by Number).
This is equivalent to SQRT(PI()*Number).
=SQRTPI(2) returns the rounded value 2.506628.
Calculates subtotals. If a range already contains subtotals, these are not used for further calculations. Use this function with the AutoFilters to take only the filtered records into account.
SUBTOTAL(function; range)
Function is a number that stands for one of the following functions:
| Function index (includes hidden values) | Function index (ignores hidden values) | Функција | 
|---|---|---|
| 1 | 101 | AVERAGE | 
| 2 | 102 | COUNT | 
| 3 | 103 | COUNTA | 
| 4 | 104 | MAX | 
| 5 | 105 | MIN | 
| 6 | 106 | PRODUCT | 
| 7 | 107 | STDEV | 
| 8 | 108 | STDEVP | 
| 9 | 109 | SUM | 
| 10 | 110 | VAR | 
| 11 | 111 | VARP | 
Use numbers 1-11 to include manually hidden rows or 101-111 to exclude them; filtered-out cells are always excluded.
Range is the range whose cells are included.
You have a table in the cell range A1:B6 containing a bill of material for 10 students.
| A | B | |
|---|---|---|
| 1 | ITEM | QUANTITY | 
| 2 | Pen | 10 | 
| 3 | Pencil | 10 | 
| 4 | Notebook | 10 | 
| 5 | Rubber | 10 | 
| 6 | Sharpener | 10 | 
Let's say one row is manually hidden, then the first formula shows the sum of the 5 figures filtered; the second, only the sum of the 4 figures displayed.
=SUBTOTAL(9;B2:B6) returns 50.
=SUBTOTAL(109;B2:B6) returns 40.
Calculates the sum of the squares of a set of numbers.
SUMSQ(Number 1 [; Number 2 [; … [; Number 255]]])
If you enter the numbers 2; 3 and 4 in the Number 1; 2 and 3 arguments, 29 is returned as the result.
Returns the tangent of the given angle.
TAN(number)
Number is the angle in radians.
To return the tangent of an angle in degrees, use the RADIANS function.
The tangent of the angle (in radians) 3.14 (Pi) is 0.
The angle 90 returns a cotangent of -0.5.
Returns the hyperbolic tangent of a number.
TANH(number)
Number is the number whose hyperbolic tangent is to be calculated.
If you enter the value -5, the system returns the hyperbolic tangent -1.