\<bookmark_value\>mathematical functions\</bookmark_value\>\<bookmark_value\>Function Wizard; mathematical\</bookmark_value\>\<bookmark_value\>functions; mathematical functions\</bookmark_value\>\<bookmark_value\>trigonometric functions\</bookmark_value\>

Mathematical Functions

This category contains the Mathematical functions for Calc. To open the Function Wizard, choose Insert - Function.

AGGREGATE

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.

RAWSUBTRACT

Subtracts a set of numbers and gives the result without eliminating small roundoff errors.

COLOR

Return a numeric value calculated by a combination of three colors (red, green and blue) and the alpha channel, in the RGBA color system. The result depends on the color system used by your computer.

SUMIFS

Returns the sum of the values of cells in a range that meets multiple criteria in multiple ranges.

\<bookmark_value\>SUM function\</bookmark_value\>\<bookmark_value\>adding;numbers in cell ranges\</bookmark_value\>

SUM

Adds all the numbers in a range of cells.

Syntax

SUM(number1; number 2; ...; number 30)

Number1 to Number30 are up to 30 arguments, either cells or ranges, whose sum is to be calculated.

tip

SUM ignores any text or empty cell within a range or array. If you suspect wrong results of the SUM function, look for text in the data ranges. Use the value highlighting feature to highlight the text contents in the range that may represent a number.


Example

If you enter the numbers 2; 3 and 4 in the Number 1; 2 and 3 text boxes, 9 will be returned as the result.

SUM(A1;A3;B5) calculates the sum of the three cells. SUM (A1:E10) calculates the sum of all cells in the A1 to E10 cell range.

Conditions linked by AND can be used with the function SUM() in the following manner:

Example assumption: You have entered invoices into a table. Column A contains the date value of the invoice, column B the amounts. You want to find a formula that you can use to return the total of all amounts only for a specific month, e.g. only the amount for the period >=1.1.99 to <1.2.99. The range with the date values covers A1:A40, the range containing the amounts to be totaled is B1:B40. C1 contains the start date, 1.1.99, of the invoices to be included and C2 the date, 1.2.99, that is no longer included.

Enter the following formula as an array formula:

=SUM((A1:A40>=C1)*(A1:A40<C2)*B1:B40)

In order to enter this as an array formula, you must press the Shift+ Enter keys instead of simply pressing the Enter key to close the formula. The formula will then be shown in the Formula bar enclosed in braces.

{=SUM((A1:A40>=C1)*(A1:A40<C2)*B1:B40)}

The formula is based on the fact that the result of a comparison is 1, if the criterion is met and 0 if it is not. The individual comparison results will be treated as an array and used in matrix multiplication, and at the end the individual values will be totaled to give the result matrix.

\<bookmark_value\>SUMIF function\</bookmark_value\>\<bookmark_value\>adding;specified numbers\</bookmark_value\>

SUMIF

Adds the cells specified by a given criteria. This function is used to browse a range when you search for a certain value.

The search supports wildcards or regular expressions. With regular expressions enabled, you can enter "all.*", for example to find the first location of "all" followed by any characters. If you want to search for a text that is also a regular expression, you must either precede every character with a "\" character, or enclose the text into \Q...\E. You can switch the automatic evaluation of wildcards or regular expression on and off in - LibreOffice Calc - Calculate.

warning

When using functions where one or more arguments are search criteria strings that represents a regular expression, the first attempt is to convert the string criteria to numbers. For example, ".0" will convert to 0.0 and so on. If successful, the match will not be a regular expression match but a numeric match. However, when switching to a locale where the decimal separator is not the dot makes the regular expression conversion work. To force the evaluation of the regular expression instead of a numeric expression, use some expression that can not be misread as numeric, such as ".[0]" or ".\0" or "(?i).0".


Syntax

SUMIF(range; criteria; sum_range)

\<emph\>Range\</emph\> is the range to which the criteria are to be applied.

\<emph\>Criteria\</emph\> is the cell in which the search criterion is shown, or the search criterion itself. If the criteria is written into the formula, it has to be surrounded by double quotes.

\<emph\>Sum_range\</emph\> is the range from which values are summed. If this parameter has not been indicated, the values found in the \<emph\>Range\</emph\> are summed.

note

SUMIF supports the reference concatenation operator (~) only in the Criteria parameter, and only if the optional SumRange parameter is not given.


Example

To sum up only negative numbers: SUMIF(A1:A10;"<0")

=SUMIF(A1:A10;">0";B1:B10) - sums values from the range B1:B10 only if the corresponding values in the range A1:A10 are >0.

See COUNTIF() for some more syntax examples that can be used with SUMIF().

\<bookmark_value\>AutoFilter function; subtotals\</bookmark_value\>\<bookmark_value\>sums;of filtered data\</bookmark_value\>\<bookmark_value\>filtered data; sums\</bookmark_value\>\<bookmark_value\>SUBTOTAL function\</bookmark_value\>

SUBTOTAL

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.

Syntax

SUBTOTAL(function; range)

\<emph\>Function\</emph\> is a number that stands for one of the following functions:

Function index

(includes hidden values)

Function index

(ignores hidden values)

Function

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.

\<emph\>Range\</emph\> is the range whose cells are included.

Example

You have a table in the cell range A1:B6 containing a bill of material for 10 students. Row 2 (Pen) is manually hidden. You want to see the sum of the figures that are displayed; that is, just the subtotal for the filtered rows. In this case the correct formula would be:

A

B

1

ITEM

QUANTITY

2

Pen

10

3

Pencil

10

4

Notebook

10

5

Rubber

10

6

Sharpener

10


=SUBTOTAL(9;B2:B6) returns 50.

=SUBTOTAL(109;B2:B6) returns 40.

CONVERT_OOO

Converts a value from one unit of measurement to another unit of measurement. The conversion factors are given in a list in the configuration.

At one time the list of conversion factors included the legacy European currencies and the Euro (see examples below). We suggest using the new function EUROCONVERT for converting these currencies.

Syntax

CONVERT_OOO(value;"text";"text")

Example

=CONVERT_OOO(100;"ATS";"EUR") returns the Euro value of 100 Austrian Schillings.

=CONVERT_OOO(100;"EUR";"DEM") converts 100 Euros into German Marks.

\<bookmark_value\>Euro; converting in\</bookmark_value\>\<bookmark_value\>CONVERT function\</bookmark_value\>

CONVERT

Converts between old European national currency and to and from Euros.

Syntax

CONVERT(value;"Text"; "Text")

\<emph\>Value\</emph\> is the amount in the currency to be converted.

\<emph\>Text\</emph\> is the official abbreviation for the currency in question (for example, "EUR"). The first \<emph\>Text\</emph\> parameter gives the source value to be converted, the second \<emph\>Text\</emph\> 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.

\<emph\>Example:\</emph\>

=CONVERT(100;"ATS";"EUR") converts 100 Austrian Schilling into Euro.

=CONVERT(100;"EUR";"DEM") converts 100 Euro into German Mark.

\<bookmark_value\>RADIANS function\</bookmark_value\>\<bookmark_value\>converting;degrees, into radians\</bookmark_value\>

RADIANS

Converts degrees to radians.

Syntax

RADIANS(number)

\<emph\>Number\</emph\> is the angle in degrees.

Example

=RADIANS(90) returns 1.5707963267949, which is PI/2 to Calc's accuracy.

\<bookmark_value\>DEGREES function\</bookmark_value\>\<bookmark_value\>converting;radians, into degrees\</bookmark_value\>

DEGREES

Converts radians into degrees.

Syntax

DEG(Number)

\<emph\>Number\</emph\> is the value to be converted.

Example

=DEGREES(PI()) returns 180 degrees.

\<bookmark_value\>SUMSQ function\</bookmark_value\>\<bookmark_value\>square number additions\</bookmark_value\>\<bookmark_value\>sums;of square numbers\</bookmark_value\>

SUMSQ

If you want to calculate the sum of the squares of numbers (totaling up of the squares of the arguments), enter these into the text fields.

Syntax

SUMSQ(number 1 to 30)

\<emph\>Number 1 to number 30\</emph\> are up to 30 arguments the sum of whose squares is to be calculated.

Example

If you enter the numbers 2; 3 and 4 in the \<emph\>Number 1\</emph\>; \<emph\>2\</emph\> and \<emph\>3\</emph\> text boxes, 29 is returned as the result.

\<bookmark_value\>PRODUCT function\</bookmark_value\>\<bookmark_value\>numbers;multiplying\</bookmark_value\>\<bookmark_value\>multiplying;numbers\</bookmark_value\>

PRODUCT

Multiplies all the numbers given as arguments and returns the product.

Syntax

PRODUCT(number 1 to 30)

\<emph\>Number 1 to number 30\</emph\> are up to 30 arguments whose product is to be calculated.

PRODUCT returns number1 * number2 * number3 * ...

Example

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.

\<bookmark_value\>PI function\</bookmark_value\>

PI

Returns 3.14159265358979, the value of the mathematical constant PI to 14 decimal places.

Syntax

PI()

Example

=PI() returns 3.14159265358979.

\<bookmark_value\>POWER function\</bookmark_value\>

POWER

Returns a number raised to another number.

Syntax

POWER(Base; Exponent)

\<emph\>Base\</emph\> 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

Example

If you enter 3 as the base and -2 as the power, 0.11 will be returned as the result.

=4^3 also returns 4 to the power of 3.

\<bookmark_value\>MROUND function\</bookmark_value\>\<bookmark_value\>nearest multiple\</bookmark_value\>

MROUND

Returns a number rounded to the nearest multiple of another number.

Syntax

MROUND(Number; Multiple)

Returns Number rounded to the nearest multiple of Multiple.

An alternative implementation would be Multiple * ROUND(Number/Multiple).

Example

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.

\<bookmark_value\>RAND function\</bookmark_value\>\<bookmark_value\>random numbers;between 0 and 1\</bookmark_value\>

RAND

Returns a random number between 0 and 1.

Syntax

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, copy cells each containing =RAND(), and use Edit - Paste Special (with Paste All and Formulas not marked and Numbers marked).

Example

=RAND() returns a random number between 0 and 1.

\<bookmark_value\>random numbers; between limits\</bookmark_value\>\<bookmark_value\>RANDBETWEEN function\</bookmark_value\>

RANDBETWEEN

Returns an integer random number in a specified range.

Syntax

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 Edit - Paste Special (with Paste All and Formulas not marked and Numbers marked).

Example

=RANDBETWEEN (20;30) returns an integer of between 20 and 30.

\<bookmark_value\>EXP function\</bookmark_value\>

EXP

Returns e raised to the power of a number. The constant e has a value of approximately 2.71828182845904.

Syntax

EXP(number)

\<emph\>Number\</emph\> is the power to which e is to be raised.

Example

The result for e raised to the power -4 is 0.02.

\<bookmark_value\>ABS function\</bookmark_value\>\<bookmark_value\>absolute values\</bookmark_value\>\<bookmark_value\>values;absolute\</bookmark_value\>

ABS

Returns the absolute value of a number.

Syntax

ABS(Number)

\<emph\>Number\</emph\> is the value whose absolute value is to be calculated.

Example

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.

\<bookmark_value\>ATAN2 function\</bookmark_value\>

ATAN2

Returns the angle (in radians) between the x-axis and a line from the origin to the point (NumberX|NumberY).

Note Icon

This function is part of the Open Document Format for Office Applications (OpenDocument) standard Version 1.2. (ISO/IEC 26300:2-2015)


Syntax

ATAN2(Number x; number y)

NumberX is the value of the x coordinate.

\<emph\>Number y\</emph\> is the value for the y coordinate.

tip

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)

Example

=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.

note

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

Cartesian coordinates to polar coordinates example

Open file with example:

\<bookmark_value\>LOG10 function\</bookmark_value\>\<bookmark_value\>base-10 logarithm\</bookmark_value\>

LOG10

Returns the base-10 logarithm of a number.

Syntax

LOG10(number)

\<emph\>Number\</emph\> is the value whose logarithm to the base 10 is to be calculated.

Example

The logarithm to the base 10 of the value 3 will return 0.48 as the result.

\<bookmark_value\>ASIN function\</bookmark_value\>

CSC

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

tip

This function is available since LibreOffice 3.5


Syntax

COSH(Number)

\<emph\>Number\</emph\> is the value whose cosine is to be calculated.

To return the cosecant of an angle in degrees, use the RADIANS function.

Example

=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.

Open file with example:

\<bookmark_value\>COS function\</bookmark_value\>

COS

Returns the cosine of the given angle (in radians).

Syntax

COS(Number)

\<emph\>Number\</emph\> is the value whose cosine is to be calculated.

To return the cosine of an angle in degrees, use the RADIANS function.

Example

The angle 6.28 (2Pi) returns a cosine of 1.

The angle 3.14 (Pi) returns a cosine of -1.

Open file with example:

\<bookmark_value\>COT function\</bookmark_value\>

COT

Returns the cotangent of the given angle (in radians).

Syntax

COT(Number)

\<emph\>Number\</emph\> 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.

Example:

The angle -45 returns a cotangent of -0.62.

The angle 90 returns a cotangent of -0.5.

Open file with example:

\<bookmark_value\>FACT function\</bookmark_value\>\<bookmark_value\>factorials;numbers\</bookmark_value\>

FACT

Returns the factorial of a number.

Syntax

FACT(number)

\<emph\>Number\</emph\> is the value whose factorial is to be calculated.

=FACT(0) returns 1 by definition.

The factorial of a negative number returns the "invalid argument" error.

Example

FACT(10) returns 3628800.

FACT(0) by definition returns 1.

\<bookmark_value\>MULTINOMIAL function\</bookmark_value\>

MULTINOMIAL

Returns the factorial of the sum of the arguments divided by the product of the factorials of the arguments.

Syntax

MULTINOMIAL (Number(s))

Number(s) is a list of up to 30 numbers.

Example

=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!)

\<bookmark_value\>GCD function\</bookmark_value\>\<bookmark_value\>greatest common divisor\</bookmark_value\>

GCD

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.

Syntax

GCD(integer 1 to 30)

\<emph\>Integer 1 to 30\</emph\> are up to 30 integers whose greatest common divisor is to be calculated.

Example

GCD(16;32;24) gives the result 8, because 8 is the largest number that can divide 16, 24 and 32 without a remainder.

GCD(B1:B3) where cells B1, B2, B3 contain 9, 12, 9 gives 3.

\<bookmark_value\>ASIN function\</bookmark_value\>

CSCH

Returns the hyperbolic cosecant of a number.

tip

This function is available since LibreOffice 3.5


Syntax

COSH(Number)

\<emph\>Number\</emph\> is the value whose hyperbolic cosine is to be calculated.

Example

=CSCH(1) returns approximately 0.8509181282, the hyperbolic cosecant of 1.

Open file with example:

\<bookmark_value\>COSH function\</bookmark_value\>

COSH

Returns the hyperbolic cosine of a number.

Syntax

COSH(Number)

\<emph\>Number\</emph\> is the value whose hyperbolic cosine is to be calculated.

Example

Entering the value -5 will return a hyperbolic cosine of 74.21.

Open file with example:

\<bookmark_value\>COTH function\</bookmark_value\>

COTH

Returns the hyperbolic cotangent of a given number (angle).

Syntax

COTH(Number)

\<emph\>Number\</emph\> is the value whose hyperbolic cotangent is to be calculated.

Example

Entering the value 90 returns a hyperbolic cotangent of 1.

Open file with example:

\<bookmark_value\>SEARCH function\</bookmark_value\>

SECH

Returns the hyperbolic secant of a number.

tip

This function is available since LibreOffice 3.5


Syntax

SINH(number)

\<emph\>Number\</emph\> is the number whose hyperbolic sine is to be calculated.

Example

If you enter the value -5, -74.2 will be returned as the hyperbolic sine.

Open file with example:

\<bookmark_value\>SINH function\</bookmark_value\>

SINH

Returns the hyperbolic sine of a number.

Syntax

SINH(number)

\<emph\>Number\</emph\> is the number whose hyperbolic sine is to be calculated.

Example

If you enter the value -5, -74.2 will be returned as the hyperbolic sine.

Open file with example:

\<bookmark_value\>TANH function\</bookmark_value\>

TANH

Returns the hyperbolic tangent of a number.

Syntax

TANH(number)

\<emph\>Number\</emph\> is the number whose hyperbolic tangent is to be calculated.

Example

If you enter the value -5, the system returns the hyperbolic tangent -1.

Open file with example:

\<bookmark_value\>QUOTIENT function\</bookmark_value\>\<bookmark_value\>divisions\</bookmark_value\>

QUOTIENT

Returns the integer part of a division operation.

Syntax

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).

Example

=QUOTIENT(11;3) returns 3. The remainder of 2 is lost.

\<bookmark_value\>ACOT function\</bookmark_value\>

ACOT

Returns the inverse cotangent (the arccotangent) of the given number.

Syntax

ACOT(Number)

\<emph\>Number\</emph\> is the value whose inverse cotangent is to be calculated.

To return the angle in degrees, use the DEGREES function.

Example

The inverse cotangent of -1 returns the value 2.36.

=DEGREES(ACOT(1)) returns 45. The tangent of 45 degrees is 1.

Open file with example:

\<bookmark_value\>ACOSH function\</bookmark_value\>

ACOSH

Returns the inverse hyperbolic cosine of a number.

Syntax

ACOSH(Number)

\<emph\>Number\</emph\> is the value whose inverse hyperbolic cosine is to be calculated.

Number must be greater than or equal to 1.

Example

The inverse hyperbolic cosine of 1 returns the value 0.

The inverse hyperbolic cosine of 1 returns the value 0.

Open file with example:

\<bookmark_value\>ACOTH function\</bookmark_value\>

ACOTH

Returns the inverse hyperbolic cotangent of the given number.

Syntax

ACOTH(Number)

\<emph\>Number\</emph\> is the value whose inverse hyperbolic cotangent is to be calculated.

An error results if Number is between -1 and 1 inclusive.

Example

The inverse hyperbolic cotangent of 1.1 returns the value 1.52.

Open file with example:

\<bookmark_value\>ASINH function\</bookmark_value\>

ASINH

Returns the inverse hyperbolic sine of a number.

Syntax

ASINH(Number)

\<emph\>Number\</emph\> is the value whose inverse hyperbolic sine is to be calculated.

Example

The inverse hyperbolic sine of -90 returns the value -5.19.

The inverse trigonometric sine of -1 returns the value -1.57.

Open file with example:

\<bookmark_value\>ATANH function\</bookmark_value\>

ATANH

Returns the inverse hyperbolic tangent of a number.

Syntax

ATANH(Number)

\<emph\>Number\</emph\> is the value whose inverse hyperbolic tangent is to be calculated.

Number must obey the condition -1 < number < 1.

Example

The inverse hyperbolic tangent of 0.99 returns the value 2.65.

Open file with example:

\<bookmark_value\>ACOS function\</bookmark_value\>

ACOS

Returns the inverse trigonometric cosine of a number.

Syntax

ACOS(Number)

\<emph\>Number\</emph\> is the value, whose inverse trigonometric cosine value is to be calculated.

To return the angle in degrees, use the DEGREES function.

Example

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.

Open file with example:

\<bookmark_value\>ASIN function\</bookmark_value\>

ASIN

Returns the inverse trigonometric sine of a number.

Syntax

ASIN (Number)

\<emph\>Number\</emph\> is the value whose inverse trigonometric sine is to be calculated.

To return the angle in degrees, use the DEGREES function.

Example

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.

Open file with example:

\<bookmark_value\>ATAN function\</bookmark_value\>

ATAN

Returns the inverse trigonometric tangent of a number.

Syntax

ATAN(Number)

\<emph\>Number\</emph\> is the value whose inverse trigonometric tangent value is to be calculated.

To return the angle in degrees, use the DEGREES function.

Example

The inverse trigonometric tangent of -1 returns the value -0.79.

=DEGREES(ATAN(1)) returns 45. The tangent of 45 degrees is 1.

Open file with example:

\<bookmark_value\>LCM function\</bookmark_value\>\<bookmark_value\>least common multiples\</bookmark_value\>\<bookmark_value\>lowest common multiples\</bookmark_value\>

LCM

Returns the least common multiple of one or more integers.

Syntax

LCM(integer 1 to 30)

\<emph\>Integer 1 to 30\</emph\> are up to 30 integers whose lowest common multiple is to be calculated.

Example

If you enter the numbers 512;1024 and 2000 in the Integer 1;2 and 3 text boxes, 128000 will be returned as the result.

\<bookmark_value\>LOG function\</bookmark_value\>\<bookmark_value\>logarithms\</bookmark_value\>

LOG

Returns the logarithm of a number to the specified base.

Syntax

LOG(number; base)

\<emph\>Number\</emph\> is the value whose logarithm is to be calculated.

\<emph\>Base\</emph\> is the base for the logarithm calculation.

Example

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.

\<bookmark_value\>LN function\</bookmark_value\>\<bookmark_value\>natural logarithm\</bookmark_value\>

LN

Returns the natural logarithm based on the constant e of a number. The constant e has a value of approximately 2.71828182845904.

Syntax

LN(number)

\<emph\>Number\</emph\> is the value whose natural logarithm is to be calculated.

Example

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.

\<bookmark_value\>COMBIN function\</bookmark_value\>\<bookmark_value\>number of combinations\</bookmark_value\>

COMBIN

Returns the number of combinations for elements without repetition.

Syntax

COMBIN(count 1; count 2)

\<emph\>Count 1\</emph\> is the total number of elements.

\<emph\>Count 2\</emph\> 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)!)

Example

If you enter 2 in text boxes Count 1 and 2, 1 will be returned as the result.

\<bookmark_value\>COMBINA function\</bookmark_value\>\<bookmark_value\>number of combinations with repetitions\</bookmark_value\>

COMBINA

Returns the number of combinations of a subset of items including repetitions.

Syntax

COMBINA(count 1; count 2)

\<emph\>Count 1\</emph\> is the total number of elements.

\<emph\>Count 2\</emph\> 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)!)

Example

If you enter 2 in text boxes Count 1 and 2, 3 will be returned as the result.

\<bookmark_value\>SQRT function\</bookmark_value\>\<bookmark_value\>square roots;positive numbers\</bookmark_value\>

SQRT

Returns the positive square root of a number.

Syntax

SQRT(number)

\<emph\>Number\</emph\> is the number whose square root is to be calculated.

Number must be positive.

Example

The square root of 16 is 4.

=SQRT(-16) returns an invalid argument error.

\<bookmark_value\>MOD function\</bookmark_value\>\<bookmark_value\>remainders of divisions\</bookmark_value\>

MOD

Returns the remainder when one integer is divided by another.

Syntax

MOD(Dividend; Divisor)

\<emph\>Dividend\</emph\> is the value from which to find the remainder after dividing.

\<emph\>Divisor\</emph\> is the number by which to divide the specified value.

Example

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.

\<bookmark_value\>SKEW function\</bookmark_value\>

SEC

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

tip

This function is available since LibreOffice 3.5


Syntax

SIN(number)

\<emph\>Number\</emph\> is the angle in radians.

To return the secant of an angle in degrees, use the RADIANS function.

Example

=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.

Open file with example:

\<bookmark_value\>SIGN function\</bookmark_value\>\<bookmark_value\>algebraic signs\</bookmark_value\>

SIGN

Returns the sign of a number. Returns 1 if the number is positive, -1 if negative and 0 if zero.

Syntax

SIGN(number)

\<emph\>Number\</emph\> is the number whose sign is to be determined.

Example

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.

\<bookmark_value\>SIN function\</bookmark_value\>

SIN

Returns the sine of the given angle (in radians).

Syntax

SIN(number)

\<emph\>Number\</emph\> is the angle in radians.

To return the sine of an angle in degrees, use the RADIANS function.

Example

The sine of the angle (in radians) 3.14 (Pi) is 0.

The angle 3.14 (Pi) returns a cosine of -1.

Open file with example:

\<bookmark_value\>SQRTPI function\</bookmark_value\>\<bookmark_value\>square roots;products of Pi\</bookmark_value\>

SQRTPI

Returns the square root of (PI times a number).

Syntax

SQRTPI (Number)

Returns the positive square root of (PI multiplied by Number).

This is equivalent to SQRT(PI()*Number).

Example

=SQRTPI(2) returns the rounded value 2.506628.

\<bookmark_value\>TAN function\</bookmark_value\>

TAN

Returns the tangent of the given angle (in radians).

Syntax

TAN(number)

\<emph\>Number\</emph\> is the angle in radians.

To return the tangent of an angle in degrees, use the RADIANS function.

Example

The tangent of the angle (in radians) 3.14 (Pi) is 0.

The angle 90 returns a cotangent of -0.5.

Open file with example:

CEILING.XCL

Rounds a number away from zero to the nearest multiple of Significance.

tip

This function is available since LibreOffice 5.0


Syntax

CEILING.XCL(Number; Significance)

Number is the number that is to be rounded.

Significance is the number to whose multiple the value is to be rounded.

warning

This function exists for interoperability with Microsoft Excel 2007 or older versions.


Example

=CEILING.XCL(1;3) returns 3

=CEILING.XCL(7;4) returns 8

=CEILING.XCL(-10;-3) returns -12

\<bookmark_value\>INT function\</bookmark_value\>\<bookmark_value\>numbers;rounding down to next integer\</bookmark_value\>\<bookmark_value\>rounding;down to next integer\</bookmark_value\>

INT

Rounds a number down to the nearest integer.

Syntax

INT(number)

\<emph\>Number\</emph\> is the number that is to be rounded down to the nearest integer.

Negative numbers round down to the integer below.

Example

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.

FLOOR.PRECISE

Rounds a number down to the nearest multiple of Significance, regardless of sign of Significance

tip

This function is available since LibreOffice 4.3


Syntax

FLOOR.PRECISE(Number; Significance)

\<emph\>Number\</emph\> is the number that is to be rounded down.

\<emph\>Significance\</emph\> is the value to whose multiple the number is to be rounded down.

warning

If the spreadsheet is exported to Microsoft Excel, the FLOOR function is exported as the equivalent FLOOR.MATH function that exists since Excel 2013. If you plan to use the spreadsheet with earlier Excel versions, use either FLOOR.PRECISE that exists since Excel 2010, or FLOOR.XCL that is exported as the FLOOR function compatible with all Excel versions. Note that FLOOR.XCL always rounds towards zero.


Example

=FLOOR( -11; -2) returns -12

FLOOR

Rounds a number down to the nearest multiple of Significance.

Syntax

FLOOR(Number; Significance; Mode)

\<emph\>Number\</emph\> is the number that is to be rounded down.

\<emph\>Significance\</emph\> is the value to whose multiple the number is to be rounded down.

Mode is an optional value. If the Mode value is given and not equal to zero, and if Number and Significance are negative, then rounding is done based on the absolute value of Number, i.e. negative numbers are rounded towards zero. If the Mode value is equal to zero or is not given, negative numbers are rounded away from zero.

warning

If the spreadsheet is exported to Microsoft Excel, the FLOOR function is exported as the equivalent FLOOR.MATH function that exists since Excel 2013. If you plan to use the spreadsheet with earlier Excel versions, use either FLOOR.PRECISE that exists since Excel 2010, or FLOOR.XCL that is exported as the FLOOR function compatible with all Excel versions. Note that FLOOR.XCL always rounds towards zero.


Example

=FLOOR( -11; -2) returns -12

=FLOOR( -11; -2; 0) returns -12

=FLOOR( -11; -2; 1) returns -10

\<bookmark_value\>ROUNDDOWN function\</bookmark_value\>

ROUNDDOWN

Rounds a number down, toward zero, to a certain precision.

Syntax

ROUNDDOWN(number; count)

\<emph\>number\</emph\> is the number to be rounded down.

This function rounds towards zero. See ROUNDUP and ROUND for alternatives.

Example

Entering the value 567.567 and the value 2 in the \<emph\>count\</emph\> field will return 567.56.

Entering the value 567.567 and the value 2 in the \<emph\>count\</emph\> field will return 567.56.

Entering the value 567.567 and the value 2 in the \<emph\>count\</emph\> field will return 567.56.

Entering the value 567.567 and the value 2 in the \<emph\>count\</emph\> field will return 567.56.

\<bookmark_value\>ROUND function\</bookmark_value\>

ROUND

Rounds a number to a certain number of decimal places.

Syntax

ROUND(number; count)

\<emph\>number\</emph\> is the number to be rounded.

This function rounds to the nearest number. See ROUNDDOWN and ROUNDUP for alternatives.

Example

If you enter the number 17.546 in the \<emph\>number\</emph\> 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 \<emph\>number\</emph\> 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 \<emph\>count\</emph\> field will return the value 123.35.

\<bookmark_value\>CEILING function\</bookmark_value\>\<bookmark_value\>rounding;up to multiples of significance\</bookmark_value\>

CEILING.PRECISE

Rounds a number up to the nearest multiple of Significance, regardless of sign of Significance

tip

This function is available since LibreOffice 4.3


Syntax

CEILING.PRECISE(Number; Significance)

\<emph\>Number\</emph\> is the number that is to be rounded up.

\<emph\>Significance\</emph\> is the number to whose multiple the value is to be rounded up.

Example

=CEILING( -11; -2) returns -10

\<bookmark_value\>CEILING function\</bookmark_value\>\<bookmark_value\>rounding;up to multiples of significance\</bookmark_value\>

ISO.CEILING

Rounds a number up to the nearest multiple of Significance, regardless of sign of Significance

Syntax

ISO.CEILING(Number; Significance)

\<emph\>Number\</emph\> is the number that is to be rounded up.

\<emph\>Significance\</emph\> is the number to whose multiple the value is to be rounded up.

Example

=CEILING( -11; -2) returns -10

\<bookmark_value\>CEILING function\</bookmark_value\>\<bookmark_value\>rounding;up to multiples of significance\</bookmark_value\>

CEILING

Rounds a number up to the nearest multiple of Significance.

Syntax

CEILING(Number; Significance; Mode)

\<emph\>Number\</emph\> is the number that is to be rounded up.

\<emph\>Significance\</emph\> is the number to whose multiple the value is to be rounded up.

Mode is an optional value. If the Mode value is given and not equal to zero, and if Number and Significance are negative, then rounding is done based on the absolute value of Number, i.e. negative numbers are rounded away from zero. If the Mode value is equal to zero or is not given, negative numbers are rounded towards zero.

warning

If the spreadsheet is exported to Microsoft Excel, the CEILING function is exported as the equivalent CEILING.MATH function that exists since Excel 2013. If you plan to use the spreadsheet with earlier Excel versions, use either CEILING.PRECISE that exists since Excel 2010, or CEILING.XCL that is exported as the CEILING function compatible with all Excel versions. Note that CEILING.XCL always rounds away from zero.


Example

=CEILING( -11; -2) returns -10

=CEILING( -11; -2; 0) returns -10

=CEILING( -11; -2; 1) returns -12

CEILING.MATH

Rounds a number up to the nearest multiple of Significance.

Syntax

CEILING.MATH(Number; Significance; Mode)

Number is the number that is to be rounded up.

Significance is the number to whose multiple the value is to be rounded up.

Mode is an optional value. If the Mode value is given and not equal to zero, and if Number and Significance are negative, then rounding is done based on the absolute value of Number, i.e. negative numbers are rounded away from zero. If the Mode value is equal to zero or is not given, negative numbers are rounded towards zero.

warning

This function exists for interoperability with Microsoft Excel 2013 or newer.


Example

=CEILING.MATH(-10;-3) returns -9

=CEILING.MATH(-10;-3;0) returns -9

=CEILING.MATH(-10;-3;1) returns -12

\<bookmark_value\>ROUNDUP function\</bookmark_value\>

ROUNDUP

Rounds a number up, away from zero, to a certain precision.

Syntax

ROUNDUP(number; count)

\<emph\>number\</emph\> is the number to be rounded up.

This function rounds away from zero. See ROUNDDOWN and ROUND for alternatives.

Example

Entering the value 123.343 and the value 2 in the \<emph\>count\</emph\> field will return the value 123.35.

Entering the value 567.567 and the value 2 in the \<emph\>count\</emph\> field will return 567.56.

Entering the value 123.343 and the value 2 in the \<emph\>count\</emph\> 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 \<emph\>count\</emph\> field will return the value 123.35.

\<bookmark_value\>ODD function\</bookmark_value\>\<bookmark_value\>rounding;up/down to nearest odd integer\</bookmark_value\>

ODD

Rounds a positive number up to the nearest odd integer and a negative number down to the nearest odd integer.

Syntax

ODD(number)

\<emph\>Number\</emph\> is the number that is to be rounded.

Example

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.

\<bookmark_value\>EVEN function\</bookmark_value\>\<bookmark_value\>numbers;rounding up/down to even integers\</bookmark_value\>\<bookmark_value\>rounding;up/down to even integers\</bookmark_value\>

EVEN

Rounds a positive number up to the next even integer and a negative number down to the next even integer.

Syntax

EVEN(number)

\<emph\>Number\</emph\> is the number that is to be rounded.

Example

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.

\<bookmark_value\>SERIESSUM function\</bookmark_value\>

SERIESSUM

Sums the first terms of a power series.

SERIESSUM(x;n;m;coefficients) = coefficient_1*x^n + coefficient_2*x^(n+m) + coefficient_3*x^(n+2m) +...+ coefficient_i*x^(n+(i-1)m)

Syntax

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.

GCD_EXCEL2003

The result is the greatest common divisor of a list of numbers.

note

The functions whose names end with _ADD or _EXCEL2003 return the same results as the corresponding Microsoft Excel 2003 functions without the suffix. Use the functions without suffix to get results based on international standards.


Syntax

GCD_EXCEL2003(Number(s))

Number(s) is a list of up to 30 numbers.

Example

=GCD_EXCEL2003(5;15;25) returns 5.

LCM_EXCEL2003

The result is the lowest common multiple of a list of numbers.

note

The functions whose names end with _ADD or _EXCEL2003 return the same results as the corresponding Microsoft Excel 2003 functions without the suffix. Use the functions without suffix to get results based on international standards.


Syntax

LCM_EXCEL2003(Number(s))

Number(s) is a list of up to 30 numbers.

Example

=LCM_EXCEL2003(5;15;25) returns 75.

\<bookmark_value\>TRUNC function\</bookmark_value\>\<bookmark_value\>decimal places;cutting off\</bookmark_value\>

TRUNC

Truncates a number by removing decimal places.

Syntax

TRUNC(number; count)

\<emph\>Number\</emph\> is the number whose decimal places are to be cut off.

\<emph\>Count\</emph\> is the number of places after the decimal delimiter that are not to be truncated.

warning

The visible decimal places of the result are specified in - LibreOffice Calc - Calculate.


Example

If you enter the number 34.5678 and the count 1, 34.5 will be returned as the result.

If you enter the number 34.5678 and the count 1, 34.5 will be returned as the result.

Please support us!