Spreadsheet: Mathematical functions

ABS Absolute value

ABS(x) returns the absolute value of the number x.

ACOS Arccosine function

ACOS(x) returns the arccosine of x. The arccosine function is the inverse function of the cosine function and calculates the angle for a given cosine. X must be in the [-1..1] range. The result is a number in the range [0..180] (degrees).

ASIN Arcsine function

ASIN(x) returns the arcsine of x. The arcsine function is the inverse function of the sine function and calculates the angle for a given sine. X must be in the range [-1..1]. The result is a number in the range [-90..90] (degrees).

ATAN Arctangent function

ATAN(x) returns the arctangent of x. The arctangent function is the inverse function of the tangent function and calculates the angle for a given tangent. The result is a number in the range [-90..90] (degrees).

COS Cosine function

COS(x) returns the cosine of an angle x. The result range is [-1..1].

EXP Natural exponential function

EXP(x) returns the natural exponential of x: 2.71828x. EXP is the inverse function of the LN function.

FACT Factorial function

FACT(x) returns the factorial of x. The factorial of a number n is equal to 1*2*3*...*n.

FACT(5) equals 120 (=1*2*3*4*5)

INT Integer value function

INT(x) rounds the number x down to an integer.

LN Natural logarithm function

LN(x) returns the natural logarithm of the positive number x to the base e (e = 2.71828). The argument x must be greater than 0. LN is the inverse function of EXP.

LOG Logarithm function

LOG(x) returns the logarithm of the positive number x in the base 10. The argument x must be greater than 0.

MOD Modulo function

MOD(x,d) returns the remainder after x is divided by d. The result has the same sign as the divisor d.

PI Pi function

The function Pi() takes no argument and returns the value 3.14159265358979.

POWER Power function

POWER(n,p) returns n raised to the power p.

RAND Random number function (Uniform distribution)

RAND(x) returns a computer-generated random number (a) when x 1 the result is a number between 0 and 1, or (b) when x > 1 then the result is a number between 1 and x. The function will return a different value every time the spreadsheet is recalculated (see also Random number generation).

RANDNORM Random number function (Normal distribution)

The function RANDNORM(m,s) returns a random number from a Normal distribution with mean m and standard deviation s (see also Random number generation).

ROUND Round function

ROUND(x,n) rounds the number x to the number of digits n. If n is negative, then x is rounded to the left of the decimal point.

SIGN Sign value

SIGN(x) returns a number that indicates the sign x: -1 if x is negative; 0 if x equals 0; or 1 if x is positive.

SIN Sine function

SIN(x) returns the sine of the angle x. The result range is [-1..1].

SQRT Square root function

SQRT(x) returns the square root of the positive number x. SQRT(x) = x^(1/2). If the argument x of the function is negative, then the function returns an error (missing value).

TAN Tangent function

TAN(x) returns the tangent of the angle x.

TRUNC Truncate function

TRUNC(x) truncates the number x to an integer by removing the fractional part of the number x.

See also