Function Glossary
  • 23 Sep 2024
  • 10 Minutes to read
  • Dark
    Light

Function Glossary

  • Dark
    Light

Article summary

Overview

This document lists all of the available functions in Formulas.

Array

Function NameDescriptionFormula SyntaxExample
AGGREGATEPerforms a specified calculation (e.g., sum, product, average, etc.) for a list or database, with the option to ignore hidden rows and error valuesAGGREGATE(function_num, options, ref1, [ref2], ...)

 Formula: aggregate(makearray(1,2,3,4), 0, (acc, x) => acc + x))

 Result: 10

CountCounts the number of items in a collectionCount(collection)

 Formula: count(makearray(1, 2, 3))

 Result: 3

FindReturns the first item in a list of objects that meets the criteriaFind(array, condition)

 Formula: find(makearray(\"banana\", \"apple\", \"grape\"),  x => x == \"apple\")

Result: \"apple\"

findallSearches for all occurrences of a specified pattern in a string and returns them as an array.findall(string, pattern)

Formula: findall(makearray(\"banana\", \"apple\", \"apple\"),  x => x == \"apple\")

Result: [\"apple\", \"apple\"]

IndexOfReturns the index of the first occurrence of a substring within a string.INDEXOF(string, substring)

Formula: indexof(makearray(1,2,3) ,1)

Result: 0

JoinTakes two lists and returns a concatenated list.Join(array, array)

Formula: join(makearray(1,2),makearray(3,4))

Result: [1, 2, 3, 4]

makearrayCreates an array from a specified list of elements or a range.makearray(element1, element2, ..., elementN)

Formula: makearray(1,2,3)

Result: [1,2,3]

Conditional

Function NameDescriptionFormula SyntaxExample
IfReturns one value if a condition is true and another value if it is false.IF(condition, value_if_true, value_if_false)

Formula: if(true,1,2)

Result: 1

Conversion

Function NameDescriptionFormula SyntaxExample
todouble
Converts a given value to a double-precision floating-point number.
todouble(value)

Formula: todouble(\"2.5\")

Result: 2.5

toint
Converts a given value to an integer.
toint(value)

Formula: toint(\"2\")

Result: 2

Date

Function NameDescriptionFormula SyntaxExample
AddDays
Adds a specified number of days to a date.
AddDays(date, days)

Formula: adddays(now(), 5)

Result: 2024-08-19T00:00:00

DateAdd
Adds a specified number of intervals to a date.
DATEADD(date, interval, amount)
Formula: dateadd(now(), "d", 7)
Result: 2024-09-25 17:23:23.3441619
DateDiff
Returns the difference between two dates.
DATEDIFF(start_date, end_date, interval)
Formula: datediff("2024-08-01", "2024-08-14", "d")
DayReturns the day component of a date.
DAY(date)

Formula: day(now())

Result: current day of the month

MonthReturns the month component of a date.
MONTH(date)

Formula: month(now())

Result: current month

NowReturns the current date and time.
NOW()

Formula: now()

Result: current dateTime

TodayReturns the current date.
TODAY()

Formula: today()

Result: current date

YearReturns the year component of a date.
YEAR(date)

Formula: year(now())

Result: current year

Financial

Function NameDescriptionFormula SyntaxExample
AMORDEGRC
Calculates the depreciation for each accounting period based on a varying rate. The depreciation is higher at the beginning and decreases over time.
AMORDEGRC( cost, date_purchased, first_period, salvage, period, rate, [basis] )

Formula: amordegrc(10000, date1, date2, 1000, 1, 0.2, 0)

AMORLINC
Calculates the depreciation for each accounting period based on a constant rate. The depreciation amount is the same for each period.
AMORLINC( cost, date_purchased, first_period, salvage, period, rate, [basis] )

Formula: amorlinc(10000, now(), adddays(now(), 365), 1000, 1, 0.2, 0)

Result: 2000

CumIpmt
Calculates the cumulative interest paid between two periods of a loan based on constant payments and a constant interest rate.
CUMIPMT( rate, nper, pv, start_period, end_period, type )

Formula: cumipmt(0.05,12,1000,1,12,0)

Result: -353.90492

CumPrinc
Calculates the cumulative principal paid between two periods of a loan based on constant payments and a constant interest rate.
CUMPRINC( rate, nper, pv, start_period, end_period, type )

Formula: cumprinc(0.05,12,1000,1,12,0)

Result: -999.999999

DBCalculates the depreciation of an asset for a specified period using the double-declining balance method.
DB( cost, salvage, life, period, [month] )

Formula: db(1000, 100, 5, 1,12) 

Result: 369

DDBCalculates the depreciation of an asset for a specified period using the double-declining balance method, considering the factor.
DDB( cost, salvage, life, period, [factor] )

Formula: ddb(1000, 100, 5, 1, 12)

Result: 900

DurationCalculates the Macaulay duration of a bond.
DURATION(settlement, maturity, coupon, yield, frequency, basis

Formula: duration(now(), adddays(now(), 1825), 0.05, 0.04, 2, 0)

Result: 4.4961258667484545

FVCalculates the future value of an investment based on periodic payments and a constant interest rate.
FV(rate, nper, pmt, pv)

Formula: fv(0.05, 10, -200, 1000)

Result: 886.68

IPMTCalculates the interest portion of a loan payment for a given period.
IPMT(rate, period, nper, pv, fv)

Formula: ipmt(0.05, 1, 10, -1000, 0)

Result: 50

IRRCalculates the internal rate of return for a series of cash flows.
IRR([array])

Formula: irr(makearray(-1000, 300, 300, 300, 300))

Result: 0.0771384729520835

NPER
Calculates the number of payment periods for an investment based on periodic payments and a constant interest rate.
IRR([array])

Formula: irr(makearray(-1000, 300, 300, 300, 300))

Result: 0.0771384729520835

NPVCalculates the net present value of a series of cash flows.
NPV(rate, [array])

Formula: npv(0.1,1000, 500, 100)

Result: 1397.4455296769345

PMTCalculates the periodic payment amount for an investment based on constant payments and a constant interest rate.
PMT(rate, nper, pv, fv)

Formula: pmt(0.05, 10, -1000, 0)

Result: 129.50

PPMTCalculates the principal portion of a loan payment for a given period.
PPMT(rate, period, nper, pv, fv)

Formula: ppmt(0.08,10,10,200000,0)

Result: -27598.05

PVCalculates the present value of an investment based on future cash flows and a discount rate.
PV(rate, nper, pmt, fv)

Formula: pv(0.05, 10, -1000, 0)

 Result: 7721.73

RATECalculates the interest rate per period for an investment based on periodic payments, present value, and future value.
RATE(nper, pmt, pv, fv)

Formula: rate(4*12,-200,8000,1,0)

Result: 0.00769

SLNCalculates the straight-line depreciation of an asset for a single period.
SLN( cost, salvage, life )

Formula: sln(10000, 1000, 5)

Result: 1800

SYDCalculates the sum-of-the-years' digits depreciation of an asset for a specified period.
SYD(cost, salvage, life, per)

Formula: syd(30000, 7500, 10, 1)

Result: 4090.9090

VDBCalculates the depreciation of an asset for a specified period using the variable-declining balance method.
VDB( cost, salvage, life, start_period, end_period, [factor], [no_switch] )

Formula: vdb(2400, 300, 10, 0, 1, 2)

Result: 480

YieldCalculates the yield of a bond.
YIELD(settlement, maturity, rate, pr, redemption, frequency, basis)

Formula: vdb(2400, 300, 10, 0, 1, 2)

Result: 480

Hasing

Function NameDescriptionFormula SyntaxExample
hash_basis_points
Generates a hash for the given basis points value.
hash_basis_points(value)

Formula: hash_basis_points(1,2)

Result: -0.947

hash_str_basis_points
Generates a hash for the given string basis points value
hash_str_basis_points(value)

Formula: hash_str_basis_points(\"10\",\"20\")

Result: -0.3307

Logical

Function NameDescriptionFormula Syntax
Example
AndReturns true if all arguments are true, false otherwise.
AND(argument1, argument2, ...)

Formula: and(makearray(true, true, false))

Result: false

IfNullReturns one value if a specified value is null and another value if it is not null.
IFNULL(value, value_if_null)

Formula: ifnull(null, \"No Value\")

Result: No Value

IsNullReturns true if a specified value is null, false otherwise.
ISNULL(value)

Formula: isnull(null)

Result: true

NotReturns the negation of a logical value.
NOT(logical_value)

Formula: not(true)

Result: false

OrReturns true if any argument is true, false otherwise.
OR(argument1, argument2, ...)

Formula: or(makearray(true,false,true))

Result: true

Math

Function Name
Description
Formula Syntax
Example
ABSReturns the absolute value (i.e., the modulus) of a supplied number.
ABS(number)

Formula: abs(-5)

Result: 5

ACOSReturns the Arccosine of a number.
ACOS(number)

Formula: ACOS(-1)
Result: 3.14159265

ACOSHReturns the inverse hyperbolic cosine of a number.
ACOSH(number)

Formula: ACOSH(1) 

Result: 0

ACOTReturns the arccotangent of a number.
ACOT(number)

Formula: ACOT(1) 

Result: 0.78539816

ACOTHReturns the inverse hyperbolic cosine of a number.
ACOTH(number)

Formula: ACOTH(6)

Result: 0.16823612

ASINReturns the Arcsine of a number.
ASIN(number)

Formula: ASIN(1) 

Result: 1.57079633

ASINHReturns the Inverse Hyperbolic Sine of a number.
ASINH(number)

Formula: ASINH(0)

Result: 0

ATANReturns the Arctangent of a given number.
ATAN(number)

Formula: ATAN(1)

Result: 0.7853981633974483

ATANHReturns the Inverse Hyperbolic Tangent of a given number.
ATANH(number)

Formula: ATANH(0)

Result: 0

CBRTReturns the cube root of a number.
CBRT(number)

Formula: cbrt(8)

Result: 2

CeilingRounds a number up to the nearest integer.
Ceiling(number)

Formula: ceiling(3.2) 

Result: 4

ClampRestricts a value to be within a specified range.
Clamp(value, min, max)

Formula: clamp(5, 0, 10)

Result: 5

CoalesceReturns the first non-null value in a list of values.
Coalesce(value1, value2, ...)

Formula: coalesce(null, 5, 10) 

Result: 5

Coalesce_all
Returns the first non-null value in a list of values.
Coalesce_all(value1, value2, ...)

Formula: coalesce_all(null, 10, 20) 

Result: 10

CorrelThe CORREL function returns the correlation coefficient of two cell ranges. Use the correlation coefficient to determine the relationship between two properties. For example, you can examine the relationship between a location's average temperature and the use of air conditioners.
CORREL(array1, array2)

Formula: correl([1,2,3], [4,5,6])

Result: 1

COSReturns the Cosine of a given angle.
COS(angle)

Formula: cos(0) 

Result: 1

COSHReturns the hyperbolic cosine of a number.
COSH(number)

Formula: cosh(0)

Result: 1

COTReturns the cotangent of an angle.
COT(angle)

Formula: cot(1)

Result: 0.6420926159343308

COTHReturns the hyperbolic cotangent of an angle.
COTH(angle)

Formula: coth(1)

Result: 1.3130352854993312

CSCReturns the cosecant of an angle.
CSC(angle)

Formula: csc(1)

Result: 1.1883951057781212

CSCHReturns the hyperbolic cosecant of an angle.
CSCH(angle)

Formula: csch(1)

Result: 0.8509181282393216

DEGREES
Converts Radians to Degrees.
DEGREES(angle)

Formula: degrees(1)

Result: 57.29577951308232

EvenRounds a number away from zero (i.e., rounds a positive number up and a negative number down), to the next even number.
Even(number)

Formula: even(5.5) 

Result: 6

EXPReturns Euler's number raised to the power of a specified number.
EXP(number)

Formula: exp(1) 

Result: 2.718281828459045

Expm1Returns Euler's number raised to the power of a specified number minus one.
Expm1(number)

Formula: expm1(1) 

Result: 1.718281828459045

FloorRounds a number down to the nearest integer.
Floor(number)

Formula: floor(3.8)

Result: 3

GCDReturns the Greatest Common Divisor of two or more supplied numbers.
GCD(number1, number2, ...)

Formula: gcd(20, 30)

Result: 10

IsInfiniteChecks if a given number is infinite, returning true or false.
IsInfinite(number)

Formula: isinfinite(1)

Result: true


IsNanReturns true if the value is NaN (not a number), false otherwise.
IsNan(value)

Formula: isnan(5) 

Result: false

IsNegativeReturns true if the value is negative, false otherwise.
IsNegative(value)

Formula: isnegative(-5) 

Result: true

IsNormalReturns true if the value is a normal floating-point value, false otherwise.
IsNormal(value)

Formula: isnormal(1.5)

Result: true

IsPositiveReturns true if the value is positive, false otherwise.
IsPositive(value)

Formula: ispositive(5) 

Result: true

IsPow2Returns true if the value is a power of 2, false otherwise.
IsPow2(value)

Formula: ispow2(16)

Result: true

IsRealReturns true if the value is a real number, false otherwise.
IsReal(value)

Formula: isreal(5) 

Result: true

IsSubNormalReturns true if the value is a subnormal floating-point value, false otherwise.
IsSubNormal(value)

Formula: issubnormal(0.1)

Result: false

LCMReturns the Least Common Multiple of two or more supplied numbers.
LCM(number1, number2, ...)

Formula: lcm(20, 30)

Result: 60

LogReturns the natural logarithm of a number.
Log(number)

Formula: log(10) 

Result: 2.302585092994046

Log10Returns the base-10 logarithm of a number.
Log10(number)

Formula: log10(100) 

Result: 2

Log2Returns the base-2 logarithm of a number.
Log2(number)

Formula: log2(8) 

Result: 3

LogBReturns the logarithm of a number with respect to a specified base.
LogB(base, number)

Formula: logB(2, 8) 

Result: 3

LogisticReturns the logistic function value at a given input.
Logistic(x)

Formula: logistic(0) 

Result: 0.5

MaxReturns the maximum of two or more numbers.
Max(number1, number2, ...)

Formula: max(5, 3, 7) 

Result: 7

MeanCalculates the mean (average) of a set of values.
MEAN(value1, value2, ...)

Formula: mean(10, 20, 30, 40) 

Result: 25
MEDIANThe median is the middle value in a sorted list of numbers. If there is an odd number of observations, it's the middle value. If there is an even number, it is the average of the two middle values.

If n is odd: 

MEDIAN(x1, x2, ..., xn) = x((n + 1)/2)


If n is even: 

MEDIAN(x1, x2, ..., xn) = (x(n/2) + x((n/2) + 1)) / 2

Formula: median(10, 20, 30)

Result: 20

MinReturns the minimum of two or more numbers.
Min(number1, number2, ...)

Formula: min(5, 3, 7) 

Result: 3

MODReturns the remainder from a division between two supplied numbers
MOD(number, divisor)

Formula: mod(10, 3) 

Result: 1

ModeCalculates the mode (most frequent value) of a set of values
MODE(value1, value2, ...)

Formula: mode(1, 2, 3, 3) 

Result: 3

NegateReturns the negation of a number.
Negate(number)

Formula: negate(5) 

Result: -5

OddRounds a number away from zero (i.e., rounds a positive number up and a negative number down), to the next odd number.
Odd(number)

Formula: odd(5.5) 

Result: 5

powReturns the result of a given number raised to a supplied power.
POW(number, power)

Formula: pow(2, 3) 

Result: 8

PRODUCTThis function multiplies all the numbers in a range of cells.
PRODUCT(x1, x2, x3, ..., xn) = x1 * x2 * x3 * ... * xn

Formula: product(2, 3, 4, 5) 

Result: 120

QUOTIENTReturns the integer portion of a division between two supplied numbers.
QUOTIENT(numerator, denominator)

Formula: quotient(10, 3) 

Result: 3

RADIANS
Converts Degrees to Radians
RADIANS(angle)

Formula: radians(180) 

Result: 3.141592653589793

RandomGenerates a random number below the provided max number.
random(max)

Formula: random(20)

Result: 18

RoundRounds a number up or down, to a given number of digits.
Round(number, num_digits)

Formula: round(5.555, 2) 

Result: 5.56

RoundDec
Rounds a number to a specified number of decimal places.
rounddec(value,[places])

RoundDownRounds a number towards zero (i.e., rounds a positive number down and a negative number up), to a given number of digits.
RoundDown(number, num_digits)

Formula: rounddown(5.555, 2)

Result: 5.55

RoundUpRounds a number away from zero (i.e., rounds a positive number up and a negative number down), to a given number of digits.
RoundUp(number, num_digits)

Formula: roundup(5.555, 2) 

Result: 5.56


SECReturns the secant of an angle.
SEC(angle)

Formula: sec(1)  

Result: 1.8505157176809255

SECHReturns the hyperbolic secant of an angle.
SECH(angle)

Formula: sech(0) 

Result: 0

SIGNReturns the sign (+1, -1, or 0) of a supplied number
SIGN(number)

Formula: sign(-5) 

Result: -1

SINReturns the Sine of a given angle.
SIN(angle)

Formula: sin(1)

Result: 0.8414709848078965

SINHReturns the Hyperbolic Sine of a number.
SINH(number)

Formula: sinh(0) 

Result: 0

SlopeReturns the slope of the linear regression line through data points in known_y's and known_x's. The slope is the vertical distance divided by the horizontal distance between any two points on the line, which is the rate of change along the regression line.
SLOPE(List,List)

Formula: slope([1,3], [9,6])

Result: -1.5

SQRT
Returns the positive square root of a given number.
SQRT(number)

Formula: sqrt(16) 

Result: 4

SQRTPIReturns the square root of a supplied number multiplied by pi.
SQRTPI(number)

Formula: sqrtpi(4) 

Result: 3.5449077018110318

SumReturns the sum of a supplied list of numbers.
SUM(number1, number2, ...)

Formula: sum(1, 2, 3) 

Result: 6

SumIfAdds the cells in a supplied range that satisfy a given criteria.
SUMIF(range, criteria, [sum_range])

Formula: sumif(makearray(1, 2, 3), x => x > 2)

Result: 3

SUMPRODUCTThis function multiplies the corresponding components in the given arrays (or ranges) and returns the sum of those products.

SUMPRODUCT(array1, array2) = Σ(array1[i] * array2[i])


Where:

- Σ denotes the sum over all elements i

- array1[i] and array2[i] are corresponding elements in the arrays or ranges.


Formula: sumproduct(makearray(1, 3), makearray(9, 6))

Result: 27

TANReturns the Tangent of a given angle.
TAN(angle)

Formula: tan(1)

Result: 1.5574077246549023

TANHReturns the Hyperbolic Tangent of a given number.
TANH(number)

Formula: tanh(0) 

Result: 1

TruncTruncates a number towards zero (i.e., rounds a positive number down and a negative number up), to the next integer.
Trunc(number)

Formula: trunc(5.555) 

Result: 5

Statistical

Function Name

Description
Formula Syntax
Example
AVEDEV
Average Deviation: It measures the average of the absolute deviations of data points from their mean. It is calculated by summing the absolute differences between each data point and the mean, then dividing by the number of data points.

AVEDEV(x1, x2, ..., xn) = (Σ|xi - μ|) / n

Where:

- Σ denotes the sum from i = 1 to n

- |xi - μ| is the absolute deviation of each value from the mean

- μ is the mean of the dataset

- n is the number of values in the dataset

Formula: avedev(2,4) 

Result: 1

Percentile
Calculates the value at a specified percentile in a dataset.
PERCENTILE(data, percentile)

Formula: percentile([2,4], 0.5) 

Result: 3

QuartileCalculates the value at a specified quartile in a dataset.
QUARTILE(data, quartile)

Formula: quartile([2,4], 3) 

Result: 3.5

stdevpCalculates the standard deviation based on the entire population.
stdevp(array)

Formula: stdevp(2,4) 

Result: 1

stdevsCalculates the standard deviation based on a sample.
stdevs(array)

Formula: stdevs(2,4) 

Result: 1.4142135623730951

VariancepComputes the variance based on the entire population.
Variancep(array)

Formula: variancep(2,4) 

Result: 1

variancesComputes the variance based on a sample.
variances(array)

Formula: variances(2,4) 

Result: 2

String

Function Name

Description
Formula Syntax
Example
CONTCAT
Concatenates two or more strings.
CONCAT(string1, string2, ...)

Formula: concat("Hello", " ", "World") 

Result: Hello World

containsChecks if a specified substring exists within a string, returning true or false.
contains(string, substring, caseinsensitive)

Formula: contains("Hello", "H", true)

Result: true

indexofsubstring
Returns the index of the first occurrence of a specified substring within a string.
indexofsubstring(string, substring)

Formula: indexofsubstring(\"Hello\", \"D\")

Result: -1

Formula: indexofsubstring(\"Hello\", \"H\")

Result: 0

JoinStrings
Concatenates all elements of a collection into a single string, using a specified separator.
Join(collection, separator)

Formula: joinstrings(["Hello","World"], ".")

Result: "Hello.World"

LengthReturns the length of a string.
LENGTH(string)

Formula: length("Hello World")

Result: 11

LowerConverts a string to lowercase.
LOWER(string)

Formula: lower("HELLO")

Result: hello

ReplaceReplaces all occurrences of a substring within a string with another substring.
REPLACE(string, old_substring, new_substring)

Formula: replace(\"Hello World\", \"World\", \"Universe\")

Result: "Hello Universe"

SubstringReturns a substring from a string.
SUBSTRING(string, start_index, length)

Formula: substring("Hello World", 6, 5)

Result: "World"

TrimRemoves leading and trailing whitespace from a string.
TRIM(string)

Formula: trim(" Hello World ")

Result: "Hello World"

UpperConverts a string to uppercase.
UPPER(string)

Formula: upper("hello")

Result: "HELLO"


Was this article helpful?

What's Next