e3rAo‖

6DkNc‖Mathematical Functions

UNxJE‖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.

e3VEx‖RAWSUBTRACT

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

SUM

Adds a set of numbers.

aJCj8‖SUMIF

mUL2X‖ Determines which values in a range of cells meet a specified criterion, then returns the sum of the matching values. Alternatively the function can determine which values in one range of cells meet a criterion, then return the sum of values in the corresponding cells in a second range of cells.

qjPSR‖COLOR

HXh5E‖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.

Tw4qL‖

2nDNc‖MROUND

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

GSbiK‖Syntax

VJzdZ‖MROUND(Number; Multiple)

A2zWC‖Returns Number rounded to the nearest multiple of Multiple.

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

MiUAf‖Example

ZG5Uf‖=MROUND(15.5;3) returns 15, as 15.5 is closer to 15 (= 3*5) than to 18 (= 3*6).

unovG‖=MROUND(1.4;0.5) returns 1.5 (= 0.5*3).

AADEM‖

4Qoyh‖CONVERT_OOO

Dx7ki‖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.

tip

de7Xa‖We recommend using the more flexible EUROCONVERT function for converting between these currencies. CONVERT_OOO is not a standardized function and is not portable.


GSbiK‖Syntax

ETLYS‖CONVERT_OOO(Value; "Text1"; "Text2")

jE8Vq‖Value is the amount of the currency to be converted.

AE6XU‖Text1 is a three-character string that specifies the currency to be converted from.

w8BoY‖Text2 is a three-character string that specifies the currency to be converted to.

WMq4R‖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".

RBRUW‖One, and only one, of Text1 or Text2 must be equal to "EUR".

MiUAf‖Example

Smhnw‖=CONVERT_OOO(100;"ATS";"EUR") returns the euro value of 100 Austrian schillings.

UjHaw‖=CONVERT_OOO(100;"EUR";"DEM") converts 100 euros into German marks.

tip

TS87i‖Refer to the CONVERT_OOO wiki page for more details about this function.


igLmD‖

5ShBZ‖SQRT

cyUs3‖Returns the positive square root of a number.

GSbiK‖Syntax

x7UG6‖SQRT(Number)

oUAGh‖Returns the positive square root of Number.

vpBGF‖Number must be positive.

MiUAf‖Example

o7PWn‖=SQRT(16) returns 4.

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

B4XDm‖

5w2mG‖SQRTPI

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

GSbiK‖Syntax

bTULe‖SQRTPI(Number)

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

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

MiUAf‖Example

kMDdF‖=SQRTPI(2) returns the squareroot of (2PI), approximately 2.506628.

Dmk3R‖

873Eh‖RANDBETWEEN.NV

Akjyr‖Returns an non-volatile integer random number in a specified range.

GSbiK‖Syntax

GTDa4‖RANDBETWEEN.NV(Bottom; Top)

ztiBK‖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 Recalculate Hard command (Shift++F9) and when Top or Bottom are recalculated.

MiUAf‖Example

AngvN‖=RANDBETWEEN.NV(20;30) returns a non-volatile integer between 20 and 30.

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

XAFa7‖Technical information

tip

DWBCQ‖This function is available since LibreOfficeDev 7.0.


7AVhU‖This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

ORG.LIBREOFFICE.RANDBETWEEN.NV

hXRnE‖

9QijC‖SUBTOTAL

FYrQi‖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.

GSbiK‖Syntax

C5Dzz‖SUBTOTAL(Function; Range)

7yJFS‖Function is a number that stands for one of the following functions:

oTpgy‖Function index

5rGct‖(includes hidden values)

p8nf9‖Function index

uvGED‖(ignores hidden values)

8wDdD‖Function

1

101

vGJCV‖AVERAGE

2

102

De7oY‖COUNT

3

103

GEUKU‖COUNTA

4

104

iSAQE‖MAX

5

105

79grM‖MIN

6

106

rCkEd‖PRODUCT

7

107

pjTBB‖STDEV

8

108

c6PGT‖STDEVP

9

109

8yzmg‖SUM

10

110

hbgfY‖VAR

11

111

Pz83B‖VARP


wdwAv‖Use numbers 1-11 to include manually hidden rows or 101-111 to exclude them; filtered-out cells are always excluded.

4EoDE‖Range is the range whose cells are included.

note

rBWwb‖This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.


MiUAf‖Example

AfeKK‖You have a table in the cell range A1:B6 containing a bill of material for 10 students.

A

B

1

VNHf4‖ITEM

psjyr‖QUANTITY

2

yEGKp‖Pen

10

3

7NFso‖Pencil

10

4

QTafr‖Notebook

10

5

RZDgh‖Rubber

10

6

eY2F7‖Sharpener

10


Vqy4i‖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.

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

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

iUpFG‖

A3K3J‖ROUND

dn5Gv‖Rounds a number to a certain number of decimal places.

GSbiK‖Syntax

kj4B7‖ROUND(Number [; Count])

yE5Jb‖Returns Number rounded to Count decimal places. If Count is omitted or zero, the function rounds to the nearest integer. If Count is negative, the function rounds to the nearest 10, 100, 1000, etc.

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

MiUAf‖Example

3JvSm‖=ROUND(2.348;2) returns 2.35

Bv7Ae‖=ROUND(-32.4834;3) returns -32.483. Change the cell format to see all decimals.

NSuTv‖=ROUND(2.348;0) returns 2.

nqFjA‖=ROUND(2.5) returns 3.

kdcKK‖=ROUND(987.65;-2) returns 1000.

AEaRi‖ROUNDDOWN

dkTrh‖Truncates a number while keeping a specified number of decimal digits.

en4Ae‖

BEzhz‖RANDBETWEEN

eADpQ‖Returns an integer random number in a specified range.

4BGvn‖This function is always recalculated whenever a recalculation occurs.

GSbiK‖Syntax

c7jXH‖RANDBETWEEN(Bottom; Top)

NjkAg‖Returns an integer random number between integers Bottom and Top (both inclusive).

kanbM‖This function produces a new random number each time Calc recalculates. To force Calc to recalculate manually press F9.

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

MiUAf‖Example

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

4ZsyR‖

BJBud‖LCM

DTyGa‖Returns the least common multiple of one or more integers.

GSbiK‖Syntax

BeETS‖LCM(Integer 1 [; Integer 2 [; … [; Integer 255]]])

ria5A‖Integer 1; Integer 2; … ; Integer 255 are integers, references to cells or to cell ranges of integers.

note

rBWwb‖This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.


MiUAf‖Example

gzLdr‖If you enter the numbers 512; 1024 and 2000 as Integer 1;2 and 3, then 128000 will be returned.

AGMfT‖

BNJaJ‖TANH

Kwc9W‖Returns the hyperbolic tangent of a number.

GSbiK‖Syntax

nYZmD‖TANH(Number)

ACQqA‖Returns the hyperbolic tangent of Number.

MiUAf‖Example

cvfyw‖=TANH(0) returns 0, the hyperbolic tangent of 0.

R8Edh‖

Bt3xG‖TAN

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

GSbiK‖Syntax

iRwxK‖TAN(Number)

PQ4WT‖Returns the (trigonometric) tangent of Number, the angle in radians.

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

MiUAf‖Example

fstSK‖=TAN(PI()/4) returns 1, the tangent of PI/4 radians.

D2Ad2‖=TAN(RADIANS(45)) returns 1, the tangent of 45 degrees.

pLi7w‖

DXHBT‖MOD

URQsi‖Returns the remainder when one integer is divided by another.

GSbiK‖Syntax

Ngib7‖MOD(Dividend; Divisor)

SVHHj‖For integer arguments this function returns Dividend modulo Divisor, that is the remainder when Dividend is divided by Divisor.

BF5sT‖This function is implemented as Dividend - Divisor * INT(Dividend/Divisor) , and this formula gives the result if the arguments are not integer.

MiUAf‖Example

vqHs7‖=MOD(22;3) returns 1, the remainder when 22 is divided by 3.

VSYRx‖=MOD(11.25;2.5) returns 1.25.

f2Aka‖

DokVx‖MULTINOMIAL

2BkmB‖Returns the factorial of the sum of the arguments divided by the product of the factorials of the arguments.

GSbiK‖Syntax

sRmYD‖MULTINOMIAL(Number 1 [; Number 2 [; … [; Number 255]]])

FjFBG‖Number 1; Number 2; … ; Number 255 are numbers, references to cells or to cell ranges of numbers.

note

rBWwb‖This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.


MiUAf‖Example

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

DwZH8‖

EFWFk‖ACOT

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

GSbiK‖Syntax

CYA4f‖ACOT(Number)

Y6Tnv‖This function returns the inverse trigonometric cotangent of Number, that is the angle (in radians) whose cotangent is Number. The angle returned is between 0 and PI.

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

MiUAf‖Example

eqFRT‖=ACOT(1) returns 0.785398163397448 (PI/4 radians).

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

F3XVY‖

EThTd‖EUROCONVERT

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

GSbiK‖Syntax

G7CMF‖EUROCONVERT(Value; "From_currency"; "To_currency" [; full_precision [; triangulation_precision]])

4KJUc‖Value is the amount of the currency to be converted.

NRLg7‖From_currency and To_currency are the currency units to convert from and to respectively. These must be text, the official abbreviation for the currency (for example, "EUR"). The rates (shown per Euro) were set by the European Commission.

xRkH7‖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.

Pzmf5‖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.

YmarB‖Examples

F3QB8‖=EUROCONVERT(100;"ATS";"EUR") converts 100 Austrian Schillings into Euros.

55HyN‖=EUROCONVERT(100;"EUR";"DEM") converts 100 Euros into German Marks.

BFNbK‖

F5MCa‖ACOS

SAD26‖Returns the inverse trigonometric cosine of a number.

GSbiK‖Syntax

ntxMG‖ACOS(Number)

6MmkA‖This function returns the inverse trigonometric cosine of Number, that is the angle (in radians) whose cosine is Number. The angle returned is between 0 and PI.

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

MiUAf‖Example

sAGtp‖=ACOS(-1) returns 3.14159265358979 (PI radians)

Kh3AV‖=DEGREES(ACOS(0.5)) returns 60. The cosine of 60 degrees is 0.5.

T3Lfk‖

F6oSF‖ASIN

JA9Fz‖Returns the inverse trigonometric sine of a number.

GSbiK‖Syntax

EfpTx‖ASIN(Number)

DqsfM‖This function returns the inverse trigonometric sine of Number, that is the angle (in radians) whose sine is Number. The angle returned is between -PI/2 and +PI/2.

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

MiUAf‖Example

DvuX2‖=ASIN(0) returns 0.

MHQDN‖=ASIN(1) returns 1.5707963267949 (PI/2 radians).

8einR‖=DEGREES(ASIN(0.5)) returns 30. The sine of 30 degrees is 0.5.

62427‖

F87iB‖EXP

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

GSbiK‖Syntax

KxMFL‖EXP(Number)

XCACW‖Number is the power to which e is to be raised.

MiUAf‖Example

LfQsb‖=EXP(1) returns 2.71828182845904, the mathematical constant e to Calc's accuracy.

aAFCs‖

FBNeq‖RADIANS

3JGgG‖Converts degrees to radians.

GSbiK‖Syntax

ZGmDj‖RADIANS(Number)

DBrJQ‖Number is the angle in degrees to be converted to radians.

MiUAf‖Example

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

DBuu4‖

FeD4Q‖SIN

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

GSbiK‖Syntax

HhouY‖SIN(Number)

HcAKp‖Returns the (trigonometric) sine of Number, the angle in radians.

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

MiUAf‖Example

SkC9L‖=SIN(PI()/2) returns 1, the sine of PI/2 radians.

wKsi6‖=SIN(RADIANS(30)) returns 0.5, the sine of 30 degrees.

NAQL3‖

GDwDC‖EVEN

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

GSbiK‖Syntax

bh367‖EVEN(Number)

wWhFL‖Returns Number rounded to the next even integer up, away from zero.

MiUAf‖Example

LrmpS‖=EVEN(2.3) returns 4.

HBaDD‖=EVEN(2) returns 2.

ajTE5‖=EVEN(0) returns 0.

PsGTE‖=EVEN(-0.5) returns -2.

wGxga‖

GpboX‖LN

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

GSbiK‖Syntax

GEMgC‖LN(Number)

MCdjX‖Number is the value whose natural logarithm is to be calculated.

MiUAf‖Example

xfwKK‖=LN(3) returns the natural logarithm of 3 (approximately 1.0986).

9DhTA‖=LN(EXP(321)) returns 321.

6Bogj‖

NVcSc‖POWER

eo9hr‖Returns a number raised to another number.

GSbiK‖Syntax

tfGiC‖POWER(Base; Exponent)

mvLqV‖Returns Base raised to the power of Exponent.

P9dEi‖The same result may be achieved by using the exponentiation operator ^: Base^Exponent

note

Pej3x‖=POWER(0,0) returns 1; =POWER(0,X) reports the #NUM! error when exponent X is negative.


warning

ShFKC‖=POWER(B,X) may or may not report a #NUM! error when B is negative and X is not an integer.


MiUAf‖Example

YCb9B‖=POWER(4;3) returns 64, which is 4 to the power of 3.

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

psBP2‖=POWER(2;-3) returns 0.125.

CbgU3‖=POWER(-2;1/3) returns -1.25992104989487.

yaGk5‖=POWER(-2;2/3) returns the #NUM! error.

aQFpY‖

PDmTP‖ATAN2

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

note

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


GSbiK‖Syntax

9E6pr‖ATAN2(NumberX; NumberY)

NBEVV‖NumberX is the value of the x coordinate.

zoAbN‖NumberY is the value of the y coordinate.

tip

U46Cz‖Programming languages have usually the opposite order of arguments for their atan2() function.


pSdob‖ATAN2 returns the angle (in radians) between the x-axis and a line from the origin to the point (NumberX|NumberY)

MiUAf‖Example

AhEQK‖=ATAN2(-5;9) returns 2.07789 radians.

tPPGL‖To get the angle in degrees apply the DEGREES function to the result.

jrGY3‖=DEGREES(ATAN2(12.3;12.3)) returns 45. The tangent of 45 degrees is 1.

note

FhesC‖LibreOfficeDev results 0 for ATAN2(0;0).


BCKQE‖The function can be used in converting cartesian coordinates to polar coordinates.

dtCje‖=DEGREES(ATAN2(-8;5)) returns φ = 147.9 degrees

hN94X‖Cartesian coordinates to polar coordinates example

RFv2A‖TRUNC

dkTrh‖Truncates a number while keeping a specified number of decimal digits.

cpTwe‖

S4FNT‖ABS

KEWbx‖Returns the absolute value of a number.

GSbiK‖Syntax

3GmDj‖ABS(Number)

dVNFx‖Number is the number whose absolute value is to be calculated. The absolute value of a number is its value without the +/- sign.

MiUAf‖Example

R6vZe‖=ABS(-56) returns 56.

c9QEu‖=ABS(12) returns 12.

e3LqG‖=ABS(0) returns 0.

VEEJ6‖

VcwXQ‖DEGREES

RSBdF‖Converts radians into degrees.

GSbiK‖Syntax

EdDXa‖DEGREES(Number)

KiEbe‖Number is the angle in radians to be converted to degrees.

MiUAf‖Example

iFMmJ‖=DEGREES(PI()) returns 180 degrees.

5JAGR‖

VkkCe‖GCD_EXCEL2003

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

note

gGXZq‖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.


GSbiK‖Syntax

gQ2S4‖GCD_EXCEL2003(Number 1 [; Number 2 [; … [; Number 255]]])

FjFBG‖Number 1; Number 2; … ; Number 255 are numbers, references to cells or to cell ranges of numbers.

MiUAf‖Example

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

vibHV‖

VmHjN‖GCD

KTtGQ‖Returns the greatest common divisor of two or more integers.

xT9mo‖The greatest common divisor is the positive largest integer which will divide, without remainder, each of the given integers.

GSbiK‖Syntax

84G6i‖GCD(Integer 1 [; Integer 2 [; … [; Integer 255]]])

ria5A‖Integer 1; Integer 2; … ; Integer 255 are integers, references to cells or to cell ranges of integers.

note

rBWwb‖This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.


MiUAf‖Example

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

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

HLYDn‖

WbhD4‖SINH

QVnp3‖Returns the hyperbolic sine of a number.

GSbiK‖Syntax

6JvoA‖SINH(Number)

ni7NS‖Returns the hyperbolic sine of Number.

MiUAf‖Example

n3QAg‖=SINH(0) returns 0, the hyperbolic sine of 0.

zeYBB‖

Wf2xW‖SECH

NmN4C‖Returns the hyperbolic secant of a number.

tip

ctCQZ‖This function is available since LibreOfficeDev 3.5.


GSbiK‖Syntax

AHCoy‖SECH(Number)

H3NXF‖Returns the hyperbolic secant of Number.

MiUAf‖Example

wehEU‖=SECH(0) returns 1, the hyperbolic secant of 0.

zDx7Y‖

X4s2j‖SERIESSUM

HJFvh‖Sums the first terms of a power series.

PffuD‖SERIESSUM(x;n;m;c) = c1xn + c2xn+m + c3xn+2m + ... + cixn + (i-1)m.

GSbiK‖Syntax

BM5eM‖SERIESSUM(X; N; M; Coefficients)

BGBD2‖X is the input value for the power series.

WC7HT‖N is the initial power

iCF77‖M is the increment to increase N

V33vy‖Coefficients is a series of coefficients. For each coefficient the series sum is extended by one section.

MiUAf‖Example

4od8N‖=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.

tip

GAuUy‖Refer to the SERIESSUM wiki page for more details about this function.


Uuc7J‖

XLYGW‖ACOSH

SpAZ3‖Returns the inverse hyperbolic cosine of a number.

GSbiK‖Syntax

wbR3N‖ACOSH(Number)

fjTyF‖This function returns the inverse hyperbolic cosine of Number, that is the number whose hyperbolic cosine is Number.

kCQGj‖Number must be greater than or equal to 1.

MiUAf‖Example

qDtp7‖=ACOSH(1) returns 0.

Ak7eS‖=ACOSH(COSH(4)) returns 4.

CReB7‖

XzBbb‖COS

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

GSbiK‖Syntax

FJPfz‖COS(Number)

TanXc‖Returns the (trigonometric) cosine of Number, the angle in radians.

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

MiUAf‖Example

rFubR‖=COS(PI()*2) returns 1, the cosine of 2*PI radians.

6x9f7‖=COS(RADIANS(60)) returns 0.5, the cosine of 60 degrees.

SmdCH‖

ZwP9Q‖COSH

LyaEw‖Returns the hyperbolic cosine of a number.

GSbiK‖Syntax

qXhJu‖COSH(Number)

egMaN‖Returns the hyperbolic cosine of Number.

MiUAf‖Example

DgX9K‖=COSH(0) returns 1, the hyperbolic cosine of 0.

bb5bE‖

aHGYN‖COT

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

GSbiK‖Syntax

cCazR‖COT(Number)

eRLBR‖Returns the (trigonometric) cotangent of Number, the angle in radians.

pA8y3‖To return the cotangent of an angle in degrees, use the RADIANS function.

QfgqG‖The cotangent of an angle is equivalent to 1 divided by the tangent of that angle.

aPDaf‖Examples:

mUsra‖=COT(PI()/4) returns 1, the cotangent of PI/4 radians.

jbN84‖=COT(RADIANS(45)) returns 1, the cotangent of 45 degrees.

qRHof‖

bPrhC‖LOG10

JkBKm‖Returns the base-10 logarithm of a number.

GSbiK‖Syntax

LB4Zp‖LOG10(Number)

oig3w‖Returns the logarithm to base 10 of Number.

MiUAf‖Example

QKKaG‖=LOG10(5) returns the base-10 logarithm of 5 (approximately 0.69897).

EgwEY‖

dTCyN‖CSC

y7Bzh‖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

ctCQZ‖This function is available since LibreOfficeDev 3.5.


GSbiK‖Syntax

HMATE‖CSC(Number)

gcmdd‖Returns the (trigonometric) cosecant of Number, the angle in radians.

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

MiUAf‖Example

xtRtt‖=CSC(PI()/4) returns approximately 1.4142135624, the inverse of the sine of PI/4 radians.

EDhxM‖=CSC(RADIANS(30)) returns 2, the cosecant of 30 degrees.

qyEA9‖

dm2dg‖SIGN

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

GSbiK‖Syntax

Zee2K‖SIGN(Number)

fCQTV‖Number is the number whose sign is to be determined.

MiUAf‖Example

HFCAq‖=SIGN(3.4) returns 1.

hhN8j‖=SIGN(-4.5) returns -1.

aFw2E‖

gRoFa‖FACT

7G64n‖Returns the factorial of a non-negative integer.

GSbiK‖Syntax

jsdcC‖FACT(Integer)

F9Ftw‖Returns Integer!, the factorial of Integer, calculated as 1*2*3*4* ... * Integer.

Ev6bc‖Returns the "invalid argument" error if the argument is negative integer.

y9Q7S‖Returns the #VALUE! error if the argument is greater than 170, cause too large integer (approximately 7E+306.

V9FQf‖=FACT(0) returns 1 by definition.

AcCKF‖If the argument is a non-integer number, it is converted to its floor integer value.

MiUAf‖Example

ApvRx‖=FACT(3) returns 6.

uxtDN‖=FACT(3.8) returns 6.

Bu95p‖=FACT(0) returns 1.

eFX3W‖

iGusH‖SUMSQ

XFoEC‖Calculates the sum of the squares of a set of numbers.

GSbiK‖Syntax

2gNvN‖SUMSQ(Number 1 [; Number 2 [; … [; Number 255]]])

FjFBG‖Number 1; Number 2; … ; Number 255 are numbers, references to cells or to cell ranges of numbers.

note

rBWwb‖This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.


MiUAf‖Example

ANvo3‖If you enter the numbers 2; 3 and 4 in the Number 1; 2 and 3 arguments, 29 is returned as the result.

FxtGL‖

jAYMF‖SEC

YghxJ‖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

ctCQZ‖This function is available since LibreOfficeDev 3.5.


GSbiK‖Syntax

gAEsH‖SEC(Number)

GaxwE‖Returns the (trigonometric) secant of Number, the angle in radians.

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

MiUAf‖Example

TpXn6‖=SEC(PI()/4) returns approximately 1.4142135624, the inverse of the cosine of PI/4 radians.

PGbfP‖=SEC(RADIANS(60)) returns 2, the secant of 60 degrees.

J6L7C‖

k6VDK‖LOG

FszZ4‖Returns the logarithm of a number to the specified base.

GSbiK‖Syntax

uDAq7‖LOG(Number [; Base])

Eiqiq‖Number is the value whose logarithm is to be calculated.

uUuEv‖Base (optional) is the base for the logarithm calculation. If omitted, Base 10 is assumed.

MiUAf‖Example

8DQ5A‖=LOG(10;3) returns the logarithm to base 3 of 10 (approximately 2.0959).

GexW3‖=LOG(7^4;7) returns 4.

dD7Gh‖

kbhnE‖PI

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

GSbiK‖Syntax

nwa3w‖PI()

MiUAf‖Example

fdmnV‖=PI() returns 3.14159265358979.

CqVpJ‖

mDVmJ‖RAND.NV

Fc2hv‖Returns a non-volatile random number between 0 and 1.

GSbiK‖Syntax

dchBL‖RAND.NV()

7pUhN‖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 Recalculate Hard command (Shift++F9). The function is recalculated when opening the file.

MiUAf‖Example

sCwno‖=RAND.NV() returns a non-volatile random number between 0 and 1.

XAFa7‖Technical information

tip

DWBCQ‖This function is available since LibreOfficeDev 7.0.


7AVhU‖This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

ORG.LIBREOFFICE.RAND.NV

cqNkR‖

mNPBt‖ACOTH

P8Zmx‖Returns the inverse hyperbolic cotangent of the given number.

GSbiK‖Syntax

i7PSV‖ACOTH(Number)

JsEMu‖This function returns the inverse hyperbolic cotangent of Number, that is the number whose hyperbolic cotangent is Number.

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

MiUAf‖Example

mLGSV‖=ACOTH(1.1) returns inverse hyperbolic cotangent of 1.1, approximately 1.52226.

Bu6y9‖

n4wBf‖CSCH

aCTaF‖Returns the hyperbolic cosecant of a number.

tip

ctCQZ‖This function is available since LibreOfficeDev 3.5.


GSbiK‖Syntax

qHzpR‖CSCH(Number)

EYEtM‖Returns the hyperbolic cosecant of Number.

MiUAf‖Example

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

QXzii‖

nUuLQ‖ATANH

TVqPD‖Returns the inverse hyperbolic tangent of a number.

GSbiK‖Syntax

oMmDc‖ATANH(Number)

6weQk‖This function returns the inverse hyperbolic tangent of Number, that is the number whose hyperbolic tangent is Number.

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

MiUAf‖Example

2yvkB‖=ATANH(0) returns 0.

NC4Gg‖

oEDYA‖PRODUCT

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

GSbiK‖Syntax

Lsojw‖PRODUCT(Number 1 [; Number 2 [; … [; Number 255]]])

FjFBG‖Number 1; Number 2; … ; Number 255 are numbers, references to cells or to cell ranges of numbers.

note

rBWwb‖This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.


MiUAf‖Example

D5DEG‖=PRODUCT(2;3;4) returns 24.

qZAGC‖

pET9x‖COMBINA

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

GSbiK‖Syntax

Gas8L‖COMBINA(Count1; Count2)

kGFDH‖Count1 is the number of items in the set.

GfeiC‖Count2 is the number of items to choose from the set.

ZkcAF‖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.

MCEcT‖COMBINA implements the formula: (Count1+Count2-1)! / (Count2!(Count1-1)!)

MiUAf‖Example

AGZXg‖=COMBINA(3;2) returns 6.

J4N88‖

pJSCA‖ROUNDUP

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

GSbiK‖Syntax

Gz3SM‖ROUNDUP(Number [; Count])

x59Ls‖Returns Number rounded up (away from zero) to Count decimal places. If Count is omitted or zero, the function rounds up to an integer. If Count is negative, the function rounds up to the next 10, 100, 1000, etc.

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

MiUAf‖Example

MH9hk‖=ROUNDUP(1.1111;2) returns 1.12.

AvvE7‖=ROUNDUP(1.2345;1) returns 1.3.

NmBt3‖=ROUNDUP(45.67;0) returns 46.

FpoDE‖=ROUNDUP(-45.67) returns -46.

Fp2Q4‖=ROUNDUP(987.65;-2) returns 1000.

63vMG‖

pyi7z‖ODD

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

GSbiK‖Syntax

nANfs‖ODD(Number)

a4qQR‖Returns Number rounded to the next odd integer up, away from zero.

MiUAf‖Example

U4k5f‖=ODD(1.2) returns 3.

Nzm8m‖=ODD(1) returns 1.

nGEC9‖=ODD(0) returns 1.

D2Yt2‖=ODD(-3.1) returns -5.

9AEfd‖

r5p4P‖QUOTIENT

FdxeA‖Returns the integer part of a division operation.

GSbiK‖Syntax

EzNfG‖QUOTIENT(Numerator; Denominator)

oeEvi‖Returns the integer part of Numerator divided by Denominator.

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

MiUAf‖Example

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

pzS6s‖

sD4zM‖ASINH

tdY7R‖Returns the inverse hyperbolic sine of a number.

GSbiK‖Syntax

eLZmC‖ASINH(Number)

eQBZg‖This function returns the inverse hyperbolic sine of Number, that is the number whose hyperbolic sine is Number.

MiUAf‖Example

gtA6e‖=ASINH(-90) returns approximately -5.1929877.

eyAmc‖=ASINH(SINH(4)) returns 4.

5rpfT‖

siTH6‖LCM_EXCEL2003

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

note

gGXZq‖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.


GSbiK‖Syntax

ZVaoq‖LCM_EXCEL2003(Number 1 [; Number 2 [; … [; Number 255]]])

FjFBG‖Number 1; Number 2; … ; Number 255 are numbers, references to cells or to cell ranges of numbers.

MiUAf‖Example

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

MAXoq‖

tJD2K‖COTH

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

GSbiK‖Syntax

o6noH‖COTH(Number)

Qqbk2‖Returns the hyperbolic cotangent of Number.

MiUAf‖Example

QrdqZ‖=COTH(1) returns the hyperbolic cotangent of 1, approximately 1.3130.

odp65‖

uFBEH‖RAND

AXnAh‖Returns a random number between 0 and 1.

4BGvn‖This function is always recalculated whenever a recalculation occurs.

GSbiK‖Syntax

frWts‖RAND()

hMfj3‖This function produces a new random number each time Calc recalculates. To force Calc to recalculate manually press F9.

HAWnR‖To generate random numbers which never recalculate, either:

MiUAf‖Example

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

JhRW7‖

vR7NL‖COMBIN

JdDPP‖Returns the number of combinations for elements without repetition.

GSbiK‖Syntax

8ZF6S‖COMBIN(Count1; Count2)

mEQbD‖Count1 is the number of items in the set.

tMK8t‖Count2 is the number of items to choose from the set.

UaEB6‖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.

uyeAg‖COMBIN implements the formula: Count1!/(Count2!*(Count1-Count2)!)

MiUAf‖Example

AEKgR‖=COMBIN(3;2) returns 3.

FwHdS‖

zX7QW‖ATAN

6PEyf‖Returns the inverse trigonometric tangent of a number.

GSbiK‖Syntax

PVCHB‖ATAN(Number)

AngFp‖This function returns the inverse trigonometric tangent of Number, that is the angle (in radians) whose tangent is Number. The angle returned is between -PI/2 and PI/2.

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

MiUAf‖Example

ykDum‖=ATAN(1) returns 0.785398163397448 (PI/4 radians).

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

hAAhW‖

zgSmG‖INT

2UZh7‖Rounds a number down to the nearest integer.

GSbiK‖Syntax

GbYyK‖INT(Number)

ymMQD‖Returns Number rounded down to the nearest integer.

q7hmv‖Negative numbers round down to the integer below.

MiUAf‖Example

SdXpJ‖=INT(5.7) returns 5.

sRKGB‖=INT(-1.3) returns -2.