# Function Reference

This appendix provides a list of all the functions which are currently defined in Gnumeric.

## Bitwise Operations

BITAND

### `BITAND`

    BITAND(a,b)

#### Description

`BITAND` returns the bitwise and of the binary representations of its arguments.

`a`: non-negative integer

`b`: non-negative integer

#### See also

`BITOR`, `BITXOR`.

BITLSHIFT

### `BITLSHIFT`

    BITLSHIFT(a,n)

#### Description

`BITLSHIFT` returns the binary representations of `a` shifted `n` positions to the left.

`a`: non-negative integer

`n`: integer

#### Note

If `n` is negative, `BITLSHIFT` shifts the bits to the right by ABS(`n`) positions.

#### See also

`BITRSHIFT`.

BITOR

### `BITOR`

    BITOR(a,b)

#### Description

`BITOR` returns the bitwise or of the binary representations of its arguments.

`a`: non-negative integer

`b`: non-negative integer

#### See also

`BITXOR`, `BITAND`.

BITRSHIFT

### `BITRSHIFT`

    BITRSHIFT(a,n)

#### Description

`BITRSHIFT` returns the binary representations of `a` shifted `n` positions to the right.

`a`: non-negative integer

`n`: integer

#### Note

If `n` is negative, `BITRSHIFT` shifts the bits to the left by ABS(`n`) positions.

#### See also

`BITLSHIFT`.

BITXOR

### `BITXOR`

    BITXOR(a,b)

#### Description

`BITXOR` returns the bitwise exclusive or of the binary representations of its arguments.

`a`: non-negative integer

`b`: non-negative integer

#### See also

`BITOR`, `BITAND`.

## Complex

COMPLEX

### `COMPLEX`

    COMPLEX(x,y,i)

#### Description

.

`x`: real part

`y`: imaginary part

`i`: the suffix for the complex number, either "i" or "j"; defaults to "i".

#### Note

If `i` is neither "i" nor "j", `COMPLEX` returns #VALUE!

IMABS

### `IMABS`

    IMABS(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMAGINARY`, `IMREAL`.

IMAGINARY

### `IMAGINARY`

    IMAGINARY(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMREAL`.

IMARCCOS

### `IMARCCOS`

    IMARCCOS(z)

#### Description

`IMARCCOS` returns the complex arccosine of the complex number `z`. The branch cuts are on the real axis, less than -1 and greater than 1.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMARCSIN`, `IMARCTAN`.

IMARCCOSH

### `IMARCCOSH`

    IMARCCOSH(z)

#### Description

`IMARCCOSH` returns the complex hyperbolic arccosine of the complex number `z`. The branch cut is on the real axis, less than 1.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMARCSINH`, `IMARCTANH`.

IMARCCOT

### `IMARCCOT`

    IMARCCOT(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMARCSEC`, `IMARCCSC`.

IMARCCOTH

### `IMARCCOTH`

    IMARCCOTH(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMARCSECH`, `IMARCCSCH`.

IMARCCSC

### `IMARCCSC`

    IMARCCSC(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMARCSEC`, `IMARCCOT`.

IMARCCSCH

### `IMARCCSCH`

    IMARCCSCH(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMARCSECH`, `IMARCCOTH`.

IMARCSEC

### `IMARCSEC`

    IMARCSEC(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMARCCSC`, `IMARCCOT`.

IMARCSECH

### `IMARCSECH`

    IMARCSECH(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMARCCSCH`, `IMARCCOTH`.

IMARCSIN

### `IMARCSIN`

    IMARCSIN(z)

#### Description

`IMARCSIN` returns the complex arcsine of the complex number `z`. The branch cuts are on the real axis, less than -1 and greater than 1.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMARCCOS`, `IMARCTAN`.

IMARCSINH

### `IMARCSINH`

    IMARCSINH(z)

#### Description

`IMARCSINH` returns the complex hyperbolic arcsine of the complex number `z`. The branch cuts are on the imaginary axis, below -i and above i.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMARCCOSH`, `IMARCTANH`.

IMARCTAN

### `IMARCTAN`

    IMARCTAN(z)

#### Description

`IMARCTAN` returns the complex arctangent of the complex number `z`. The branch cuts are on the imaginary axis, below -i and above i.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMARCSIN`, `IMARCCOS`.

IMARCTANH

### `IMARCTANH`

    IMARCTANH(z)

#### Description

`IMARCTANH` returns the complex hyperbolic arctangent of the complex number `z`. The branch cuts are on the real axis, less than -1 and greater than 1.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMARCSINH`, `IMARCCOSH`.

IMARGUMENT

### `IMARGUMENT`

    IMARGUMENT(z)

#### Description

The argument theta of a complex number is its angle in radians from the real axis.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

IMCONJUGATE

### `IMCONJUGATE`

    IMCONJUGATE(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMAGINARY`, `IMREAL`.

IMCOS

### `IMCOS`

    IMCOS(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMSIN`, `IMTAN`.

IMCOSH

### `IMCOSH`

    IMCOSH(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMSINH`, `IMTANH`.

IMCOT

### `IMCOT`

    IMCOT(z)

#### Description

cotz = cosz/sinz.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMSEC`, `IMCSC`.

IMCOTH

### `IMCOTH`

    IMCOTH(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMSECH`, `IMCSCH`.

IMCSC

### `IMCSC`

    IMCSC(z)

#### Description

cscz = 1/sinz.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMSEC`, `IMCOT`.

IMCSCH

### `IMCSCH`

    IMCSCH(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMSECH`, `IMCOTH`.

IMDIV

### `IMDIV`

    IMDIV(z1,z2)

#### Description

.

`z1`: a complex number

`z2`: a complex number

#### Note

If `z1` or `z2` is not a valid complex number, #VALUE! is returned.

#### See also

`IMPRODUCT`.

IMEXP

### `IMEXP`

    IMEXP(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMLN`.

IMINV

### `IMINV`

    IMINV(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

IMLN

### `IMLN`

    IMLN(z)

#### Description

The result will have an imaginary part between -π and +π.

The natural logarithm is not uniquely defined on complex numbers. You may need to add or subtract an even multiple of π to the imaginary part.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMEXP`, `IMLOG2`, `IMLOG10`.

IMLOG10

### `IMLOG10`

    IMLOG10(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMLN`, `IMLOG2`.

IMLOG2

### `IMLOG2`

    IMLOG2(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMLN`, `IMLOG10`.

IMNEG

### `IMNEG`

    IMNEG(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

IMPOWER

### `IMPOWER`

    IMPOWER(z1,z2)

#### Description

.

`z1`: a complex number

`z2`: a complex number

#### Note

If `z1` or `z2` is not a valid complex number, #VALUE! is returned.

#### See also

`IMSQRT`.

IMPRODUCT

### `IMPRODUCT`

    IMPRODUCT(z1,z2)

#### Description

.

`z1`: a complex number

`z2`: a complex number

#### Note

If any of `z1`, `z2`,... is not a valid complex number, #VALUE! is returned.

#### See also

`IMDIV`.

IMREAL

### `IMREAL`

    IMREAL(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMAGINARY`.

IMSEC

### `IMSEC`

    IMSEC(z)

#### Description

secz = 1/cosz.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMCSC`, `IMCOT`.

IMSECH

### `IMSECH`

    IMSECH(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMCSCH`, `IMCOTH`.

IMSIN

### `IMSIN`

    IMSIN(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMCOS`, `IMTAN`.

IMSINH

### `IMSINH`

    IMSINH(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMCOSH`, `IMTANH`.

IMSQRT

### `IMSQRT`

    IMSQRT(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMPOWER`.

IMSUB

### `IMSUB`

    IMSUB(z1,z2)

#### Description

.

`z1`: a complex number

`z2`: a complex number

#### Note

If `z1` or `z2` is not a valid complex number, #VALUE! is returned.

#### See also

`IMSUM`.

IMSUM

### `IMSUM`

    IMSUM(z1,z2)

#### Description

.

`z1`: a complex number

`z2`: a complex number

#### Note

If any of `z1`, `z2`,... is not a valid complex number, #VALUE! is returned.

#### See also

`IMSUB`.

IMTAN

### `IMTAN`

    IMTAN(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMSIN`, `IMCOS`.

IMTANH

### `IMTANH`

    IMTANH(z)

#### Description

.

`z`: a complex number

#### Note

If `z` is not a valid complex number, #VALUE! is returned.

#### See also

`IMSINH`, `IMCOSH`.

## Database

DAVERAGE

### `DAVERAGE`

    DAVERAGE(database,field,criteria)

#### Description

`database` is a range in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

`database`: a range in which rows of related information are records and columns of data are fields

`field`: a string or integer specifying which field is to be used

`criteria`: a range containing conditions

#### Description

`field` is a string or integer specifying whichfield is to be used. If `field` is an integer nthen the nth column will be used. If `field` is a string, then the column with the matching label will be used.

#### Description

`criteria` is a range containing conditions. The first row of a `criteria` should contain labels. Each label specifies to which field the conditions given in that column apply. Each cell below the label specifies a condition such as ">3" or "<9". An equality condition can be given by simply specifying a value, e. g. "3" or "Jody". For a record to be considered it must satisfy all conditions in at least one of the rows of `criteria`.

#### See also

`DCOUNT`.

DCOUNT

### `DCOUNT`

    DCOUNT(database,field,criteria)

#### Description

`database` is a range in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

`database`: a range in which rows of related information are records and columns of data are fields

`field`: a string or integer specifying which field is to be used

`criteria`: a range containing conditions

#### Description

`field` is a string or integer specifying whichfield is to be used. If `field` is an integer nthen the nth column will be used. If `field` is a string, then the column with the matching label will be used.

#### Description

`criteria` is a range containing conditions. The first row of a `criteria` should contain labels. Each label specifies to which field the conditions given in that column apply. Each cell below the label specifies a condition such as ">3" or "<9". An equality condition can be given by simply specifying a value, e. g. "3" or "Jody". For a record to be considered it must satisfy all conditions in at least one of the rows of `criteria`.

#### See also

`DAVERAGE`, `DCOUNTA`.

DCOUNTA

### `DCOUNTA`

    DCOUNTA(database,field,criteria)

#### Description

`database` is a range in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

`database`: a range in which rows of related information are records and columns of data are fields

`field`: a string or integer specifying which field is to be used

`criteria`: a range containing conditions

#### Description

`field` is a string or integer specifying whichfield is to be used. If `field` is an integer nthen the nth column will be used. If `field` is a string, then the column with the matching label will be used.

#### Description

`criteria` is a range containing conditions. The first row of a `criteria` should contain labels. Each label specifies to which field the conditions given in that column apply. Each cell below the label specifies a condition such as ">3" or "<9". An equality condition can be given by simply specifying a value, e. g. "3" or "Jody". For a record to be considered it must satisfy all conditions in at least one of the rows of `criteria`.

#### See also

`DCOUNT`.

DGET

### `DGET`

    DGET(database,field,criteria)

#### Description

`database` is a range in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

`database`: a range in which rows of related information are records and columns of data are fields

`field`: a string or integer specifying which field is to be used

`criteria`: a range containing conditions

#### Description

`field` is a string or integer specifying whichfield is to be used. If `field` is an integer nthen the nth column will be used. If `field` is a string, then the column with the matching label will be used.

#### Description

`criteria` is a range containing conditions. The first row of a `criteria` should contain labels. Each label specifies to which field the conditions given in that column apply. Each cell below the label specifies a condition such as ">3" or "<9". An equality condition can be given by simply specifying a value, e. g. "3" or "Jody". For a record to be considered it must satisfy all conditions in at least one of the rows of `criteria`.

#### Note

If none of the records match the conditions, `DGET` returns #VALUE!

#### Note

If more than one record match the conditions, `DGET` returns #NUM!

#### See also

`DCOUNT`.

DMAX

### `DMAX`

    DMAX(database,field,criteria)

#### Description

`database` is a range in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

`database`: a range in which rows of related information are records and columns of data are fields

`field`: a string or integer specifying which field is to be used

`criteria`: a range containing conditions

#### Description

`field` is a string or integer specifying whichfield is to be used. If `field` is an integer nthen the nth column will be used. If `field` is a string, then the column with the matching label will be used.

#### Description

`criteria` is a range containing conditions. The first row of a `criteria` should contain labels. Each label specifies to which field the conditions given in that column apply. Each cell below the label specifies a condition such as ">3" or "<9". An equality condition can be given by simply specifying a value, e. g. "3" or "Jody". For a record to be considered it must satisfy all conditions in at least one of the rows of `criteria`.

#### See also

`DMIN`.

DMIN

### `DMIN`

    DMIN(database,field,criteria)

#### Description

`database` is a range in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

`database`: a range in which rows of related information are records and columns of data are fields

`field`: a string or integer specifying which field is to be used

`criteria`: a range containing conditions

#### Description

`field` is a string or integer specifying whichfield is to be used. If `field` is an integer nthen the nth column will be used. If `field` is a string, then the column with the matching label will be used.

#### Description

`criteria` is a range containing conditions. The first row of a `criteria` should contain labels. Each label specifies to which field the conditions given in that column apply. Each cell below the label specifies a condition such as ">3" or "<9". An equality condition can be given by simply specifying a value, e. g. "3" or "Jody". For a record to be considered it must satisfy all conditions in at least one of the rows of `criteria`.

#### See also

`DCOUNT`.

DPRODUCT

### `DPRODUCT`

    DPRODUCT(database,field,criteria)

#### Description

`database` is a range in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

`database`: a range in which rows of related information are records and columns of data are fields

`field`: a string or integer specifying which field is to be used

`criteria`: a range containing conditions

#### Description

`field` is a string or integer specifying whichfield is to be used. If `field` is an integer nthen the nth column will be used. If `field` is a string, then the column with the matching label will be used.

#### Description

`criteria` is a range containing conditions. The first row of a `criteria` should contain labels. Each label specifies to which field the conditions given in that column apply. Each cell below the label specifies a condition such as ">3" or "<9". An equality condition can be given by simply specifying a value, e. g. "3" or "Jody". For a record to be considered it must satisfy all conditions in at least one of the rows of `criteria`.

#### See also

`DSUM`.

DSTDEV

### `DSTDEV`

    DSTDEV(database,field,criteria)

#### Description

`database` is a range in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

`database`: a range in which rows of related information are records and columns of data are fields

`field`: a string or integer specifying which field is to be used

`criteria`: a range containing conditions

#### Description

`field` is a string or integer specifying whichfield is to be used. If `field` is an integer nthen the nth column will be used. If `field` is a string, then the column with the matching label will be used.

#### Description

`criteria` is a range containing conditions. The first row of a `criteria` should contain labels. Each label specifies to which field the conditions given in that column apply. Each cell below the label specifies a condition such as ">3" or "<9". An equality condition can be given by simply specifying a value, e. g. "3" or "Jody". For a record to be considered it must satisfy all conditions in at least one of the rows of `criteria`.

#### See also

`DSTDEVP`.

DSTDEVP

### `DSTDEVP`

    DSTDEVP(database,field,criteria)

#### Description

`database` is a range in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

`database`: a range in which rows of related information are records and columns of data are fields

`field`: a string or integer specifying which field is to be used

`criteria`: a range containing conditions

#### Description

`field` is a string or integer specifying whichfield is to be used. If `field` is an integer nthen the nth column will be used. If `field` is a string, then the column with the matching label will be used.

#### Description

`criteria` is a range containing conditions. The first row of a `criteria` should contain labels. Each label specifies to which field the conditions given in that column apply. Each cell below the label specifies a condition such as ">3" or "<9". An equality condition can be given by simply specifying a value, e. g. "3" or "Jody". For a record to be considered it must satisfy all conditions in at least one of the rows of `criteria`.

#### See also

`DSTDEV`.

DSUM

### `DSUM`

    DSUM(database,field,criteria)

#### Description

`database` is a range in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

`database`: a range in which rows of related information are records and columns of data are fields

`field`: a string or integer specifying which field is to be used

`criteria`: a range containing conditions

#### Description

`field` is a string or integer specifying whichfield is to be used. If `field` is an integer nthen the nth column will be used. If `field` is a string, then the column with the matching label will be used.

#### Description

`criteria` is a range containing conditions. The first row of a `criteria` should contain labels. Each label specifies to which field the conditions given in that column apply. Each cell below the label specifies a condition such as ">3" or "<9". An equality condition can be given by simply specifying a value, e. g. "3" or "Jody". For a record to be considered it must satisfy all conditions in at least one of the rows of `criteria`.

#### See also

`DPRODUCT`.

DVAR

### `DVAR`

    DVAR(database,field,criteria)

#### Description

`database` is a range in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

`database`: a range in which rows of related information are records and columns of data are fields

`field`: a string or integer specifying which field is to be used

`criteria`: a range containing conditions

#### Description

`field` is a string or integer specifying whichfield is to be used. If `field` is an integer nthen the nth column will be used. If `field` is a string, then the column with the matching label will be used.

#### Description

`criteria` is a range containing conditions. The first row of a `criteria` should contain labels. Each label specifies to which field the conditions given in that column apply. Each cell below the label specifies a condition such as ">3" or "<9". An equality condition can be given by simply specifying a value, e. g. "3" or "Jody". For a record to be considered it must satisfy all conditions in at least one of the rows of `criteria`.

#### See also

`DVARP`.

DVARP

### `DVARP`

    DVARP(database,field,criteria)

#### Description

`database` is a range in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

`database`: a range in which rows of related information are records and columns of data are fields

`field`: a string or integer specifying which field is to be used

`criteria`: a range containing conditions

#### Description

`field` is a string or integer specifying whichfield is to be used. If `field` is an integer nthen the nth column will be used. If `field` is a string, then the column with the matching label will be used.

#### Description

`criteria` is a range containing conditions. The first row of a `criteria` should contain labels. Each label specifies to which field the conditions given in that column apply. Each cell below the label specifies a condition such as ">3" or "<9". An equality condition can be given by simply specifying a value, e. g. "3" or "Jody". For a record to be considered it must satisfy all conditions in at least one of the rows of `criteria`.

#### See also

`DVAR`.

GETPIVOTDATA

### `GETPIVOTDATA`

    GETPIVOTDATA(pivot_table,field_name)

#### Description

.

`pivot_table`: cell range containing the pivot table

`field_name`: name of the field for which the summary data is requested

#### Note

If the summary data is unavailable, `GETPIVOTDATA` returns #REF!

## Date/Time

DATE

### `DATE`

    DATE(year,month,day)

#### Description

The `DATE` function creates date serial values. 1-Jan-1900 is serial value 1, 2-Jan-1900 is serial value 2, and so on. For compatibility reasons, a serial value is reserved for the non-existing date 29-Feb-1900.

`year`: year of date

`month`: month of year

`day`: day of month

#### Note

If `month` or `day` is less than 1 or too big, then the year and/or month will be adjusted.

#### Note

For spreadsheets created with the Mac version of Excel, serial 1 is 1-Jan-1904.

#### See also

`TODAY`, `YEAR`, `MONTH`, `DAY`.

DATE2UNIX

### `DATE2UNIX`

    DATE2UNIX(d)

#### Description

The `DATE2UNIX` function translates a date serial values into a Unix timestamp.

`d`: date serial value

#### See also

`UNIX2DATE`, `DATE`.

DATEDIF

### `DATEDIF`

    DATEDIF(start_date,end_date,interval)

#### Description

`DATEDIF` returns the distance from `start_date` to `end_date` according to the unit specified by `interval`.

`start_date`: starting date serial value

`end_date`: ending date serial value

`interval`: counting unit

#### Note

If `interval` is "y", "m", or "d" then the distance is measured in complete years, months, or days respectively.

#### Note

If `interval` is "ym" or "yd" then the distance is measured in complete months or days, respectively, but excluding any difference in years.

#### Note

If `interval` is "md" then the distance is measured in complete days but excluding any difference in months.

#### See also

`DAYS360`.

DATEVALUE

### `DATEVALUE`

    DATEVALUE(serial)

#### Description

`DATEVALUE` returns the date serial value part of a date and time serial value.

`serial`: date and time serial value

#### See also

`TIMEVALUE`, `DATE`.

DAY

### `DAY`

    DAY(date)

#### Description

The `DAY` function returns the day-of-month part of `date`.

`date`: date serial value

#### See also

`DATE`, `YEAR`, `MONTH`.

DAYS360

### `DAYS360`

    DAYS360(start_date,end_date,method)

#### Description

`DAYS360` returns the number of days from `start_date` to `end_date`.

`start_date`: starting date serial value

`end_date`: ending date serial value

`method`: counting method

#### Note

If `method` is 0, the default, the MS Excel (tm) US method will be used. This is a somewhat complicated industry standard method where the last day of February is considered to be the 30th day of the month, but only for `start_date`.

#### Note

If `method` is 1, the European method will be used. In this case, if the day of the month is 31 it will be considered as 30

#### Note

If `method` is 2, a saner version of the US method is used in which both dates get the same February treatment.

#### See also

`DATEDIF`.

EDATE

### `EDATE`

    EDATE(date,months)

#### Description

`EDATE` returns `date` moved forward or backward the number of months specified by `months`.

`date`: date serial value

`months`: signed number of months

#### See also

`DATE`.

EOMONTH

### `EOMONTH`

    EOMONTH(date,months)

#### Description

`EOMONTH` returns the date serial value of the end of the month specified by `date` adjusted forward or backward the number of months specified by `months`.

`date`: date serial value

`months`: signed number of months

#### See also

`EDATE`.

HOUR

### `HOUR`

    HOUR(time)

#### Description

The `HOUR` function computes the hour part of the fractional day given by `time`.

`time`: time of day as fractional day.

#### See also

`TIME`, `MINUTE`, `SECOND`.

ISOWEEKNUM

### `ISOWEEKNUM`

    ISOWEEKNUM(date)

#### Description

`ISOWEEKNUM` calculates the week number according to the ISE 8601 standard. Weeks start on Mondays and week 1 contains the first Thursday of the year.

`date`: date serial value

#### Note

January 1 of a year is sometimes in week 52 or 53 of the previous year. Similarly, December 31 is sometimes in week 1 of the following year.

#### See also

`ISOYEAR`, `WEEKNUM`.

ISOYEAR

### `ISOYEAR`

    ISOYEAR(date)

#### Description

`ISOYEAR` calculates the year to go with week number according to the ISE 8601 standard.

`date`: date serial value

#### Note

January 1 of a year is sometimes in week 52 or 53 of the previous year. Similarly, December 31 is sometimes in week 1 of the following year.

#### See also

`ISOWEEKNUM`, `YEAR`.

MINUTE

### `MINUTE`

    MINUTE(time)

#### Description

The `MINUTE` function computes the minute part of the fractional day given by `time`.

`time`: time of day as fractional day.

#### See also

`TIME`, `HOUR`, `SECOND`.

MONTH

### `MONTH`

    MONTH(date)

#### Description

The `MONTH` function returns the month part of `date`.

`date`: date serial value

#### See also

`DATE`, `YEAR`, `DAY`.

NETWORKDAYS

### `NETWORKDAYS`

    NETWORKDAYS(start_date,end_date,holidays)

#### Description

`NETWORKDAYS` calculates the number of days from `start_date` to `end_date` skipping weekends and `holidays` in the process.

`start_date`: starting date serial value

`end_date`: ending date serial value

`holidays`: array of holidays

#### See also

`WORKDAY`.

NOW

### `NOW`

    NOW()

#### Description

The `NOW` function returns the date and time serial value of the moment it is computed. Recomputing later will produce a different value.

#### See also

`DATE`.

SECOND

### `SECOND`

    SECOND(time)

#### Description

The `SECOND` function computes the seconds part of the fractional day given by `time`.

`time`: time of day as fractional day.

#### See also

`TIME`, `HOUR`, `MINUTE`.

TIME

### `TIME`

    TIME(hour,minute,second)

#### Description

The `TIME` function computes the fractional day between midnight at the time given by `hour`, `minute`, and `second`.

`hour`: hour of the day

`minute`: minute within the hour

`second`: second within the minute

#### See also

`HOUR`, `MINUTE`, `SECOND`.

TIMEVALUE

### `TIMEVALUE`

    TIMEVALUE(serial)

#### Description

`TIMEVALUE` returns the time-of-day part of a date and time serial value.

`serial`: date and time serial value

#### See also

`DATEVALUE`, `TIME`.

TODAY

### `TODAY`

    TODAY()

#### Description

The `TODAY` function returns the date serial value of the day it is computed. Recomputing on a later date will produce a different value.

#### See also

`DATE`.

UNIX2DATE

### `UNIX2DATE`

    UNIX2DATE(t)

#### Description

The UNIT2DATE function translates Unix timestamps into date serial values. Unix timestamps are number of seconds since Midnight 1-Jan-1900.

`t`: Unix time stamp

#### See also

`DATE2UNIX`, `DATE`.

WEEKDAY

### `WEEKDAY`

    WEEKDAY(date,method)

#### Description

The `WEEKDAY` function returns the day-of-week of `date`. The value of `method` determines how days are numbered.

`date`: date serial value

`method`: numbering system

#### Note

If `method` is 1, then Sunday is 1, Monday is 2, etc.

#### Note

If `method` is 2, then Monday is 1, Sunday is 2, etc.

#### Note

If `method` is 3, then Monday is 0, Sunday is 1, etc.

#### See also

`DATE`, `ISOWEEKNUM`.

WEEKNUM

### `WEEKNUM`

    WEEKNUM(date,method)

#### Description

`WEEKNUM` calculates the week number according to `method` which defaults to 1.

`date`: date serial value

`method`: numbering system

#### Note

If `method` is 1, then weeks start on Sundays and days before first Sunday are in week 0.

#### Note

If `method` is 2, then weeks start on Mondays and days before first Monday are in week 0.

#### Note

If `method` is 150, then the ISO 8601 numbering is used.

#### See also

`ISOWEEKNUM`.

WORKDAY

### `WORKDAY`

    WORKDAY(date,days,holidays)

#### Description

`WORKDAY` adjusts `date` by `days` skipping over weekends and `holidays` in the process.

`date`: date serial value

`days`: number of days to add

`holidays`: array of holidays

#### Note

`days` may be negative.

#### See also

`NETWORKDAYS`.

YEAR

### `YEAR`

    YEAR(date)

#### Description

The `YEAR` function returns the year part of `date`.

`date`: date serial value

#### See also

`DATE`, `MONTH`, `DAY`.

YEARFRAC

### `YEARFRAC`

    YEARFRAC(start_date,end_date,basis)

#### Description

`YEARFRAC` calculates the number of days from `start_date` to `end_date` according to the calendar specified by `basis`, which defaults to 0, and expresses the result as a fractional number of years.

`start_date`: starting date serial value

`end_date`: ending date serial value

`basis`: calendar basis

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`DATE`.

## Engineering

BASE

### `BASE`

    BASE(n,b,length)

#### Description

`BASE` converts `n` to its string representation in base `b`. Leading zeroes will be added to reach the minimum length given by `length`.

`n`: integer

`b`: base (2 ≤ `b` ≤ 36)

`length`: minimum length of the resutling string

#### See also

`DECIMAL`.

BESSELI

### `BESSELI`

    BESSELI(X,α)

#### Description

.

`X`: number

@{α}: order (any number)

#### Note

If `x` or @{α} are not numeric, #VALUE! is returned. If @{α} < 0, #NUM! is returned.

#### See also

`BESSELJ`, `BESSELK`, `BESSELY`.

BESSELJ

### `BESSELJ`

    BESSELJ(X,α)

#### Description

.

`X`: number

@{α}: order (any non-negative integer)

#### Note

If `x` or @{α} are not numeric, #VALUE! is returned. If @{α} < 0, #NUM! is returned. If @{α} is not an integer, it is truncated.

#### See also

`BESSELI`, `BESSELK`, `BESSELY`.

BESSELK

### `BESSELK`

    BESSELK(X,α)

#### Description

.

`X`: number

@{α}: order (any number)

#### Note

If `x` or @{α} are not numeric, #VALUE! is returned. If @{α} < 0, #NUM! is returned.

#### See also

`BESSELI`, `BESSELJ`, `BESSELY`.

BESSELY

### `BESSELY`

    BESSELY(X,α)

#### Description

.

`X`: number

@{α}: order (any non-negative integer)

#### Note

If `x` or @{α} are not numeric, #VALUE! is returned. If @{α} < 0, #NUM! is returned. If @{α} is not an integer, it is truncated.

#### See also

`BESSELI`, `BESSELJ`, `BESSELK`.

BIN2DEC

### `BIN2DEC`

#### See also

`DEC2BIN`, `BIN2OCT`, `BIN2HEX`.

BIN2HEX

### `BIN2HEX`

    BIN2HEX(x,places)

#### Description

If `places` is given, `BIN2HEX` pads the result with zeros to achieve exactly `places` digits. If this is not possible, `BIN2HEX` returns #NUM!

`x`: a binary number, either as a string or as a number involving only the digits 0 and 1

`places`: number of digits

#### See also

`HEX2BIN`, `BIN2OCT`, `BIN2DEC`.

BIN2OCT

### `BIN2OCT`

    BIN2OCT(x,places)

#### Description

If `places` is given, `BIN2OCT` pads the result with zeros to achieve exactly `places` digits. If this is not possible, `BIN2OCT` returns #NUM!

`x`: a binary number, either as a string or as a number involving only the digits 0 and 1

`places`: number of digits

#### See also

`OCT2BIN`, `BIN2DEC`, `BIN2HEX`.

CONVERT

### `CONVERT`

    CONVERT(x,from,to)

#### Description

`CONVERT` returns a conversion from one measurement system to another. `x` is a value in `from` units that is to be converted into `to` units.

`x`: number

`from`: unit (string)

`to`: unit (string)

#### Note

If `from` and `to` are different types, `CONVERT` returns #N/A!

#### Description

`from` and `to` can be any of the following:

Weight and mass:

'g' Gram

'sg' Slug

'lbm' Pound

'u' U (atomic mass)

'ozm' Ounce

Distance:

'm' Meter

'mi' Statute mile

'Nmi' Nautical mile

'in' Inch

'ft' Foot

'yd' Yard

'ang' Angstrom

'Pica' Pica

Time:

'yr' Year

'day' Day

'hr' Hour

'mn' Minute

'sec' Second

Pressure:

'Pa' Pascal

'atm' Atmosphere

'mmHg' mm of Mercury

Force:

'N' Newton

'dyn' Dyne

'lbf' Pound force

Energy:

'J' Joule

'e' Erg

'c' Thermodynamic calorie

'cal' IT calorie

'eV' Electron volt

'HPh' Horsepower-hour

'Wh' Watt-hour

'flb' Foot-pound

'BTU' BTU

Power:

'HP' Horsepower

'W' Watt

Magnetism:

'T' Tesla

'ga' Gauss

Temperature:

'C' Degree Celsius

'F' Degree Fahrenheit

'K' Degree Kelvin

Liquid measure:

'tsp' Teaspoon

'tbs' Tablespoon

'oz' Fluid ounce

'cup' Cup

'pt' Pint

'qt' Quart

'gal' Gallon

'l' Liter

For metric units any of the following prefixes can be used:

'Y' yotta 1E+24

'Z' zetta 1E+21

'E' exa 1E+18

'P' peta 1E+15

'T' tera 1E+12

'G' giga 1E+09

'M' mega 1E+06

'k' kilo 1E+03

'h' hecto 1E+02

'e' deca (deka) 1E+01

'd' deci 1E-01

'c' centi 1E-02

'm' milli 1E-03

'u' micro 1E-06

'n' nano 1E-09

'p' pico 1E-12

'f' femto 1E-15

'a' atto 1E-18

'z' zepto 1E-21

'y' yocto 1E-24

DEC2BIN

### `DEC2BIN`

    DEC2BIN(x,places)

#### Description

If `places` is given, `DEC2BIN` pads the result with zeros to achieve exactly `places` digits. If this is not possible, `DEC2BIN` returns #NUM!

`x`: integer

`places`: number of digits

#### See also

`BIN2DEC`, `DEC2OCT`, `DEC2HEX`.

DEC2HEX

### `DEC2HEX`

    DEC2HEX(x,places)

#### Description

If `places` is given, `DEC2HEX` pads the result with zeros to achieve exactly `places` digits. If this is not possible, `DEC2HEX` returns #NUM!

`x`: integer

`places`: number of digits

#### See also

`HEX2DEC`, `DEC2BIN`, `DEC2OCT`.

DEC2OCT

### `DEC2OCT`

    DEC2OCT(x,places)

#### Description

If `places` is given, `DEC2OCT` pads the result with zeros to achieve exactly `places` digits. If this is not possible, `DEC2OCT` returns #NUM!

`x`: integer

`places`: number of digits

#### See also

`OCT2DEC`, `DEC2BIN`, `DEC2HEX`.

DECIMAL

### `DECIMAL`

#### See also

`BASE`.

DELTA

### `DELTA`

    DELTA(x0,x1)

#### Description

`DELTA` returns 1 if `x1` = `x0` and 0 otherwise.

`x0`: number

`x1`: number, defaults to 0

#### Note

If either argument is non-numeric, #VALUE! is returned.

#### See also

`EXACT`, `GESTEP`.

ERF

### `ERF`

    ERF(lower,upper)

#### Description

`ERF` returns 2/sqrt(π)* integral from `lower` to `upper` of exp(-t*t) dt

`lower`: lower limit of the integral, defaults to 0

`upper`: upper limit of the integral

#### See also

`ERFC`.

ERFC

### `ERFC`

    ERFC(x)

#### Description

`ERFC` returns 2/sqrt(π)* integral from `x` to ∞ of exp(-t*t) dt

`x`: number

#### See also

`ERF`.

GESTEP

### `GESTEP`

    GESTEP(x0,x1)

#### Description

`GESTEP` returns 1 if `x1` ≤ `x0` and 0 otherwise.

`x0`: number

`x1`: number, defaults to 0

#### Note

If either argument is non-numeric, #VALUE! is returned.

#### See also

`DELTA`.

HEX2BIN

### `HEX2BIN`

    HEX2BIN(x,places)

#### Description

If `places` is given, `HEX2BIN` pads the result with zeros to achieve exactly `places` digits. If this is not possible, `HEX2BIN` returns #NUM!

`x`: a hexadecimal number, either as a string or as a number if no A to F are needed

`places`: number of digits

#### See also

`BIN2HEX`, `HEX2OCT`, `HEX2DEC`.

HEX2DEC

### `HEX2DEC`

#### See also

`DEC2HEX`, `HEX2BIN`, `HEX2OCT`.

HEX2OCT

### `HEX2OCT`

    HEX2OCT(x,places)

#### Description

If `places` is given, `HEX2OCT` pads the result with zeros to achieve exactly `places` digits. If this is not possible, `HEX2OCT` returns #NUM!

`x`: a hexadecimal number, either as a string or as a number if no A to F are needed

`places`: number of digits

#### See also

`OCT2HEX`, `HEX2BIN`, `HEX2DEC`.

INVSUMINV

### `INVSUMINV`

    INVSUMINV(x0,x1)

#### Description

.

`x0`: non-negative number

`x1`: non-negative number

#### Note

If any of the arguments is negative, #VALUE! is returned.

If any argument is zero, the result is zero.

#### Description

`INVSUMINV` sum calculates the reciprocal (the inverse) of the sum of reciprovals (inverses) of all its arguments.

#### See also

`HARMEAN`.

OCT2BIN

### `OCT2BIN`

    OCT2BIN(x,places)

#### Description

If `places` is given, `OCT2BIN` pads the result with zeros to achieve exactly `places` digits. If this is not possible, `OCT2BIN` returns #NUM!

`x`: a octal number, either as a string or as a number

`places`: number of digits

#### See also

`BIN2OCT`, `OCT2DEC`, `OCT2HEX`.

OCT2DEC

### `OCT2DEC`

#### See also

`DEC2OCT`, `OCT2BIN`, `OCT2HEX`.

OCT2HEX

### `OCT2HEX`

    OCT2HEX(x,places)

#### Description

If `places` is given, `OCT2HEX` pads the result with zeros to achieve exactly `places` digits. If this is not possible, `OCT2HEX` returns #NUM!

`x`: a octal number, either as a string or as a number

`places`: number of digits

#### See also

`HEX2OCT`, `OCT2BIN`, `OCT2DEC`.

## Erlang

DIMCIRC

### `DIMCIRC`

    DIMCIRC(traffic,gos)

#### Description

`DIMCIRC` returns the number of circuits required given `traffic` calls with grade of service `gos`.

`traffic`: number of calls

`gos`: grade of service

#### See also

`OFFCAP`, `OFFTRAF`, `PROBBLOCK`.

OFFCAP

### `OFFCAP`

    OFFCAP(circuits,gos)

#### Description

`OFFCAP` returns the traffic capacity given `circuits` circuits with grade of service `gos`.

`circuits`: number of circuits

`gos`: grade of service

#### See also

`DIMCIRC`, `OFFTRAF`, `PROBBLOCK`.

OFFTRAF

### `OFFTRAF`

    OFFTRAF(traffic,circuits)

#### Description

`OFFTRAF` returns the predicted number of offered calls given `traffic` carried calls (taken from measurements) on `circuits` circuits.

`traffic`: number of carried calls

`circuits`: number of circuits

#### Note

`traffic` cannot exceed `circuits`.

#### See also

`PROBBLOCK`, `DIMCIRC`, `OFFCAP`.

PROBBLOCK

### `PROBBLOCK`

    PROBBLOCK(traffic,circuits)

#### Description

`PROBBLOCK` returns probability of blocking when `traffic` calls load into `ccicuits` circuits.

`traffic`: number of calls

`circuits`: number of circuits

#### Note

`traffic` cannot exceed `circuits`.

#### See also

`OFFTRAF`, `DIMCIRC`, `OFFCAP`.

## Finance

ACCRINT

### `ACCRINT`

    ACCRINT(issue,first_interest,settlement,rate,par,frequency,basis)

#### Description

`ACCRINT` calculates the accrued interest for a security that pays periodic interest.

`issue`: date of issue

`first_interest`: date of first interest payment

`settlement`: settlement date

`rate`: nominal annual interest rate

`par`: par value

`frequency`: number of interest payments per year

`basis`: calendar basis

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`ACCRINTM`.

ACCRINTM

### `ACCRINTM`

    ACCRINTM(issue,maturity,rate,par,basis)

#### Description

ACCRINT calculates the accrued interest from `issue` to `maturity`.

`issue`: date of issue

`maturity`: maturity date

`rate`: nominal annual interest rate

`par`: par value

`basis`: calendar basis

#### Note

`par` defaults to $1000.

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`ACCRINT`.

AMORDEGRC

### `AMORDEGRC`

    AMORDEGRC(cost,purchase_date,first_period,salvage,period,rate,basis)

#### Description

`AMORDEGRC` calculates the depreciation of an asset using French accounting conventions. Assets purchased in the middle of a period take prorated depreciation into account. This is similar to AMORLINC, except that a depreciation coefficient is applied in the calculation depending on the life of the assets.

`cost`: initial cost of asset

`purchase_date`: date of purchase

`first_period`: end of first period

`salvage`: value after depreciation

`period`: subject period

`rate`: depreciation rate

`basis`: calendar basis

#### Note

Named for AMORtissement DEGRessif Comptabilite.

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`AMORLINC`.

AMORLINC

### `AMORLINC`

    AMORLINC(cost,purchase_date,first_period,salvage,period,rate,basis)

#### Description

`AMORLINC` calculates the depreciation of an asset using French accounting conventions. Assets purchased in the middle of a period take prorated depreciation into account.

`cost`: initial cost of asset

`purchase_date`: date of purchase

`first_period`: end of first period

`salvage`: value after depreciation

`period`: subject period

`rate`: depreciation rate

`basis`: calendar basis

#### Note

Named for AMORtissement LINeaire Comptabilite.

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`AMORDEGRC`.

COUPDAYBS

### `COUPDAYBS`

    COUPDAYBS(settlement,maturity,frequency,basis,eom)

#### Description

`COUPDAYBS` calculates the number of days from the beginning of the coupon period to the settlement date.

`settlement`: settlement date

`maturity`: maturity date

`frequency`: number of interest payments per year

`basis`: calendar basis

`eom`: end-of-month flag

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`COUPDAYS`.

COUPDAYS

### `COUPDAYS`

    COUPDAYS(settlement,maturity,frequency,basis,eom)

#### Description

`COUPDAYS` calculates the number of days in the coupon period of the settlement date.

`settlement`: settlement date

`maturity`: maturity date

`frequency`: number of interest payments per year

`basis`: calendar basis

`eom`: end-of-month flag

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`COUPDAYBS`, `COUPDAYSNC`.

COUPDAYSNC

### `COUPDAYSNC`

    COUPDAYSNC(settlement,maturity,frequency,basis,eom)

#### Description

`COUPDAYSNC` calculates number of days from the settlement date to the next coupon period.

`settlement`: settlement date

`maturity`: maturity date

`frequency`: number of interest payments per year

`basis`: calendar basis

`eom`: end-of-month flag

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`COUPDAYS`, `COUPDAYBS`.

COUPNCD

### `COUPNCD`

    COUPNCD(settlement,maturity,frequency,basis,eom)

#### Description

`COUPNCD` calculates the coupon date following settlement.

`settlement`: settlement date

`maturity`: maturity date

`frequency`: number of interest payments per year

`basis`: calendar basis

`eom`: end-of-month flag

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`COUPPCD`, `COUPDAYS`, `COUPDAYBS`.

COUPNUM

### `COUPNUM`

    COUPNUM(settlement,maturity,frequency,basis,eom)

#### Description

`COUPNUM` calculates the number of coupons to be paid between the settlement and maturity dates, rounded up.

`settlement`: settlement date

`maturity`: maturity date

`frequency`: number of interest payments per year

`basis`: calendar basis

`eom`: end-of-month flag

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`COUPNCD`, `COUPPCD`.

COUPPCD

### `COUPPCD`

    COUPPCD(settlement,maturity,frequency,basis,eom)

#### Description

`COUPPCD` calculates the coupon date preceeding settlement.

`settlement`: settlement date

`maturity`: maturity date

`frequency`: number of interest payments per year

`basis`: calendar basis

`eom`: end-of-month flag

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`COUPNCD`, `COUPDAYS`, `COUPDAYBS`.

CUM_BIV_NORM_DIST

### `CUM_BIV_NORM_DIST`

    CUM_BIV_NORM_DIST(a,b,rho)

#### Description

`CUM_BIV_NORM_DIST` calculates the probability that two standard normal distributed random variables with correlation `rho` are respectively each less than `a` and `b`.

`a`: limit for first random variable

`b`: limit for second random variable

`rho`: correlation of the two random variables

CUMIPMT

### `CUMIPMT`

    CUMIPMT(rate,nper,pv,start_period,end_period,type)

#### Description

`CUMIPMT` calculates the cumulative interest paid on a loan from `start_period` to `end_period`.

`rate`: effective annual interest rate

`nper`: number of periods

`pv`: present value

`start_period`: first period to accumulate for

`end_period`: last period to accumulate for

`type`: payment type

#### Note

If `type` is 0, the default, payment is at the end of each period. If `type` is 1, payment is at the beginning of each period.

#### See also

`IPMT`.

CUMPRINC

### `CUMPRINC`

    CUMPRINC(rate,nper,pv,start_period,end_period,type)

#### Description

`CUMPRINC` calculates the cumulative principal paid on a loan from `start_period` to `end_period`.

`rate`: effective annual interest rate

`nper`: number of periods

`pv`: present value

`start_period`: first period to accumulate for

`end_period`: last period to accumulate for

`type`: payment type

#### Note

If `type` is 0, the default, payment is at the end of each period. If `type` is 1, payment is at the beginning of each period.

#### See also

`PPMT`.

DB

### `DB`

    DB(cost,salvage,life,period,month)

#### Description

`DB` calculates the depreciation of an asset for a given period using the fixed-declining balance method.

`cost`: initial cost of asset

`salvage`: value after depreciation

`life`: number of periods

`period`: subject period

`month`: number of months in first year of depreciation

#### See also

`DDB`, `SLN`, `SYD`.

DDB

### `DDB`

    DDB(cost,salvage,life,period,factor)

#### Description

`DDB` calculates the depreciation of an asset for a given period using the double-declining balance method.

`cost`: initial cost of asset

`salvage`: value after depreciation

`life`: number of periods

`period`: subject period

`factor`: factor at which the balance declines

#### See also

`DB`, `SLN`, `SYD`.

DISC

### `DISC`

    DISC(settlement,maturity,par,redemption,basis)

#### Description

`DISC` calculates the discount rate for a security.

`settlement`: settlement date

`maturity`: maturity date

`par`: price per $100 face value

`redemption`: amount received at maturity

`basis`: calendar basis

#### Note

`redemption` is the redemption value per $100 face value.

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`PRICEMAT`.

DOLLARDE

### `DOLLARDE`

    DOLLARDE(fractional_dollar,fraction)

#### Description

`DOLLARDE` converts a fractional dollar amount into a decimal amount. This is the inverse of the DOLLARFR function.

`fractional_dollar`: amount to convert

`fraction`: denominator

#### See also

`DOLLARFR`.

DOLLARFR

### `DOLLARFR`

    DOLLARFR(decimal_dollar,fraction)

#### Description

`DOLLARFR` converts a fractional dollar amount into a fraction which is represented as the digits after the decimal point. For example, 2/8 would be represented as .2 while 3/16 would be represented as .03.

`decimal_dollar`: amount to convert

`fraction`: denominator

#### See also

`DOLLARDE`.

DURATION

### `DURATION`

    DURATION(settlement,maturity,coupon,yield,frequency,basis)

#### Description

`DURATION` calculates the duration of a security.

`settlement`: settlement date

`maturity`: maturity date

`coupon`: annual coupon rate

`yield`: annual yield of security

`frequency`: number of interest payments per year

`basis`: calendar basis

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`MDURATION`.

EFFECT

### `EFFECT`

    EFFECT(rate,nper)

#### Description

`EFFECT` calculates the effective interest rate using the formula (1+`rate`/`nper`)^`nper`-1.

`rate`: nominal annual interest rate

`nper`: number of periods used for compounding

#### See also

`NOMINAL`.

EURO

### `EURO`

    EURO(currency)

#### Description

`EURO` calculates the national currency amount corresponding to 1 EUR for any of the national currencies that were replaced by the Euro on its introduction.

`currency`: three-letter currency code

#### Note

`currency` must be one of ATS (Austria), BEF (Belgium), DEM (Germany), ESP (Spain), EUR (Euro), FIM (Finland), FRF (France), GRD (Greece), IEP (Ireland), ITL (Italy), LUF (Luxembourg), NLG (The Netherlands), or PTE (Portugal).

#### Note

This function is not likely to be useful anymore.

#### See also

`EUROCONVERT`.

EUROCONVERT

### `EUROCONVERT`

    EUROCONVERT(n,source,target)

#### Description

`EUROCONVERT` converts `n` units of currency `source` to currency `target`. The rates used are the official ones used on the introduction of the Euro.

`n`: amount

`source`: three-letter source currency code

`target`: three-letter target currency code

#### Note

`source` and `target` must be one of the currencies listed for the EURO function.

#### Note

This function is not likely to be useful anymore.

#### See also

`EURO`.

FV

### `FV`

    FV(rate,nper,pmt,pv,type)

#### Description

`FV` calculates the future value of `pv` moved `nper` periods into the future, assuming a periodic payment of `pmt` and an interest rate of `rate` per period.

`rate`: effective interest rate per period

`nper`: number of periods

`pmt`: payment at each period

`pv`: present value

`type`: payment type

#### Note

If `type` is 0, the default, payment is at the end of each period. If `type` is 1, payment is at the beginning of each period.

#### See also

`PV`.

FVSCHEDULE

### `FVSCHEDULE`

    FVSCHEDULE(principal,schedule)

#### Description

`FVSCHEDULE` calculates the future value of `principal` after applying a range of interest rates with compounding.

`principal`: intial value

`schedule`: range of interest rates

#### See also

`FV`.

G_DURATION

### `G_DURATION`

    G_DURATION(rate,pv,fv)

#### Description

`G_DURATION` calculates the number of periods needed for an investment to attain a desired value.

`rate`: effective annual interest rate

`pv`: present value

`fv`: future value

#### See also

`FV`, `PV`.

INTRATE

### `INTRATE`

    INTRATE(settlement,maturity,investment,redemption,basis)

#### Description

`INTRATE` calculates the interest of a fully vested security.

`settlement`: settlement date

`maturity`: maturity date

`investment`: amount paid on settlement

`redemption`: amount received at maturity

`basis`: calendar basis

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`RECEIVED`.

IPMT

### `IPMT`

    IPMT(rate,per,nper,pv,fv,type)

#### Description

`IPMT` calculates the interest part of an annuity's payment for period number `per`.

`rate`: effective annual interest rate

`per`: period number

`nper`: number of periods

`pv`: present value

`fv`: future value

`type`: payment type

#### Note

If `type` is 0, the default, payment is at the end of each period. If `type` is 1, payment is at the beginning of each period.

#### See also

`PPMT`.

IRR

### `IRR`

    IRR(values,guess)

#### Description

`IRR` calculates the internal rate of return of a cash flow with periodic payments. `values` lists the payments (negative values) and receipts (positive values) for each period.

`values`: cash flow

`guess`: an estimate of what the result should be

#### Note

The optional `guess` is needed because there can be more than one valid result. It defaults to 10%.

#### See also

`XIRR`.

ISPMT

### `ISPMT`

    ISPMT(rate,per,nper,pv)

#### Description

`ISPMT` calculates the interest payment for period number `per`.

`rate`: effective annual interest rate

`per`: period number

`nper`: number of periods

`pv`: present value

#### See also

`PV`.

MDURATION

### `MDURATION`

    MDURATION(settlement,maturity,coupon,yield,frequency,basis)

#### Description

`MDURATION` calculates the Macauley duration of a security.

`settlement`: settlement date

`maturity`: maturity date

`coupon`: annual coupon rate

`yield`: annual yield of security

`frequency`: number of interest payments per year

`basis`: calendar basis

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`DURATION`.

MIRR

### `MIRR`

    MIRR(values,finance_rate,reinvest_rate)

#### Description

`MIRR` calculates the modified internal rate of return of a periodic cash flow.

`values`: cash flow

`finance_rate`: interest rate for financing cost

`reinvest_rate`: interest rate for reinvestments

#### See also

`IRR`, `XIRR`.

NOMINAL

### `NOMINAL`

    NOMINAL(rate,nper)

#### Description

`NOMINAL` calculates the nominal interest rate from the effective rate.

`rate`: effective annual interest rate

`nper`: number of periods used for compounding

#### See also

`EFFECT`.

NPER

### `NPER`

    NPER(rate,pmt,pv,fv,type)

#### Description

`NPER` calculates the number of periods of an investment based on periodic constant payments and a constant interest rate.

`rate`: effective annual interest rate

`pmt`: payment at each period

`pv`: present value

`fv`: future value

`type`: payment type

#### Note

If `type` is 0, the default, payment is at the end of each period. If `type` is 1, payment is at the beginning of each period.

#### See also

`PV`, `FV`.

NPV

### `NPV`

    NPV(rate,value1,value2)

#### Description

`NPV` calculates the net present value of a cash flow.

`rate`: effective interest rate per period

`value1`: cash flow for period 1

`value2`: cash flow for period 2

#### Note

If `type` is 0, the default, payment is at the end of each period. If `type` is 1, payment is at the beginning of each period.

#### See also

`PV`.

ODDFPRICE

### `ODDFPRICE`

    ODDFPRICE(settlement,maturity,issue,first_interest,rate,yield,redemption,frequency,basis)

#### Description

`ODDFPRICE` calculates the price per $100 face value of a security that pays periodic interest, but has an odd first period.

`settlement`: settlement date

`maturity`: maturity date

`issue`: date of issue

`first_interest`: first interest date

`rate`: nominal annual interest rate

`yield`: annual yield of security

`redemption`: amount received at maturity

`frequency`: number of interest payments per year

`basis`: calendar basis

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`ODDLPRICE`, `ODDFYIELD`.

ODDFYIELD

### `ODDFYIELD`

    ODDFYIELD(settlement,maturity,issue,first_interest,rate,price,redemption,frequency,basis)

#### Description

`ODDFYIELD` calculates the yield of a security that pays periodic interest, but has an odd first period.

`settlement`: settlement date

`maturity`: maturity date

`issue`: date of issue

`first_interest`: first interest date

`rate`: nominal annual interest rate

`price`: price of security

`redemption`: amount received at maturity

`frequency`: number of interest payments per year

`basis`: calendar basis

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`ODDFPRICE`, `ODDLYIELD`.

ODDLPRICE

### `ODDLPRICE`

    ODDLPRICE(settlement,maturity,last_interest,rate,yield,redemption,frequency,basis)

#### Description

`ODDLPRICE` calculates the price per $100 face value of a security that pays periodic interest, but has an odd last period.

`settlement`: settlement date

`maturity`: maturity date

`last_interest`: last interest date

`rate`: nominal annual interest rate

`yield`: annual yield of security

`redemption`: amount received at maturity

`frequency`: number of interest payments per year

`basis`: calendar basis

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`YIELD`, `DURATION`.

ODDLYIELD

### `ODDLYIELD`

    ODDLYIELD(settlement,maturity,last_interest,rate,price,redemption,frequency,basis)

#### Description

`ODDLYIELD` calculates the yield of a security that pays periodic interest, but has an odd last period.

`settlement`: settlement date

`maturity`: maturity date

`last_interest`: last interest date

`rate`: nominal annual interest rate

`price`: price of security

`redemption`: amount received at maturity

`frequency`: number of interest payments per year

`basis`: calendar basis

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`YIELD`, `DURATION`.

OPT_2_ASSET_CORRELATION

### `OPT_2_ASSET_CORRELATION`

    OPT_2_ASSET_CORRELATION(call_put_flag,spot1,spot2,strike1,strike1,time,cost_of_carry1,cost_of_carry2,rate,volatility1,volatility2,rho)

#### Description

`OPT_2_ASSET_CORRELATION` models the theoretical price of options on 2 assets with correlation `rho`. The payoff for a call is max(`spot2` - `strike2`,0) if `spot1` > `strike1` or 0 otherwise. The payoff for a put is max (`strike2` - `spot2`, 0) if `spot1` < `strike1` or 0 otherwise.

`call_put_flag`: 'c' for a call and 'p' for a put

`spot1`: spot price of the underlying asset of the first option

`spot2`: spot price of the underlying asset of the second option

`strike1`: strike prices of the first option

`strike1`: strike prices of the second option

`time`: time to maturity in years

`cost_of_carry1`: net cost of holding the underlying asset of the first option (for common stocks, the risk free rate less the dividend yield)

`cost_of_carry2`: net cost of holding the underlying asset of the second option (for common stocks, the risk free rate less the dividend yield)

`rate`: annualized risk-free interest rate

`volatility1`: annualized volatility in price of the underlying asset of the first option

`volatility2`: annualized volatility in price of the underlying asset of the second option

`rho`: correlation between the two underlying assets

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_AMER_EXCHANGE

### `OPT_AMER_EXCHANGE`

    OPT_AMER_EXCHANGE(spot1,spot2,qty1,qty2,time,rate,cost_of_carry1,cost_of_carry2,volatility1,volatility2,rho)

#### Description

`OPT_AMER_EXCHANGE` models the theoretical price of an American option to exchange one asset with quantity `qty2` and spot price `spot2` for another with quantity `qty1` and spot price `spot1`.

`spot1`: spot price of asset 1

`spot2`: spot price of asset 1

`qty1`: quantity of asset 1

`qty2`: quantity of asset 2

`time`: time to maturity in years

`rate`: annualized risk-free interest rate

`cost_of_carry1`: net cost of holding asset 1 (for common stocks, the risk free rate less the dividend yield)

`cost_of_carry2`: net cost of holding asset 2 (for common stocks, the risk free rate less the dividend yield)

`volatility1`: annualized volatility in price of asset 1

`volatility2`: annualized volatility in price of asset 2

`rho`: correlation between the prices of the two assets

#### See also

`OPT_EURO_EXCHANGE`, `OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_BAW_AMER

### `OPT_BAW_AMER`

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_BINOMIAL

### `OPT_BINOMIAL`

    OPT_BINOMIAL(amer_euro_flag,call_put_flag,num_time_steps,spot,strike,time,rate,volatility,cost_of_carry)

#### Description

.

`amer_euro_flag`: 'a' for an American style option or 'e' for a European style option

`call_put_flag`: 'c' for a call and 'p' for a put

`num_time_steps`: number of time steps used in the valuation

`spot`: spot price

`strike`: strike price

`time`: time to maturity in years

`rate`: annualized risk-free interest rate

`volatility`: annualized volatility of the asset

`cost_of_carry`: net cost of holding the underlying asset

#### Note

A larger `num_time_steps` yields greater accuracy but `OPT_BINOMIAL` is slower to calculate.

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_BJER_STENS

### `OPT_BJER_STENS`

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_BS

### `OPT_BS`

    OPT_BS(call_put_flag,spot,strike,time,rate,volatility,cost_of_carry)

#### Description

`OPT_BS` uses the Black-Scholes model to calculate the price of a European option struck at `strike` on an asset with spot price `spot`.

`call_put_flag`: 'c' for a call and 'p' for a put

`spot`: spot price

`strike`: strike price

`time`: time to maturity in years

`rate`: risk-free interest rate to the exercise date in percent

`volatility`: annualized volatility of the asset in percent for the period through to the exercise date

`cost_of_carry`: net cost of holding the underlying asset (for common stocks, the risk free rate less the dividend yield), defaults to 0

#### Note

The returned value will be expressed in the same units as `strike` and `spot`.

#### See also

`OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_VEGA`, `OPT_BS_GAMMA`.

OPT_BS_CARRYCOST

### `OPT_BS_CARRYCOST`

    OPT_BS_CARRYCOST(call_put_flag,spot,strike,time,rate,volatility,cost_of_carry)

#### Description

`OPT_BS_CARRYCOST` uses the Black-Scholes model to calculate the 'elasticity' of a European option struck at `strike` on an asset with spot price `spot`. The elasticity of an option is the rate of change of its price with respect to its `cost_of_carry`.

`call_put_flag`: 'c' for a call and 'p' for a put

`spot`: spot price

`strike`: strike price

`time`: time to maturity in years

`rate`: risk-free interest rate to the exercise date in percent

`volatility`: annualized volatility of the asset in percent for the period through to the exercise date

`cost_of_carry`: net cost of holding the underlying asset (for common stocks, the risk free rate less the dividend yield), defaults to 0

#### Note

Elasticity is expressed as the rate of change of the option value, per 100% volatility.

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_BS_DELTA

### `OPT_BS_DELTA`

    OPT_BS_DELTA(call_put_flag,spot,strike,time,rate,volatility,cost_of_carry)

#### Description

`OPT_BS_DELTA` uses the Black-Scholes model to calculate the 'delta' of a European option struck at `strike` on an asset with spot price `spot`.

`call_put_flag`: 'c' for a call and 'p' for a put

`spot`: spot price

`strike`: strike price

`time`: time to maturity in years

`rate`: risk-free interest rate to the exercise date in percent

`volatility`: annualized volatility of the asset in percent for the period through to the exercise date

`cost_of_carry`: net cost of holding the underlying asset (for common stocks, the risk free rate less the dividend yield), defaults to 0

#### Note

The returned value will be expressed in the same units as `strike` and `spot`.

#### See also

`OPT_BS`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_VEGA`, `OPT_BS_GAMMA`.

OPT_BS_GAMMA

### `OPT_BS_GAMMA`

    OPT_BS_GAMMA(spot,strike,time,rate,volatility,cost_of_carry)

#### Description

OPT_BS_DELTA uses the Black-Scholes model to calculate the 'gamma' of a European option struck at `strike` on an asset with spot price `spot`. The gamma of an option is the second derivative of its price with respect to the price of the underlying asset.

`spot`: spot price

`strike`: strike price

`time`: time to maturity in years

`rate`: risk-free interest rate to the exercise date in percent

`volatility`: annualized volatility of the asset in percent for the period through to the exercise date

`cost_of_carry`: net cost of holding the underlying asset (for common stocks, the risk free rate less the dividend yield), defaults to 0

#### Note

Gamma is expressed as the rate of change of delta per unit change in `spot`.

#### Note

Gamma is the same for calls and puts.

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_VEGA`.

OPT_BS_RHO

### `OPT_BS_RHO`

    OPT_BS_RHO(call_put_flag,spot,strike,time,rate,volatility,cost_of_carry)

#### Description

OPT_BS_DELTA uses the Black-Scholes model to calculate the 'rho' of a European option struck at `strike` on an asset with spot price `spot`. The rho of an option is the rate of change of its price with respect to the risk free interest rate.

`call_put_flag`: 'c' for a call and 'p' for a put

`spot`: spot price

`strike`: strike price

`time`: time to maturity in years

`rate`: risk-free interest rate to the exercise date in percent

`volatility`: annualized volatility of the asset in percent for the period through to the exercise date

`cost_of_carry`: net cost of holding the underlying asset (for common stocks, the risk free rate less the dividend yield), defaults to 0

#### Note

Rho is expressed as the rate of change of the option value, per 100% change in `rate`.

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_THETA`, `OPT_BS_VEGA`, `OPT_BS_GAMMA`.

OPT_BS_THETA

### `OPT_BS_THETA`

    OPT_BS_THETA(call_put_flag,spot,strike,time,rate,volatility,cost_of_carry)

#### Description

OPT_BS_DELTA uses the Black-Scholes model to calculate the 'theta' of a European option struck at `strike` on an asset with spot price `spot`. The theta of an option is the rate of change of its price with respect to time to expiry.

`call_put_flag`: 'c' for a call and 'p' for a put

`spot`: spot price

`strike`: strike price

`time`: time to maturity in years

`rate`: risk-free interest rate to the exercise date in percent

`volatility`: annualized volatility of the asset in percent for the period through to the exercise date

`cost_of_carry`: net cost of holding the underlying asset (for common stocks, the risk free rate less the dividend yield), defaults to 0

#### Note

Theta is expressed as the negative of the rate of change of the option value, per 365.25 days.

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_VEGA`, `OPT_BS_GAMMA`.

OPT_BS_VEGA

### `OPT_BS_VEGA`

    OPT_BS_VEGA(spot,strike,time,rate,volatility,cost_of_carry)

#### Description

OPT_BS_DELTA uses the Black-Scholes model to calculate the 'vega' of a European option struck at `strike` on an asset with spot price `spot`. The vega of an option is the rate of change of its price with respect to volatility.

`spot`: spot price

`strike`: strike price

`time`: time to maturity in years

`rate`: risk-free interest rate to the exercise date in percent

`volatility`: annualized volatility of the asset in percent for the period through to the exercise date

`cost_of_carry`: net cost of holding the underlying asset (for common stocks, the risk free rate less the dividend yield), defaults to 0

#### Note

Vega is the same for calls and puts.

#### Note

Vega is expressed as the rate of change of option value, per 100% volatility.

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_COMPLEX_CHOOSER

### `OPT_COMPLEX_CHOOSER`

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_EURO_EXCHANGE

### `OPT_EURO_EXCHANGE`

    OPT_EURO_EXCHANGE(spot1,spot2,qty1,qty2,time,rate,cost_of_carry1,cost_of_carry2,volatility1,volatility2,rho)

#### Description

`OPT_EURO_EXCHANGE` models the theoretical price of a European option to exchange one asset with quantity `qty2` and spot price `spot2` for another with quantity `qty1` and spot price `spot1`.

`spot1`: spot price of asset 1

`spot2`: spot price of asset 1

`qty1`: quantity of asset 1

`qty2`: quantity of asset 2

`time`: time to maturity in years

`rate`: annualized risk-free interest rate

`cost_of_carry1`: net cost of holding asset 1 (for common stocks, the risk free rate less the dividend yield)

`cost_of_carry2`: net cost of holding asset 2 (for common stocks, the risk free rate less the dividend yield)

`volatility1`: annualized volatility in price of asset 1

`volatility2`: annualized volatility in price of asset 2

`rho`: correlation between the prices of the two assets

#### See also

`OPT_AMER_EXCHANGE`, `OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_EXEC

### `OPT_EXEC`

    OPT_EXEC(call_put_flag,spot,strike,time,rate,volatility,cost_of_carry,lambda)

#### Description

.

`call_put_flag`: 'c' for a call and 'p' for a put

`spot`: spot price

`strike`: strike price

`time`: time to maturity in days

`rate`: annualized risk-free interest rate

`volatility`: annualized volatility of the asset

`cost_of_carry`: net cost of holding the underlying asset

`lambda`: jump rate for executives

#### Note

The model assumes executives forfeit their options if they leave the company.

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_EXTENDIBLE_WRITER

### `OPT_EXTENDIBLE_WRITER`

    OPT_EXTENDIBLE_WRITER(call_put_flag,spot,strike1,strike2,time1,time2,rate,cost_of_carry,volatility)

#### Description

`OPT_EXTENDIBLE_WRITER` models the theoretical price of extendible writer options. These are options that have their maturity extended to `time2` if the option is out of the money at `time1`.

`call_put_flag`: 'c' for a call and 'p' for a put

`spot`: spot price

`strike1`: strike price at which the option is struck

`strike2`: strike price at which the option is re-struck if out of the money at `time1`

`time1`: initial maturity of the option in years

`time2`: extended maturity in years if chosen

`rate`: annualized risk-free interest rate

`cost_of_carry`: net cost of holding the underlying asset

`volatility`: annualized volatility of the asset

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_FIXED_STRK_LKBK

### `OPT_FIXED_STRK_LKBK`

    OPT_FIXED_STRK_LKBK(call_put_flag,spot,spot_min,spot_max,strike,time,rate,cost_of_carry,volatility)

#### Description

`OPT_FIXED_STRK_LKBK` determines the theoretical price of a fixed-strike lookback option where the holder of the option may exercise on expiry at the most favourable price observed during the options life of the underlying asset.

`call_put_flag`: 'c' for a call and 'p' for a put

`spot`: spot price

`spot_min`: minimum spot price of the underlying asset so far observed

`spot_max`: maximum spot price of the underlying asset so far observed

`strike`: strike price

`time`: time to maturity in years

`rate`: annualized risk-free interest rate

`cost_of_carry`: net cost of holding the underlying asset

`volatility`: annualized volatility of the asset

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_FLOAT_STRK_LKBK

### `OPT_FLOAT_STRK_LKBK`

    OPT_FLOAT_STRK_LKBK(call_put_flag,spot,spot_min,spot_max,time,rate,cost_of_carry,volatility)

#### Description

`OPT_FLOAT_STRK_LKBK` determines the theoretical price of a floating-strike lookback option where the holder of the option may exercise on expiry at the most favourable price observed during the options life of the underlying asset.

`call_put_flag`: 'c' for a call and 'p' for a put

`spot`: spot price

`spot_min`: minimum spot price of the underlying asset so far observed

`spot_max`: maximum spot price of the underlying asset so far observed

`time`: time to maturity in years

`rate`: annualized risk-free interest rate

`cost_of_carry`: net cost of holding the underlying asset

`volatility`: annualized volatility of the asset

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_FORWARD_START

### `OPT_FORWARD_START`

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_FRENCH

### `OPT_FRENCH`

    OPT_FRENCH(call_put_flag,spot,strike,time,ttime,rate,volatility,cost_of_carry)

#### Description

`OPT_FRENCH` values the theoretical price of a European option adjusted for trading day volatility, struck at `strike` on an asset with spot price `spot`.

`call_put_flag`: 'c' for a call and 'p' for a put

`spot`: spot price

`strike`: strike price

`time`: ratio of the number of calendar days to exercise and the number of calendar days in the year

`ttime`: ratio of the number of trading days to exercise and the number of trading days in the year

`rate`: risk-free interest rate to the exercise date in percent

`volatility`: annualized volatility of the asset in percent for the period through to the exercise date

`cost_of_carry`: net cost of holding the underlying asset (for common stocks, the risk free rate less the dividend yield), defaults to 0

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_GARMAN_KOHLHAGEN

### `OPT_GARMAN_KOHLHAGEN`

    OPT_GARMAN_KOHLHAGEN(call_put_flag,spot,strike,time,domestic_rate,foreign_rate,volatility)

#### Description

`OPT_GARMAN_KOHLHAGEN` values the theoretical price of a European currency option struck at `strike` on an asset with spot price `spot`.

`call_put_flag`: 'c' for a call and 'p' for a put

`spot`: spot price

`strike`: strike price

`time`: number of days to exercise

`domestic_rate`: domestic risk-free interest rate to the exercise date in percent

`foreign_rate`: foreign risk-free interest rate to the exercise date in percent

`volatility`: annualized volatility of the asset in percent for the period through to the exercise date

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_JUMP_DIFF

### `OPT_JUMP_DIFF`

    OPT_JUMP_DIFF(call_put_flag,spot,strike,time,rate,volatility,lambda,gamma)

#### Description

`OPT_JUMP_DIFF` models the theoretical price of an option according to the Jump Diffusion process (Merton).

`call_put_flag`: 'c' for a call and 'p' for a put

`spot`: spot price

`strike`: strike price

`time`: time to maturity in years

`rate`: the annualized rate of interest

`volatility`: annualized volatility of the asset in percent for the period through to the exercise date

`lambda`: expected number of 'jumps' per year

`gamma`: proportion of volatility explained by the 'jumps'

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_MILTERSEN_SCHWARTZ

### `OPT_MILTERSEN_SCHWARTZ`

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_ON_OPTIONS

### `OPT_ON_OPTIONS`

    OPT_ON_OPTIONS(type_flag,spot,strike1,strike2,time1,time2,rate,cost_of_carry,volatility)

#### Description

.

`type_flag`: 'cc' for calls on calls, 'cp' for calls on puts, and so on for 'pc', and 'pp'.

`spot`: spot price

`strike1`: strike price at which the option being valued is struck

`strike2`: strike price at which the underlying option is struck

`time1`: time in years to maturity of the option

`time2`: time in years to the maturity of the underlying option

`rate`: annualized risk-free interest rate

`cost_of_carry`: net cost of holding the underlying asset of the underlying option (for common stocks, the risk free rate less the dividend yield)

`volatility`: annualized volatility in price of the underlying asset of the underlying option

#### Note

`time2` ≥ `time1`

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_RGW

### `OPT_RGW`

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_SIMPLE_CHOOSER

### `OPT_SIMPLE_CHOOSER`

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_SPREAD_APPROX

### `OPT_SPREAD_APPROX`

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

OPT_TIME_SWITCH

### `OPT_TIME_SWITCH`

    OPT_TIME_SWITCH(call_put_flag,spot,strike,a,time,m,dt,rate,cost_of_carry,volatility)

#### Description

`OPT_TIME_SWITCH` models the theoretical price of time switch options. (Pechtl 1995). The holder receives `a` * `dt` for each period that the asset price was greater than `strike` (for a call) or below it (for a put).

`call_put_flag`: 'c' for a call and 'p' for a put

`spot`: spot price

`strike`: strike price

`a`: amount received for each time period

`time`: time to maturity in years

`m`: number of time units the option has already met the condition

`dt`: agreed upon discrete time period expressed as a fraction of a year

`rate`: annualized risk-free interest rate

`cost_of_carry`: net cost of holding the underlying asset

`volatility`: annualized volatility of the asset

#### See also

`OPT_BS`, `OPT_BS_DELTA`, `OPT_BS_RHO`, `OPT_BS_THETA`, `OPT_BS_GAMMA`.

PMT

### `PMT`

    PMT(rate,nper,pv,fv,type)

#### Description

`PMT` calculates the payment amount for an annuity.

`rate`: effective annual interest rate

`nper`: number of periods

`pv`: present value

`fv`: future value

`type`: payment type

#### Note

If `type` is 0, the default, payment is at the end of each period. If `type` is 1, payment is at the beginning of each period.

#### See also

`PV`, `FV`, `RATE`, `ISPMT`.

PPMT

### `PPMT`

    PPMT(rate,per,nper,pv,fv,type)

#### Description

`PPMT` calculates the principal part of an annuity's payment for period number `per`.

`rate`: effective annual interest rate

`per`: period number

`nper`: number of periods

`pv`: present value

`fv`: future value

`type`: payment type

#### Note

If `type` is 0, the default, payment is at the end of each period. If `type` is 1, payment is at the beginning of each period.

#### See also

`IPMT`.

PRICE

### `PRICE`

    PRICE(settlement,maturity,rate,yield,redemption,frequency,basis)

#### Description

`PRICE` calculates the price per $100 face value of a security that pays periodic interest.

`settlement`: settlement date

`maturity`: maturity date

`rate`: nominal annual interest rate

`yield`: annual yield of security

`redemption`: amount received at maturity

`frequency`: number of interest payments per year

`basis`: calendar basis

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`YIELD`, `DURATION`.

PRICEDISC

### `PRICEDISC`

    PRICEDISC(settlement,maturity,discount,redemption,basis)

#### Description

`PRICEDISC` calculates the price per $100 face value of a bond that does not pay interest at maturity.

`settlement`: settlement date

`maturity`: maturity date

`discount`: annual rate at which to discount

`redemption`: amount received at maturity

`basis`: calendar basis

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`PRICEMAT`.

PRICEMAT

### `PRICEMAT`

    PRICEMAT(settlement,maturity,issue,discount,yield,basis)

#### Description

`PRICEMAT` calculates the price per $100 face value of a bond that pays interest at maturity.

`settlement`: settlement date

`maturity`: maturity date

`issue`: date of issue

`discount`: annual rate at which to discount

`yield`: annual yield of security

`basis`: calendar basis

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`PRICEDISC`.

PV

### `PV`

    PV(rate,nper,pmt,fv,type)

#### Description

`PV` calculates the present value of `fv` which is `nper` periods into the future, assuming a periodic payment of `pmt` and an interest rate of `rate` per period.

`rate`: effective interest rate per period

`nper`: number of periods

`pmt`: payment at each period

`fv`: future value

`type`: payment type

#### Note

If `type` is 0, the default, payment is at the end of each period. If `type` is 1, payment is at the beginning of each period.

#### See also

`FV`.

RATE

### `RATE`

    RATE(nper,pmt,pv,fv,type,guess)

#### Description

`RATE` calculates the rate of return.

`nper`: number of periods

`pmt`: payment at each period

`pv`: present value

`fv`: future value

`type`: payment type

`guess`: an estimate of what the result should be

#### Note

If `type` is 0, the default, payment is at the end of each period. If `type` is 1, payment is at the beginning of each period.

#### Note

The optional `guess` is needed because there can be more than one valid result. It defaults to 10%.

#### See also

`PV`, `FV`.

RECEIVED

### `RECEIVED`

    RECEIVED(settlement,maturity,investment,rate,basis)

#### Description

`RECEIVED` calculates the amount to be received when a security matures.

`settlement`: settlement date

`maturity`: maturity date

`investment`: amount paid on settlement

`rate`: nominal annual interest rate

`basis`: calendar basis

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`INTRATE`.

RRI

### `RRI`

    RRI(p,pv,fv)

#### Description

`RRI` dtermines an equivalent interest rate for an investment that increases in value. The interest is compounded after each complete period.

`p`: number of periods

`pv`: present value

`fv`: future value

#### Note

If `type` is 0, the default, payment is at the end of each period. If `type` is 1, payment is at the beginning of each period.

#### Note

Note that `p` need not be an integer but for fractional value the calculated rate is only approximate.

#### See also

`PV`, `FV`, `RATE`.

SLN

### `SLN`

    SLN(cost,salvage,life)

#### Description

`SLN` calculates the depreciation of an asset using the straight-line method.

`cost`: initial cost of asset

`salvage`: value after depreciation

`life`: number of periods

#### See also

`DB`, `DDB`, `SYD`.

SYD

### `SYD`

    SYD(cost,salvage,life,period)

#### Description

`SYD` calculates the depreciation of an asset using the sum-of-years method.

`cost`: initial cost of asset

`salvage`: value after depreciation

`life`: number of periods

`period`: subject period

#### See also

`DB`, `DDB`, `SLN`.

TBILLEQ

### `TBILLEQ`

    TBILLEQ(settlement,maturity,discount)

#### Description

`TBILLEQ` calculates the bond-equivalent yield for a treasury bill.

`settlement`: settlement date

`maturity`: maturity date

`discount`: annual rate at which to discount

#### See also

`TBILLPRICE`, `TBILLYIELD`.

TBILLPRICE

### `TBILLPRICE`

    TBILLPRICE(settlement,maturity,discount)

#### Description

`TBILLPRICE` calculates the price per $100 face value for a treasury bill.

`settlement`: settlement date

`maturity`: maturity date

`discount`: annual rate at which to discount

#### See also

`TBILLEQ`, `TBILLYIELD`.

TBILLYIELD

### `TBILLYIELD`

    TBILLYIELD(settlement,maturity,price)

#### Description

`TBILLYIELD` calculates the yield of a treasury bill.

`settlement`: settlement date

`maturity`: maturity date

`price`: price

#### See also

`TBILLEQ`, `TBILLPRICE`.

VDB

### `VDB`

    VDB(cost,salvage,life,start_period,end_period,factor,no_switch)

#### Description

`VDB` calculates the depreciation of an asset for a given period range using the double-declining balance method.

`cost`: initial cost of asset

`salvage`: value after depreciation

`life`: number of periods

`start_period`: first period to accumulate for

`end_period`: last period to accumulate for

`factor`: factor at which the balance declines

`no_switch`: do not switch to straight-line depreciation

#### Note

If `no_switch` is FALSE, the calculation switches to straight-line depreciation when depreciation is greater than the declining balance calculation.

#### See also

`DB`, `DDB`.

XIRR

### `XIRR`

    XIRR(values,dates,guess)

#### Description

`XIRR` calculates the annualized internal rate of return of a cash flow at arbitrary points in time. `values` lists the payments (negative values) and receipts (positive values) with one value for each entry in `dates`.

`values`: cash flow

`dates`: dates of cash flow

`guess`: an estimate of what the result should be

#### Note

The optional `guess` is needed because there can be more than one valid result. It defaults to 10%.

#### See also

`IRR`.

XNPV

### `XNPV`

    XNPV(rate,values,dates)

#### Description

`XNPV` calculates the net present value of a cash flow at irregular times

`rate`: effective annual interest rate

`values`: cash flow

`dates`: dates of cash flow

#### Note

If `type` is 0, the default, payment is at the end of each period. If `type` is 1, payment is at the beginning of each period.

#### See also

`NPV`.

YIELD

### `YIELD`

    YIELD(settlement,maturity,rate,price,redemption,frequency,basis)

#### Description

`YIELD` calculates the yield of a security that pays periodic interest.

`settlement`: settlement date

`maturity`: maturity date

`rate`: nominal annual interest rate

`price`: price of security

`redemption`: amount received at maturity

`frequency`: number of interest payments per year

`basis`: calendar basis

#### Note

`frequency` may be 1 (annual), 2 (semi-annual), or 4 (quarterly).

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`PRICE`, `DURATION`.

YIELDDISC

### `YIELDDISC`

    YIELDDISC(settlement,maturity,price,redemption,basis)

#### Description

`YIELDDISC` calculates the yield of a discounted security.

`settlement`: settlement date

`maturity`: maturity date

`price`: price of security

`redemption`: amount received at maturity

`basis`: calendar basis

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`PRICE`, `DURATION`.

YIELDMAT

### `YIELDMAT`

    YIELDMAT(settlement,maturity,issue,rate,price,basis)

#### Description

`YIELDMAT` calculates the yield of a security for which the interest is paid at maturity date.

`settlement`: settlement date

`maturity`: maturity date

`issue`: date of issue

`rate`: nominal annual interest rate

`price`: price of security

`basis`: calendar basis

#### Note

If `basis` is 0, then the US 30/360 method is used.

#### Note

If `basis` is 1, then actual number of days is used.

#### Note

If `basis` is 2, then actual number of days is used within a month, but years are considered only 360 days.

#### Note

If `basis` is 3, then actual number of days is used within a month, but years are always considered 365 days.

#### Note

If `basis` is 4, then the European 30/360 method is used.

#### See also

`YIELDDISC`, `YIELD`.

## Gnumeric

GNUMERIC_VERSION

### `GNUMERIC_VERSION`

    GNUMERIC_VERSION()

#### Description

`GNUMERIC_VERSION` returns the version of gnumeric as a string.

#### See also

## Information

CELL

### `CELL`

    CELL(type,cell)

#### Description

`type` specifies the type of information you want to obtain:

address Returns the given cell reference as text.

col Returns the number of the column in `cell`.

color Returns 0.

contents Returns the contents of the cell in `cell`.

column Returns the number of the column in `cell`.

columnwidth Returns the column width.

coord Returns the absolute address of `cell`.

datatype same as type

filename Returns the name of the file of `cell`.

format Returns the code of the format of the cell.

formulatype same as type

locked Returns 1 if `cell` is locked.

parentheses Returns 1 if `cell` contains a negative value

and its format displays it with parentheses.

prefix Returns a character indicating the horizontal

alignment of `cell`.

prefixcharacter same as prefix

protect Returns 1 if `cell` is locked.

row Returns the number of the row in `cell`.

sheetname Returns the name of the sheet of `cell`.

type Returns "l" if `cell` contains a string,

"v" if it contains some other value, and

"b" if `cell` is blank.

value Returns the contents of the cell in `cell`.

width Returns the column width.

`type`: string specifying the type of information requested

`cell`: cell reference

#### See also

`INDIRECT`.

COUNTBLANK

### `COUNTBLANK`

#### See also

`COUNT`.

ERROR

### `ERROR`

#### See also

`ISERROR`.

ERROR.TYPE

### `ERROR.TYPE`

    ERROR.TYPE(error)

#### Description

`ERROR.TYPE` returns an error number corresponding to the given error value. The error numbers for error values are:

#DIV/0! 2

#VALUE! 3

#REF! 4

#NAME? 5

#NUM! 6

#N/A 7

`error`: an error

#### See also

`ISERROR`.

EXPRESSION

### `EXPRESSION`

    EXPRESSION(cell)

#### Description

.

`cell`: a cell reference

#### Note

If `cell` contains no expression, `EXPRESSION` returns empty.

#### See also

`TEXT`.

GET.FORMULA

### `GET.FORMULA`

#### See also

`EXPRESSION`.

GETENV

### `GETENV`

    GETENV(name)

#### Description

.

`name`: the name of the environment variable

#### Note

If a variable called `name` does not exist, #N/A! will be returned.

#### Note

Variable names are case sensitive.

INFO

### `INFO`

    INFO(type)

#### Description

`INFO` returns information about the current operating environment according to `type`:

memavail Returns the amount of memory available, bytes.

memused Returns the amount of memory used (bytes).

numfile Returns the number of active worksheets.

osversion Returns the operating system version.

recalc Returns the recalculation mode (automatic).

release Returns the version of Gnumeric as text.

system Returns the name of the environment.

totmem Returns the amount of total memory available.

`type`: string giving the type of information requested

#### See also

`CELL`.

ISBLANK

### `ISBLANK`

    ISBLANK(value)

#### Description

This function checks if a value is blank. Empty cells are blank, but empty strings are not.

`value`: a value

ISERR

### `ISERR`

#### See also

`ISERROR`.

ISERROR

### `ISERROR`

#### See also

`ISERR`, `ISNA`.

ISEVEN

### `ISEVEN`

#### See also

`ISODD`.

ISLOGICAL

### `ISLOGICAL`

    ISLOGICAL(value)

#### Description

This function checks if a value is either TRUE or FALSE.

`value`: a value

ISNA

### `ISNA`

#### See also

`NA`.

ISNONTEXT

### `ISNONTEXT`

#### See also

`ISTEXT`.

ISNUMBER

### `ISNUMBER`

    ISNUMBER(value)

#### Description

This function checks if a value is a number. Neither TRUE nor FALSE are numbers for this purpose.

`value`: a value

ISODD

### `ISODD`

#### See also

`ISEVEN`.

ISREF

### `ISREF`

    ISREF(value)

#### Description

This function checks if a value is a cell reference.

`value`: a value

ISTEXT

### `ISTEXT`

#### See also

`ISNONTEXT`.

N

### `N`

    N(text)

#### Description

.

`text`: string

#### Note

If `text` contains non-numerical text, 0 is returned.

NA

### `NA`

#### See also

`ISNA`.

TYPE

### `TYPE`

    TYPE(value)

#### Description

`TYPE` returns a number indicating the data type of @{ value}:

1 = number

2 = text

4 = boolean

16 = error

64 = array

`value`: a value

## Logic

AND

### `AND`

    AND(b0,b1)

#### Description

`AND` calculates the logical conjunction of its arguments `b0`,`b1`,...

`b0`: logical value

`b1`: logical value

#### Note

If an argument is numerical, zero is considered FALSE and anything else TRUE.

#### Note

Strings and empty values are ignored.

#### Note

If no logical values are provided, then the error #VALUE! is returned.

#### Note

This function is strict: if any argument is an error, the result will be the first such error.

#### See also

`OR`, `NOT`, `IF`.

FALSE

### `FALSE`

    FALSE()

#### Description

`FALSE` returns the value `FALSE`.

#### See also

`TRUE`, `IF`.

IF

### `IF`

    IF(cond,trueval,falseval)

#### Description

This function first evaluates the condition. If the result is true, it will then evaluate and return the second argument. Otherwise, it will evaluate and return the last argument.

`cond`: condition.

`trueval`: value to use if condition is true.

`falseval`: value to use if condition is false.

#### See also

`AND`, `OR`, `XOR`, `NOT`, `IFERROR`.

IFERROR

### `IFERROR`

    IFERROR(x,y)

#### Description

This function returns the first value, unless that is an error, in which case it returns the second.

`x`: value to test for error.

`y`: alternate value.

#### See also

`IF`, `ISERROR`.

NOT

### `NOT`

    NOT(b)

#### Description

`NOT` calculates the logical negation of its argument.

`b`: logical value

#### Note

If the argument is numerical, zero is considered FALSE and anything else TRUE.

#### Note

Strings and empty values are ignored.

#### See also

`AND`, `OR`, `IF`.

OR

### `OR`

    OR(b0,b1)

#### Description

`OR` calculates the logical disjunction of its arguments `b0`,`b1`,...

`b0`: logical value

`b1`: logical value

#### Note

If an argument is numerical, zero is considered FALSE and anything else TRUE.

#### Note

Strings and empty values are ignored.

#### Note

If no logical values are provided, then the error #VALUE! is returned.

#### Note

This function is strict: if any argument is an error, the result will be the first such error.

#### See also

`AND`, `XOR`, `NOT`, `IF`.

TRUE

### `TRUE`

    TRUE()

#### Description

`TRUE` returns the value `TRUE`.

#### See also

`FALSE`, `IF`.

XOR

### `XOR`

    XOR(b0,b1)

#### Description

`XOR` calculates the logical exclusive disjunction of its arguments `b0`,`b1`,...

`b0`: logical value

`b1`: logical value

#### Note

If an argument is numerical, zero is considered FALSE and anything else TRUE.

#### Note

Strings and empty values are ignored.

#### Note

If no logical values are provided, then the error #VALUE! is returned.

#### Note

This function is strict: if any argument is an error, the result will be the first such error.

#### See also

`OR`, `AND`, `NOT`, `IF`.

## Lookup

ADDRESS

### `ADDRESS`

    ADDRESS(row_num,col_num,abs_num,a1,text)

#### Description

.

`row_num`: row number

`col_num`: column number

`abs_num`: 1 for an absolute, 2 for a row absolute and column relative, 3 for a row relative and column absolute, and 4 for a relative reference; defaults to 1

`a1`: if TRUE, an A1-style reference is provided, otherwise an R1C1-style reference; defaults to TRUE

`text`: name of the worksheet, defaults to no sheet

#### Note

If `row_num` or `col_num` is less than one, `ADDRESS` returns #VALUE!

#### Note

If `abs_num` is greater than 4 `ADDRESS` returns #VALUE!

#### See also

`COLUMNNUMBER`.

AREAS

### `AREAS`

#### See also

`ADDRESS`, `INDEX`, `INDIRECT`, `OFFSET`.

CHOOSE

### `CHOOSE`

    CHOOSE(index,value1,value2)

#### Description

`CHOOSE` returns its (`index`+1)th argument.

`index`: positive number

`value1`: first value

`value2`: second value

#### Note

`index` is truncated to an integer. If `index` < 1 or the truncated `index` > number of values, `CHOOSE` returns #VALUE!

#### See also

`IF`.

COLUMN

### `COLUMN`

    COLUMN(x)

#### Description

`COLUMN` function returns a Nx1 array containing the sequence of integers from the first column to the last column of `reference`.

`x`: reference, defaults to the position of the current expression

#### Note

If `reference` is neither an array nor a reference nor a range, returns #VALUE!

#### See also

`COLUMNS`, `ROW`, `ROWS`.

COLUMNNUMBER

### `COLUMNNUMBER`

    COLUMNNUMBER(name)

#### Description

.

`name`: column name such as "IV"

#### Note

If `name` is invalid, `COLUMNNUMBER` returns #VALUE!

#### See also

`ADDRESS`.

COLUMNS

### `COLUMNS`

    COLUMNS(reference)

#### Description

.

`reference`: array or area

#### Note

If `reference` is neither an array nor a reference nor a range, `COLUMNS` returns #VALUE!

#### See also

`COLUMN`, `ROW`, `ROWS`.

HLOOKUP

### `HLOOKUP`

    HLOOKUP(value,range,row,approximate,as_index)

#### Description

`HLOOKUP` function finds the row in `range` that has a first cell similar to `value`. If `approximate` is not true it finds the row with an exact equality. If `approximate` is true, it finds the last row with first value less than or equal to `value`. If `as_index` is true the 0-based row offset is returned.

`value`: search value

`range`: range to search

`row`: 1-based column offset indicating the return values

`approximate`: if false, an exact match of `value` must be found; defaults to TRUE

`as_index`: if true, the 0-based row offset is returned; defaults to FALSE

#### Note

If `approximate` is true, then the values must be sorted in order of ascending value.

#### Note

`HLOOKUP` returns #REF! if `row` falls outside `range`.

#### See also

`VLOOKUP`.

HYPERLINK

### `HYPERLINK`

    HYPERLINK(link_location,label)

#### Description

`HYPERLINK` function currently returns its 2nd argument, or if that is omitted the 1st argument.

`link_location`: string

`label`: string, optional

INDEX

### `INDEX`

    INDEX(array,row,col,area)

#### Description

`INDEX` gives a reference to a cell in the given `array`. The cell is selected by `row` and `col`, which count the rows and columns in the array.

`array`:

`row`: desired row, defaults to 1

`col`: desired column, defaults to 1

`area`: from which area to select a cell, defaults to 1

#### Note

If the reference falls outside the range of `array`, `INDEX` returns #REF!

INDIRECT

### `INDIRECT`

    INDIRECT(ref_text,format)

#### Description

.

`ref_text`:

`format`: if true, `ref_text` is given in A1-style, otherwise it is given in R1C1 style; defaults to true

#### Note

If `ref_text` is not a valid reference in the style determined by `format`, `INDIRECT` returns #REF!

#### See also

`AREAS`, `INDEX`, `CELL`.

LOOKUP

### `LOOKUP`

    LOOKUP(value,vector1,vector2)

#### Description

If `vector1` has more rows than columns, `LOOKUP` searches the first row of `vector1`, otherwise the first column. If `vector2` is omitted the return value is taken from the last row or column of `vector1`.

`value`: value to look up

`vector1`: range to search:

`vector2`: range of return values

#### Note

If `LOOKUP` can't find `value` it uses the largest value less than `value`.

#### Note

The data must be sorted.

#### Note

If `value` is smaller than the first value it returns #N/A.

#### Note

If the corresponding location does not exist in `vector2`, it returns #N/A.

#### See also

`VLOOKUP`, `HLOOKUP`.

MATCH

### `MATCH`

    MATCH(seek,vector,type)

#### Description

`MATCH` searches `vector` for `seek` and returns the 1-based index.

`seek`: value to find

`vector`: n by 1 or 1 by n range to be searched

`type`: +1 to find the largest value ≤ `seek`, 0 to find the first value = `seek`, or-1 to find the smallest value ≥ `seek`

#### Note

For `type` = -1 the data must be sorted in descending order; for `type` = +1 the data must be sorted in ascending order.

#### Note

If `seek` could not be found, #N/A is returned.

#### Note

If `vector` is neither n by 1 nor 1 by n, #N/A is returned.

#### See also

`LOOKUP`.

OFFSET

### `OFFSET`

    OFFSET(range,row,col,height,width)

#### Description

`OFFSET` returns the cell range starting at offset (`row`,`col`) from `range` of height `height` and width `width`.

`range`: reference or range

`row`: number of rows to offset `range`

`col`: number of columns to offset `range`

`height`: height of the offset range, defaults to height of `range`

`width`: width of the offset range, defaults to width of `range`

#### Note

If `range` is neither a reference nor a range, `OFFSET` returns #VALUE!

#### See also

`COLUMN`, `COLUMNS`, `ROWS`, `INDEX`, `INDIRECT`, `ADDRESS`.

ROW

### `ROW`

    ROW(x)

#### Description

`ROW` function returns a 1xN array containing the sequence of integers from the first row to the last row of `reference`.

`x`: reference, defaults to the position of the current expression

#### Note

If `reference` is neither an array nor a reference nor a range, returns #VALUE!

#### See also

`COLUMN`, `COLUMNS`, `ROWS`.

ROWS

### `ROWS`

    ROWS(reference)

#### Description

.

`reference`: array, reference, or range

#### Note

If `reference` is neither an array nor a reference nor a range, `ROWS` returns #VALUE!

#### See also

`COLUMN`, `COLUMNS`, `ROW`.

TRANSPOSE

### `TRANSPOSE`

#### See also

`MMULT`.

VLOOKUP

### `VLOOKUP`

    VLOOKUP(value,range,column,approximate,as_index)

#### Description

`VLOOKUP` function finds the row in `range` that has a first cell similar to `value`. If `approximate` is not true it finds the row with an exact equality. If `approximate` is true, it finds the last row with first value less than or equal to `value`. If `as_index` is true the 0-based row offset is returned.

`value`: search value

`range`: range to search

`column`: 1-based column offset indicating the return values

`approximate`: if false, an exact match of `value` must be found; defaults to TRUE

`as_index`: if true, the 0-based row offset is returned; defaults to FALSE

#### Note

If `approximate` is true, then the values must be sorted in order of ascending value.

#### Note

`VLOOKUP` returns #REF! if `row` falls outside `range`.

#### See also

`HLOOKUP`.

## Mathematics

ABS

### `ABS`

    ABS(x)

#### Description

`ABS` gives the absolute value of `x`, i.e. the non-negative number of the same magnitude as `x`.

`x`: number

#### See also

`CEIL`, `CEILING`, `FLOOR`, `INT`, `MOD`.

ACOS

### `ACOS`

#### See also

`COS`, `SIN`, `DEGREES`, `RADIANS`.

ACOSH

### `ACOSH`

#### See also

`ACOS`, `ASINH`, `DEGREES`, `RADIANS`.

ACOT

### `ACOT`

#### See also

`COT`, `TAN`.

ACOTH

### `ACOTH`

#### See also

`COTH`, `TANH`.

Arabic

### `Arabic`

    Arabic(roman)

#### Description

Any Roman symbol to the left of a larger symbol (directly or indirectly) reduces the final value by the symbol amount, otherwise, it increases the final amount by the symbol's amount.

`roman`: Roman numeral

#### See also

`ROMAN`.

ASIN

### `ASIN`

    ASIN(x)

#### Description

`ASIN` calculates the arc sine of `x`; that is the value whose sine is `x`.

`x`: number

#### Note

If `x` falls outside the range -1 to 1, `ASIN` returns #NUM!

#### See also

`SIN`, `COS`, `ASINH`, `DEGREES`, `RADIANS`.

ASINH

### `ASINH`

    ASINH(x)

#### Description

`ASINH` calculates the inverse hyperbolic sine of `x`; that is the value whose hyperbolic sine is `x`.

`x`: number

#### See also

`ASIN`, `ACOSH`, `SIN`, `COS`, `DEGREES`, `RADIANS`.

ATAN

### `ATAN`

    ATAN(x)

#### Description

`ATAN` calculates the arc tangent of `x`; that is the value whose tangent is `x`.

`x`: angle in radians

#### See also

`TAN`, `COS`, `SIN`, `DEGREES`, `RADIANS`.

ATAN2

### `ATAN2`

    ATAN2(b1,b2)

#### Description

`ATAN2` calculates the arc tangent of the ratio `b1`/`b2` with the sign according to the quadrant containing (`b1`,`b2`).

`b1`: angle in radians

`b2`: angle in radians

#### See also

`ATAN`, `ATANH`, `COS`, `SIN`, `DEGREES`, `RADIANS`.

ATANH

### `ATANH`

    ATANH(x)

#### Description

`ATANH` calculates the inverse hyperbolic tangent of `x`; that is the value whose hyperbolic tangent is `x`.

`x`: angle in radians

#### Note

If the absolute value of `x` is greater than 1.0, `ATANH` returns #NUM!

#### See also

`ATAN`, `COS`, `SIN`, `DEGREES`, `RADIANS`.

AVERAGEIF

### `AVERAGEIF`

#### See also

`SUMIF`, `COUNTIF`.

BETA

### `BETA`

    BETA(x,y)

#### Description

`BETA` function returns the value of the Euler beta function extended to all real numbers except 0 and negative integers.

`x`: number

`y`: number

#### Note

If `x`, `y`, or (`x` + `y`) are non-positive integers, `BETA` returns #NUM!

#### See also

`BETALN`, `GAMMALN`.

BETALN

### `BETALN`

    BETALN(x,y)

#### Description

`BETALN` function returns the natural logarithm of the absolute value of the Euler beta function extended to all real numbers except 0 and negative integers.

`x`: number

`y`: number

#### Note

If `x`, `y`, or (`x` + `y`) are non-positive integers, `BETALN` returns #NUM!

#### See also

`BETA`, `GAMMALN`.

CEIL

### `CEIL`

    CEIL(x)

#### Description

`CEIL`(`x`) is the smallest integer that is at least as large as `x`.

`x`: number

#### See also

`CEILING`, `FLOOR`, `ABS`, `INT`, `MOD`.

CEILING

### `CEILING`

    CEILING(x,significance)

#### Description

`CEILING`(`x`,`significance`) is the nearest multiple of `significance` whose absolute value is at least ABS(`x`).

`x`: number

`significance`: base multiple (defaults to 1 for `x` > 0 and -1 for `x` <0)

#### Note

If `x` or `significance` is non-numeric, `CEILING` returns a #VALUE! error.

#### Note

If `x` and `significance` have different signs, `CEILING` returns a #NUM! error.

#### See also

`CEIL`, `FLOOR`, `ABS`, `INT`, `MOD`.

CHOLESKY

### `CHOLESKY`

    CHOLESKY(matrix)

#### Description

.

`matrix`: a symmetric positive definite matrix

#### Note

If the Cholesky-Banachiewicz algorithm applied to `matrix` fails, Cholesky returns #NUM!

#### Note

If `matrix` does not contain an equal number of columns and rows, `CHOLESKY` returns #VALUE!

#### See also

`MINVERSE`, `MMULT`, `MDETERM`.

COMBIN

### `COMBIN`

    COMBIN(n,k)

#### Description

`COMBIN` returns the binomial coefficient "`n` choose `k`", the number of `k`-combinations of an `n`-element set without repetition.

`n`: non-negative integer

`k`: non-negative integer

#### Note

If `n` is less than `k` `COMBIN` returns #NUM!

COMBINA

### `COMBINA`

#### See also

`COMBIN`.

COS

### `COS`

    COS(x)

#### Description

This function is Excel compatible.

`x`: angle in radians

#### See also

`SIN`, `TAN`, `SINH`, `COSH`, `TANH`, `RADIANS`, `DEGREES`.

COSH

### `COSH`

#### See also

`SIN`, `TAN`, `SINH`, `COSH`, `TANH`, `RADIANS`, `DEGREES`.

COT

### `COT`

#### See also

`TAN`, `ACOT`.

COTH

### `COTH`

#### See also

`TANH`, `ACOTH`.

COUNTIF

### `COUNTIF`

#### See also

`COUNT`, `SUMIF`.

CSC

### `CSC`

#### See also

`SIN`, `COS`, `TAN`, `SEC`, `SINH`, `COSH`, `TANH`, `RADIANS`, `DEGREES`.

CSCH

### `CSCH`

#### See also

`SIN`, `COS`, `TAN`, `CSC`, `SEC`, `SINH`, `COSH`, `TANH`, `RADIANS`, `DEGREES`.

DEGREES

### `DEGREES`

#### See also

`RADIANS`, `PI`.

EVEN

### `EVEN`

#### See also

`ODD`.

EXP

### `EXP`

    EXP(x)

#### Description

.

`x`: number

#### Note

e is the base of the natural logarithm.

#### See also

`LOG`, `LOG2`, `LOG10`.

EXPM1

### `EXPM1`

    EXPM1(x)

#### Description

.

`x`: number

#### Note

This function has a higher resulting precision than evaluating EXP(`x`)-1.

#### See also

`EXP`, `LN1P`.

FACT

### `FACT`

    FACT(x)

#### Description

.

`x`: number

#### Note

The domain of this function has been extended using the GAMMA function.

FACTDOUBLE

### `FACTDOUBLE`

    FACTDOUBLE(x)

#### Description

`FACTDOUBLE` function returns the double factorial `x`!!

`x`: non-negative integer

#### Note

If `x` is not an integer, it is truncated. If `x` is negative, `FACTDOUBLE` returns #NUM!

#### See also

`FACT`.

FIB

### `FIB`

    FIB(n)

#### Description

`FIB`(`n`) is the `n`th Fibonacci number.

`n`: positive integer

#### Note

If `n` is not an integer, it is truncated. If it is negative or zero `FIB` returns #NUM!

FLOOR

### `FLOOR`

    FLOOR(x,significance)

#### Description

`FLOOR`(`x`,`significance`) is the nearest multiple of `significance` whose absolute value is at most ABS(`x`)

`x`: number.

`significance`: base multiple (defaults to 1 for `x` > 0 and -1 for `x` <0)

#### See also

`CEIL`, `CEILING`, `ABS`, `INT`, `MOD`.

G_PRODUCT

### `G_PRODUCT`

    G_PRODUCT(x1,x2)

#### Description

.

`x1`: number

`x2`: number

#### Note

Empty cells are ignored and the empty product is 1.

#### See also

`SUM`, `COUNT`.

GAMMA

### `GAMMA`

#### See also

`GAMMALN`.

GAMMALN

### `GAMMALN`

#### See also

`GAMMA`.

GCD

### `GCD`

    GCD(n0,n1)

#### Description

`GCD` calculates the greatest common divisor of the given numbers `n0`,`n1`,..., the greatest integer that is a divisor of each argument.

`n0`: positive integer

`n1`: positive integer

#### Note

If any of the arguments is not an integer, it is truncated.

#### See also

`LCM`.

GD

### `GD`

#### See also

`TAN`, `TANH`.

HYPOT

### `HYPOT`

#### See also

`MIN`, `MAX`.

INT

### `INT`

#### See also

`CEIL`, `CEILING`, `FLOOR`, `ABS`, `MOD`.

LCM

### `LCM`

    LCM(n0,n1)

#### Description

`LCM` calculates the least common multiple of the given numbers `n0`,`n1`,..., the smallest integer that is a multiple of each argment.

`n0`: positive integer

`n1`: positive integer

#### Note

If any of the arguments is not an integer, it is truncated.

#### See also

`GCD`.

LN

### `LN`

    LN(x)

#### Description

.

`x`: positive number

#### Note

If `x` ≤ 0, `LN` returns #NUM! error.

#### See also

`EXP`, `LOG2`, `LOG10`.

LN1P

### `LN1P`

    LN1P(x)

#### Description

`LN1P` calculates LN(1+`x`) but yielding a higher precision than evaluating LN(1+`x`).

`x`: positive number

#### Note

If `x` ≤ -1, LN returns #NUM! error.

#### See also

`EXP`, `LN`, `EXPM1`.

LOG

### `LOG`

    LOG(x,base)

#### Description

.

`x`: positive number

`base`: base of the logarithm, defaults to 10

#### Note

`base` must be positive and not equal to 1.

#### Note

If `x` ≤ 0, `LOG` returns #NUM! error.

#### See also

`LN`, `LOG2`, `LOG10`.

LOG10

### `LOG10`

    LOG10(x)

#### Description

.

`x`: positive number

#### Note

If `x` ≤ 0, `LOG10` returns #NUM!

#### See also

`EXP`, `LOG2`, `LOG`.

LOG2

### `LOG2`

    LOG2(x)

#### Description

.

`x`: positive number

#### Note

If `x` ≤ 0, `LOG2` returns #NUM!

#### See also

`EXP`, `LOG10`, `LOG`.

MDETERM

### `MDETERM`

#### See also

`MMULT`, `MINVERSE`.

MINVERSE

### `MINVERSE`

    MINVERSE(matrix)

#### Description

.

`matrix`: a square matrix

#### Note

If `matrix` is not invertible, `MINVERSE` returns #NUM!

#### Note

If `matrix` does not contain an equal number of columns and rows, `MINVERSE` returns #VALUE!

#### See also

`MMULT`, `MDETERM`.

MMULT

### `MMULT`

#### See also

`TRANSPOSE`, `MINVERSE`.

MOD

### `MOD`

    MOD(x,n)

#### Description

`MOD` function returns the remainder when `x` is divided by `n`.

`x`: integer

`n`: integer

#### Note

If `n` is 0, `MOD` returns #DIV/0!

#### See also

`CEIL`, `CEILING`, `FLOOR`, `ABS`, `INT`, `ABS`.

MROUND

### `MROUND`

    MROUND(x,m)

#### Description

.

`x`: number

`m`: number

#### Note

If `x` and `m` have different sign, `MROUND` returns #NUM!

#### See also

`ROUNDDOWN`, `ROUND`, `ROUNDUP`.

MULTINOMIAL

### `MULTINOMIAL`

#### See also

`COMBIN`, `SUM`.

MUNIT

### `MUNIT`

#### See also

`MMULT`, `MDETERM`, `MINVERSE`.

ODD

### `ODD`

#### See also

`EVEN`.

PI

### `PI`

#### See also

`SQRTPI`.

POWER

### `POWER`

    POWER(x,y)

#### Description

.

`x`: number

`y`: number

#### Note

If both `x` and `y` equal 0, `POWER` returns #NUM!

#### Note

If `x` = 0 and `y` < 0, `POWER` returns #DIV/0!

#### Note

If `x` < 0 and `y` is not an integer, `POWER` returns #NUM!

#### See also

`EXP`.

PRODUCT

### `PRODUCT`

    PRODUCT(values)

#### Description

Product computes the product of all the values and cells referenced in the argument list.

`values`: a list of values to multiply

#### Note

If all cells are empty, the result will be 0.

#### See also

`SUM`, `COUNT`, `G_PRODUCT`.

QUOTIENT

### `QUOTIENT`

    QUOTIENT(numerator,denominator)

#### Description

`QUOTIENT` yields the integer portion of the division `numerator`/`denominator`.

`QUOTIENT` (`numerator`,`denominator`)⨉`denominator`+MOD(`numerator`,`denominator`)=`numerator`

`numerator`: integer

`denominator`: non-zero integer

#### See also

`MOD`.

RADIANS

### `RADIANS`

#### See also

`PI`, `DEGREES`.

ROMAN

### `ROMAN`

    ROMAN(n,type)

#### Description

`ROMAN` returns the arabic number `n` as a roman numeral text.

If `type` is 0 or it is omitted, `ROMAN` returns classic roman numbers.

Type 1 is more concise than classic type, type 2 is more concise than type 1, and type 3 is more concise than type 2. Type 4 is a simplified type.

`n`: non-negative integer

`type`: 0,1,2,3,or 4, defaults to 0

ROUND

### `ROUND`

    ROUND(x,d)

#### Description

If `d` is greater than zero, `x` is rounded to the given number of digits.

If `d` is zero, `x` is rounded to the next integer.

If `d` is less than zero, `x` is rounded to the left of the decimal point

`x`: number

`d`: integer, defaults to 0

#### See also

`ROUNDDOWN`, `ROUNDUP`.

ROUNDDOWN

### `ROUNDDOWN`

    ROUNDDOWN(x,d)

#### Description

If `d` is greater than zero, `x` is rounded toward 0 to the given number of digits.

If `d` is zero, `x` is rounded toward 0 to the next integer.

If `d` is less than zero, `x` is rounded toward 0 to the left of the decimal point

`x`: number

`d`: integer, defaults to 0

#### See also

`ROUND`, `ROUNDUP`.

ROUNDUP

### `ROUNDUP`

    ROUNDUP(x,d)

#### Description

If `d` is greater than zero, `x` is rounded away from 0 to the given number of digits.

If `d` is zero, `x` is rounded away from 0 to the next integer.

If `d` is less than zero, `x` is rounded away from 0 to the left of the decimal point

`x`: number

`d`: integer, defaults to 0

#### See also

`ROUND`, `ROUNDDOWN`, `INT`.

SEC

### `SEC`

#### See also

`SIN`, `COS`, `TAN`, `CSC`, `SINH`, `COSH`, `TANH`, `RADIANS`, `DEGREES`.

SECH

### `SECH`

#### See also

`SIN`, `COS`, `TAN`, `CSC`, `SEC`, `SINH`, `COSH`, `TANH`, `RADIANS`, `DEGREES`.

SERIESSUM

### `SERIESSUM`

#### See also

`COUNT`, `SUM`.

SIGN

### `SIGN`

    SIGN(x)

#### Description

`SIGN` returns 1 if the `x` is positive and it returns -1 if `x` is negative.

`x`: number

#### See also

`ABS`.

SIN

### `SIN`

#### See also

`COS`, `TAN`, `CSC`, `SEC`, `SINH`, `COSH`, `TANH`, `RADIANS`, `DEGREES`.

SINH

### `SINH`

#### See also

`ACOS`, `ASINH`, `DEGREES`, `RADIANS`.

SQRT

### `SQRT`

    SQRT(x)

#### Description

.

`x`: non-negative number

#### Note

If `x` is negative, `SQRT` returns #NUM!

#### See also

`POWER`.

SQRTPI

### `SQRTPI`

#### See also

`PI`.

SUM

### `SUM`

    SUM(values)

#### Description

`SUM` computes the sum of all the values and cells referenced in the argument list.

`values`: a list of values to add

#### See also

`AVERAGE`, `COUNT`.

SUMA

### `SUMA`

    SUMA(area0,area1)

#### Description

Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1).

`area0`: first cell area

`area1`: second cell area

#### See also

`AVERAGE`, `SUM`, `COUNT`.

SUMIF

### `SUMIF`

#### See also

`SUM`, `COUNTIF`.

SUMPRODUCT

### `SUMPRODUCT`

    SUMPRODUCT()

#### Description

Multiplies corresponding data entries in the given arrays or ranges, and then returns the sum of those products.

#### Note

If an entry is not numeric, the value zero is used instead.

#### Note

If arrays or range arguments do not have the same dimensions, return #VALUE! error.

#### Note

SUMPRODUCTs arguments are arrays or ranges. Attempting to use A1:A5>0 will not work, implicit intersection will kick in. Instead use --(A1:A5>0)

#### See also

`SUM`, `PRODUCT`, `G_PRODUCT`.

SUMSQ

### `SUMSQ`

#### See also

`SUM`, `COUNT`.

SUMX2MY2

### `SUMX2MY2`

    SUMX2MY2(array0,array1)

#### Description

`SUMX2MY2` function returns the sum of the difference of squares of corresponding values in two arrays. The equation of `SUMX2MY2` is SUM(x^2-y^2).

`array0`: first cell area

`array1`: second cell area

#### See also

`SUMSQ`, `SUMX2PY2`.

SUMX2PY2

### `SUMX2PY2`

    SUMX2PY2(array0,array1)

#### Description

`SUMX2PY2` function returns the sum of the sum of squares of corresponding values in two arrays. The equation of `SUMX2PY2` is SUM(x^2+y^2).

`array0`: first cell area

`array1`: second cell area

#### Note

If `array0` and `array1` have different number of data points, `SUMX2PY2` returns #N/A.

Strings and empty cells are simply ignored.

#### See also

`SUMSQ`, `SUMX2MY2`.

SUMXMY2

### `SUMXMY2`

    SUMXMY2(array0,array1)

#### Description

`SUMXMY2` function returns the sum of the squares of the differences of corresponding values in two arrays. The equation of `SUMXMY2` is SUM((x-y)^2).

`array0`: first cell area

`array1`: second cell area

#### Note

If `array0` and `array1` have different number of data points, `SUMXMY2` returns #N/A.

Strings and empty cells are simply ignored.

#### See also

`SUMSQ`, `SUMX2MY2`, `SUMX2PY2`.

TAN

### `TAN`

#### See also

`TANH`, `COS`, `COSH`, `SIN`, `SINH`, `DEGREES`, `RADIANS`.

TANH

### `TANH`

#### See also

`TAN`, `SIN`, `SINH`, `COS`, `COSH`, `DEGREES`, `RADIANS`.

TRUNC

### `TRUNC`

    TRUNC(x,x)

#### Description

.

`x`: number

`x`: non-negative integer, defaults to 0

#### Note

If `d` is omitted or negative then it defaults to zero. If it is not an integer then it is truncated to an integer.

#### See also

`INT`.

## Number Theory

ISPRIME

### `ISPRIME`

    ISPRIME(n)

#### Description

`ISPRIME` returns TRUE if `n` is prime and FALSE otherwise.

`n`: positive integer

#### See also

`NT_D`, `NT_SIGMA`.

ITHPRIME

### `ITHPRIME`

    ITHPRIME(i)

#### Description

`ITHPRIME` finds the `i`th prime.

`i`: positive integer

#### See also

`NT_D`, `NT_SIGMA`.

NT_D

### `NT_D`

    NT_D(n)

#### Description

`NT_D` calculates the number of divisors of `n`.

`n`: positive integer

#### See also

`ITHPRIME`, `NT_PHI`, `NT_SIGMA`.

NT_MU

### `NT_MU`

    NT_MU(n)

#### Description

`NT_MU` function (Möbius mu function) returns 0 if `n` is divisible by the square of a prime. Otherwise, if `n` has an odd number of different prime factors, `NT_MU` returns -1, and if `n` has an even number of different prime factors, it returns 1. If `n` = 1, `NT_MU` returns 1.

`n`: positive integer

#### See also

`ITHPRIME`, `NT_PHI`, `NT_SIGMA`, `NT_D`.

NT_PHI

### `NT_PHI`

    NT_PHI(n)

#### Description

.

`n`: positive integer

#### Note

Euler's totient function gives the number of integers less than or equal to `n` that are relatively prime (coprime) to `n`.

#### See also

`NT_D`, `ITHPRIME`, `NT_SIGMA`.

NT_PI

### `NT_PI`

    NT_PI(n)

#### Description

`NT_PI` returns the number of primes less than or equal to `n`.

`n`: positive integer

#### See also

`ITHPRIME`, `NT_PHI`, `NT_D`, `NT_SIGMA`.

NT_SIGMA

### `NT_SIGMA`

    NT_SIGMA(n)

#### Description

`NT_SIGMA` calculates the sum of the divisors of `n`.

`n`: positive integer

#### See also

`NT_D`, `ITHPRIME`, `NT_PHI`.

PFACTOR

### `PFACTOR`

    PFACTOR(n)

#### Description

`PFACTOR` finds the smallest prime factor of its argument.

`n`: positive integer

#### Note

The argument `n` must be at least 2. Otherwise a #VALUE! error is returned.

#### See also

`ITHPRIME`.

## Random Numbers

RAND

### `RAND`

#### See also

`RANDBETWEEN`.

RANDBERNOULLI

### `RANDBERNOULLI`

    RANDBERNOULLI(p)

#### Description

.

`p`: probability of success

#### Note

If `p` < 0 or `p` > 1 `RANDBERNOULLI` returns #NUM!

#### See also

`RAND`, `RANDBETWEEN`.

RANDBETA

### `RANDBETA`

#### See also

`RAND`, `RANDGAMMA`.

RANDBETWEEN

### `RANDBETWEEN`

    RANDBETWEEN(bottom,top)

#### Description

.

`bottom`: lower limit

`top`: upper limit

#### Note

If `bottom` > `top`, `RANDBETWEEN` returns #NUM!

#### See also

`RAND`, `RANDUNIFORM`.

RANDBINOM

### `RANDBINOM`

    RANDBINOM(p,n)

#### Description

.

`p`: probability of success in a single trial

`n`: number of trials

#### Note

If `p` < 0 or `p` > 1 `RANDBINOM` returns #NUM!

#### Note

If `n` < 0 `RANDBINOM` returns #NUM!

#### See also

`RAND`, `RANDBETWEEN`.

RANDCAUCHY

### `RANDCAUCHY`

    RANDCAUCHY(a)

#### Description

.

`a`: scale parameter of the distribution

#### Note

If `a` < 0 `RANDCAUCHY` returns #NUM!

#### See also

`RAND`.

RANDCHISQ

### `RANDCHISQ`

#### See also

`RAND`, `RANDGAMMA`.

RANDDISCRETE

### `RANDDISCRETE`

    RANDDISCRETE(val_range,prob_range)

#### Description

`RANDDISCRETE` returns one of the values in the `val_range`. The probabilities for each value are given in the `prob_range`.

`val_range`: possible values of the random variable

`prob_range`: probabilities of the corresponding values in `val_range`, defaults to equal probabilities

#### Note

If the sum of all values in `prob_range` is not one, `RANDDISCRETE` returns #NUM!

#### Note

If `val_range` and `prob_range` are not the same size, `RANDDISCRETE` returns #NUM!

#### Note

If `val_range` or `prob_range` is not a range, `RANDDISCRETE` returns #VALUE!

#### See also

`RANDBETWEEN`, `RAND`.

RANDEXP

### `RANDEXP`

#### See also

`RAND`, `RANDBETWEEN`.

RANDEXPPOW

### `RANDEXPPOW`

    RANDEXPPOW(a,b)

#### Description

For `b` = 1 the exponential power distribution reduces to the Laplace distribution.

`a`: scale parameter of the exponential power distribution

`b`: exponent of the exponential power distribution

#### Description

For `b` = 2 the exponential power distribution reduces to the normal distribution with σ = a/sqrt(2)

#### See also

`RAND`.

RANDFDIST

### `RANDFDIST`

#### See also

`RAND`, `RANDGAMMA`.

RANDGAMMA

### `RANDGAMMA`

    RANDGAMMA(a,b)

#### Description

.

`a`: parameter of the Gamma distribution

`b`: parameter of the Gamma distribution

#### Note

If `a` ≤ 0, `RANDGAMMA` returns #NUM!

#### See also

`RAND`.

RANDGEOM

### `RANDGEOM`

    RANDGEOM(p)

#### Description

.

`p`: probability of success in a single trial

#### Note

If `p` < 0 or `p` > 1 `RANDGEOM` returns #NUM!

#### See also

`RAND`.

RANDGUMBEL

### `RANDGUMBEL`

    RANDGUMBEL(a,b,type)

#### Description

.

`a`: parameter of the Gumbel distribution

`b`: parameter of the Gumbel distribution

`type`: type of the Gumbel distribution, defaults to 1

#### Note

If `type` is neither 1 nor 2, `RANDGUMBEL` returns #NUM!

#### See also

`RAND`.

RANDHYPERG

### `RANDHYPERG`

#### See also

`RAND`.

RANDLANDAU

### `RANDLANDAU`

#### See also

`RAND`.

RANDLAPLACE

### `RANDLAPLACE`

#### See also

`RAND`.

RANDLEVY

### `RANDLEVY`

    RANDLEVY(c,α,β)

#### Description

For @{α} = 1, @{β}=0, the Lévy distribution reduces to the Cauchy (or Lorentzian) distribution.

`c`: parameter of the Lévy distribution

@{α}: parameter of the Lévy distribution

@{β}: parameter of the Lévy distribution, defaults to 0

#### Description

For @{α} = 2, @{β}=0, the Lévy distribution reduces to the normal distribution.

#### Note

If @{α} ≤ 0 or @{α} > 2, `RANDLEVY` returns #NUM!

#### Note

If @{β} < -1 or @{β} > 1, `RANDLEVY` returns #NUM!

#### See also

`RAND`.

RANDLOG

### `RANDLOG`

    RANDLOG(p)

#### Description

.

`p`: probability

#### Note

If `p` < 0 or `p` > 1 `RANDLOG` returns #NUM!

#### See also

`RAND`.

RANDLOGISTIC

### `RANDLOGISTIC`

#### See also

`RAND`.

RANDLOGNORM

### `RANDLOGNORM`

    RANDLOGNORM(ζ,σ)

#### Description

.

@{ζ}: parameter of the lognormal distribution

@{σ}: standard deviation of the distribution

#### Note

If @{σ} < 0, `RANDLOGNORM` returns #NUM!

#### See also

`RAND`.

RANDNEGBINOM

### `RANDNEGBINOM`

    RANDNEGBINOM(p,n)

#### Description

.

`p`: probability of success in a single trial

`n`: number of failures

#### Note

If `p` < 0 or `p` > 1 `RANDNEGBINOM` returns #NUM!

#### Note

If `n` < 1 `RANDNEGBINOM` returns #NUM!

#### See also

`RAND`, `RANDBETWEEN`.

RANDNORM

### `RANDNORM`

    RANDNORM(μ,σ)

#### Description

.

@{μ}: mean of the ditribution

@{σ}: standard deviation of the distribution

#### Note

If @{σ} < 0, `RANDNORM` returns #NUM!

#### See also

`RAND`.

RANDNORMTAIL

### `RANDNORMTAIL`

    RANDNORMTAIL(a,σ)

#### Description

.

`a`: lower limit of the tail

@{σ}: standard deviation of the normal distribution

#### Note

The method is based on Marsaglia's famous rectangle-wedge-tail algorithm (Ann Math Stat 32, 894-899 (1961)), with this aspect explained in Knuth, v2, 3rd ed, p139, 586 (exercise 11).

#### See also

`RAND`.

RANDPARETO

### `RANDPARETO`

#### See also

`RAND`.

RANDPOISSON

### `RANDPOISSON`

    RANDPOISSON(λ)

#### Description

.

@{λ}: parameter of the Poisson distribution

#### Note

If @{λ} < 0 `RANDPOISSON` returns #NUM!

#### See also

`RAND`, `RANDBETWEEN`.

RANDRAYLEIGH

### `RANDRAYLEIGH`

#### See also

`RAND`.

RANDRAYLEIGHTAIL

### `RANDRAYLEIGHTAIL`

#### See also

`RAND`, `RANDRAYLEIGH`.

RANDTDIST

### `RANDTDIST`

#### See also

`RAND`.

RANDUNIFORM

### `RANDUNIFORM`

    RANDUNIFORM(a,b)

#### Description

.

`a`: lower limit of the uniform distribution

`b`: upper limit of the uniform distribution

#### Note

If `a` > `b` `RANDUNIFORM` returns #NUM!

#### See also

`RANDBETWEEN`, `RAND`.

RANDWEIBULL

### `RANDWEIBULL`

#### See also

`RAND`.

SIMTABLE

### `SIMTABLE`

    SIMTABLE(d1,d2)

#### Description

`SIMTABLE` returns one of the values in the given argument list depending on the round number of the simulation tool. When the simulation tool is not activated, `SIMTABLE` returns `d1`.

With the simulation tool and the `SIMTABLE` function you can test given decision variables. Each `SIMTABLE` function contains the possible values of a simulation variable. In most valid simulation models you should have the same number of values `dN` for all decision variables. If the simulation is run more rounds than there are values defined, `SIMTABLE` returns #N/A! error (e.g. if A1 contains `=`SIMTABLE`(1)' and A2 `=`SIMTABLE`(1,2)', A1 yields #N/A! error on the second round).

The successive use of the simulation tool also requires that you give to the tool at least one input variable having RAND() or any other RAND<distribution name>() function in it. On each round, the simulation tool iterates for the given number of rounds over all the input variables to reevaluate them. On each iteration, the values of the output variables are stored, and when the round is completed, descriptive statistical information is created according to the values.

`d1`: first value

`d2`: second value

## Statistics

AVEDEV

### `AVEDEV`

#### See also

`STDEV`.

AVERAGE

### `AVERAGE`

#### See also

`SUM`, `COUNT`.

AVERAGEA

### `AVERAGEA`

    AVERAGEA(number1,number2)

#### Description

Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.

`number1`: first value

`number2`: second value

#### See also

`AVERAGE`.

BERNOULLI

### `BERNOULLI`

    BERNOULLI(k,p)

#### Description

.

`k`:

`p`: probability of success

#### Note

If `k` != 0 and `k` != 1 this function returns a #NUM! error.

#### Note

If `p` < 0 or `p` > 1 this function returns a #NUM! error.

#### See also

`RANDBERNOULLI`.

BETADIST

### `BETADIST`

    BETADIST(x,alpha,beta,a,b)

#### Description

.

`x`:

`alpha`: scale parameter

`beta`: scale parameter

`a`: optional lower bound, defaults to 0

`b`: optional upper bound, defaults to 1

#### Note

If `x` < `a` or `x` > `b` this function returns a #NUM! error.

#### Note

If `alpha` <= 0 or `beta` <= 0, this function returns a #NUM! error.

#### Note

If `a` >= `b` this function returns a #NUM! error.

#### See also

`BETAINV`.

BETAINV

### `BETAINV`

    BETAINV(p,alpha,beta,a,b)

#### Description

.

`p`: probability

`alpha`: scale parameter

`beta`: scale parameter

`a`: optional lower bound, defaults to 0

`b`: optional upper bound, defaults to 1

#### Note

If `p` < 0 or `p` > 1 this function returns a #NUM! error.

#### Note

If `alpha` <= 0 or `beta` <= 0, this function returns a #NUM! error.

#### Note

If `a` >= `b` this function returns a #NUM! error.

#### See also

`BETADIST`.

BINOMDIST

### `BINOMDIST`

    BINOMDIST(n,trials,p,cumulative)

#### Description

.

`n`: number of successes

`trials`: number of trials

`p`: probability of success in each trial

`cumulative`: whether to evaluate the mass function or the cumulative distribution function

#### Note

If `n` or `trials` are non-integer they are truncated.

#### Note

If `n` < 0 or `trials` < 0 this function returns a #NUM! error.

#### Note

If `n` > `trials` this function returns a #NUM! error.

#### Note

If `p` < 0 or `p` > 1 this function returns a #NUM! error.

#### See also

`POISSON`.

CAUCHY

### `CAUCHY`

    CAUCHY(x,a,cumulative)

#### Description

.

`x`:

`a`: scale parameter

`cumulative`: whether to evaluate the density function or the cumulative distribution function

#### Note

If `a` < 0 this function returns a #NUM! error.

#### Note

If `cumulative` is neither TRUE nor FALSE this function returns a #VALUE! error.

#### See also

`RANDCAUCHY`.

CHIDIST

### `CHIDIST`

    CHIDIST(x,dof)

#### Description

The survival function is 1 minus the cumulative distribution function.

`x`:

`dof`: number of degrees of freedom

#### Note

If `dof` is non-integer it is truncated.

#### Note

If `dof` < 1 this function returns a #NUM! error.

#### See also

`CHIINV`, `CHITEST`.

CHIINV

### `CHIINV`

    CHIINV(p,dof)

#### Description

The survival function is 1 minus the cumulative distribution function.

`p`: probability

`dof`: number of degrees of freedom

#### Note

If `p` < 0 or `p` > 1 or `dof` < 1 this function returns a #NUM! error.

#### See also

`CHIDIST`, `CHITEST`.

CHITEST

### `CHITEST`

    CHITEST(actual_range,theoretical_range)

#### Description

.

`actual_range`: observed data

`theoretical_range`: expected values

#### Note

If the actual range is not an n by 1 or 1 by n range, the returned value appears to have no sensible meaning.

#### See also

`CHIDIST`, `CHIINV`.

CONFIDENCE

### `CONFIDENCE`

    CONFIDENCE(alpha,stddev,size)

#### Description

.

`alpha`: significance level

`stddev`: population standard deviation

`size`: sample size

#### Note

This function requires the usually unknown population standard deviation.

#### Note

If `size` is non-integer it is truncated.

#### Note

If `size` < 0 this function returns a #NUM! error.

#### Note

If `size` is 0 this function returns a #DIV/0! error.

#### See also

`AVERAGE`.

CORREL

### `CORREL`

    CORREL(array1,array2)

#### Description

Strings and empty cells are simply ignored.

`array1`: first data set

`array2`: second data set

#### See also

`COVAR`, `FISHER`, `FISHERINV`.

COUNT

### `COUNT`

#### See also

`AVERAGE`.

COUNTA

### `COUNTA`

#### See also

`AVERAGE`, `COUNT`, `DCOUNT`, `DCOUNTA`, `PRODUCT`, `SUM`.

COVAR

### `COVAR`

    COVAR(array1,array2)

#### Description

Strings and empty cells are simply ignored.

`array1`: first data set

`array2`: set data set

#### See also

`CORREL`, `FISHER`, `FISHERINV`.

CRITBINOM

### `CRITBINOM`

    CRITBINOM(trials,p,alpha)

#### Description

.

`trials`: number of trials

`p`: probability of success in each trial

`alpha`: significance level (area of the tail)

#### Note

If `trials` is a non-integer it is truncated.

#### Note

If `trials` < 0 this function returns a #NUM! error.

#### Note

If `p` < 0 or `p` > 1 this function returns a #NUM! error.

#### Note

If `alpha` < 0 or `alpha` > 1 this function returns a #NUM! error.

#### See also

`BINOMDIST`.

CRONBACH

### `CRONBACH`

#### See also

`VAR`.

DEVSQ

### `DEVSQ`

    DEVSQ(number1,number2)

#### Description

Strings and empty cells are simply ignored.

`number1`: first value

`number2`: second value

#### See also

`STDEV`.

EXPONDIST

### `EXPONDIST`

    EXPONDIST(x,y,cumulative)

#### Description

If `cumulative` is false it will return: `y` * exp (-`y`*`x`),otherwise it will return 1 - exp (-`y`*`x`).

`x`:

`y`: scale parameter

`cumulative`: whether to evaluate the density function or the cumulative distribution function

#### Note

If `x` < 0 or `y` <= 0 this will return an error.

#### See also

`POISSON`.

EXPPOWDIST

### `EXPPOWDIST`

    EXPPOWDIST(x,a,b)

#### Description

This distribution has been recommended for lifetime analysis when a U-shaped hazard function is desired. This corresponds to rapid failure once the product starts to wear out after a period of steady or even improving reliability.

`x`:

`a`: scale parameter

`b`: scale parameter

#### See also

`RANDEXPPOW`.

FDIST

### `FDIST`

    FDIST(x,dof_of_num,dof_of_denom)

#### Description

The survival function is 1 minus the cumulative distribution function.

`x`:

`dof_of_num`: numerator degrees of freedom

`dof_of_denom`: denominator degrees of freedom

#### Note

If `x` < 0 this function returns a #NUM! error.

#### Note

If `dof_of_num` < 1 or `dof_of_denom` < 1, this function returns a #NUM! error.

#### See also

`FINV`.

FINV

### `FINV`

    FINV(p,dof_of_num,dof_of_denom)

#### Description

The survival function is 1 minus the cumulative distribution function.

`p`: probability

`dof_of_num`: numerator degrees of freedom

`dof_of_denom`: denomiantor degrees of freedom

#### Note

If `p` < 0 or `p` > 1 this function returns a #NUM! error.

#### Note

If `dof_of_num` < 1 or `dof_of_denom` < 1 this function returns a #NUM! error.

#### See also

`FDIST`.

FISHER

### `FISHER`

    FISHER(x)

#### Description

.

`x`:

#### Note

If `x` is not a number, this function returns a #VALUE! error.

#### Note

If `x` <= -1 or `x` >= 1, this function returns a #NUM! error.

#### See also

`FISHERINV`, `ATANH`.

FISHERINV

### `FISHERINV`

    FISHERINV(x)

#### Description

.

`x`:

#### Note

If `x` is a non-number this function returns a #VALUE! error.

#### See also

`FISHER`, `TANH`.

FORECAST

### `FORECAST`

    FORECAST(x,known_y's,known_x's)

#### Description

This function estimates a future value according to existing values using simple linear regression.

`x`: x-value whose matching y-value should be forecast

@{known_y's}: known y-values

@{known_x's}: known x-values

#### Note

If `known_x` or `known_y` contains no data entries or different number of data entries, this function returns a #N/A error.

#### Note

If the variance of the `known_x` is zero, this function returns a #DIV/0 error.

#### See also

`INTERCEPT`, `TREND`.

FREQUENCY

### `FREQUENCY`

    FREQUENCY(data_array,bins_array)

#### Description

The results are given as an array.

`data_array`: data values

`bins_array`: array of cutoff values

#### Description

If the `bin_array` is empty, this function returns the number of data points in `data_array`.

FTEST

### `FTEST`

#### See also

`FDIST`, `FINV`.

GAMMADIST

### `GAMMADIST`

    GAMMADIST(x,alpha,beta,cumulative)

#### Description

.

`x`:

`alpha`: scale parameter

`beta`: scale parameter

`cumulative`: whether to evaluate the density function or the cumulative distribution function

#### Note

If `x` < 0 this function returns a #NUM! error.

#### Note

If `alpha` <= 0 or `beta` <= 0, this function returns a #NUM! error.

#### See also

`GAMMAINV`.

GAMMAINV

### `GAMMAINV`

    GAMMAINV(p,alpha,beta)

#### Description

.

`p`: probability

`alpha`: scale parameter

`beta`: scale parameter

#### Note

If `p` < 0 or `p` > 1 this function returns a #NUM! error.

#### Note

If `alpha` <= 0 or `beta` <= 0 this function returns a #NUM! error.

#### See also

`GAMMADIST`.

GEOMDIST

### `GEOMDIST`

    GEOMDIST(k,p,cumulative)

#### Description

.

`k`: number of trials

`p`: probability of success in any trial

`cumulative`: whether to evaluate the mass function or the cumulative distribution function

#### Note

If `k` < 0 this function returns a #NUM! error.

#### Note

If `p` < 0 or `p` > 1 this function returns a #NUM! error.

#### Note

If `cumulative` is neither TRUE nor FALSE this function returns a #VALUE! error.

#### See also

`RANDGEOM`.

GEOMEAN

### `GEOMEAN`

    GEOMEAN(number1,number2)

#### Description

The geometric mean is equal to the Nth root of the product of the N values.

`number1`: first value

`number2`: second value

#### See also

`AVERAGE`, `HARMEAN`, `MEDIAN`, `MODE`, `TRIMMEAN`.

GROWTH

### `GROWTH`

    GROWTH(known_y's,known_x's,new_x's,const)

#### Description

`GROWTH` function applies the ``least squares'' method to fit an exponential curve to your data and predicts the exponential growth by using this curve.

@{known_y's}: known y-values

@{known_x's}: known x-values; if `known_x`'s is omitted, an array {1, 2, 3, ...} is used.

@{new_x's}: x-values for which you want to estimate the y-values; defaults to `known_x`'s

`const`: if this is false the line will be forced to go through the origin; defaults to TRUE

#### Description

`GROWTH` returns an array having one column and a row for each data point in `new_x`.

#### Note

If `known_y`'s and `known_x`'s have unequal number of data points, this function returns a #NUM! error.

#### See also

`LOGEST`, `GROWTH`, `TREND`.

HARMEAN

### `HARMEAN`

    HARMEAN(number1,number2)

#### Description

The harmonic mean of N data points is N divided by the sum of the reciprocals of the data points).

`number1`: first value

`number2`: second value

#### See also

`AVERAGE`, `GEOMEAN`, `MEDIAN`, `MODE`, `TRIMMEAN`.

HYPGEOMDIST

### `HYPGEOMDIST`

    HYPGEOMDIST(x,n,M,N,cumulative)

#### Description

.

`x`: number of successes

`n`: sample size

`M`: number of possible successes in the population

`N`: population size

`cumulative`: whether to evaluate the mass function or the cumulative distribution function

#### Note

If `x`,`n`,`M` or `N` is a non-integer it is truncated.

#### Note

If `x`,`n`,`M` or `N` < 0 this function returns a #NUM! error.

#### Note

If `x` > `M` or `n` > `N` this function returns a #NUM! error.

#### See also

`BINOMDIST`, `POISSON`.

INTERCEPT

### `INTERCEPT`

    INTERCEPT(known_y's,known_x's)

#### Description

.

@{known_y's}: known y-values

@{known_x's}: known x-values

#### Note

If `known_x` or `known_y` contains no data entries or different number of data entries, this function returns a #N/A error.

#### Note

If the variance of the `known_x` is zero, this function returns #DIV/0 error.

#### See also

`FORECAST`, `TREND`.

KURT

### `KURT`

    KURT(number1,number2)

#### Description

Strings and empty cells are simply ignored.

`number1`: first value

`number2`: second value

#### Note

This is only meaningful if the underlying distribution really has a fourth moment. The kurtosis is offset by three such that a normal distribution will have zero kurtosis.

#### Note

If fewer than four numbers are given or all of them are equal this function returns a #DIV/0! error.

#### See also

`AVERAGE`, `VAR`, `SKEW`, `KURTP`.

KURTP

### `KURTP`

    KURTP(number1,number2)

#### Description

Strings and empty cells are simply ignored.

`number1`: first value

`number2`: second value

#### Note

If fewer than two numbers are given or all of them are equal this function returns a #DIV/0! error.

#### See also

`AVERAGE`, `VARP`, `SKEWP`, `KURT`.

LANDAU

### `LANDAU`

#### See also

`RANDLANDAU`.

LAPLACE

### `LAPLACE`

#### See also

`RANDLAPLACE`.

LARGE

### `LARGE`

    LARGE(data,k)

#### Description

.

`data`: data set

`k`: which value to find

#### Note

If data set is empty this function returns a #NUM! error.

#### Note

If `k` <= 0 or `k` is greater than the number of data items given this function returns a #NUM! error.

#### See also

`PERCENTILE`, `PERCENTRANK`, `QUARTILE`, `SMALL`.

LINEST

### `LINEST`

    LINEST(known_y's,known_x's,affine,stats)

#### Description

This function returns an array with the first row giving the regression coefficients for the independent variables x_m, x_(m-1),...,x_2, x_1 followed by the y-intercept if `affine` is true.

@{known_y's}: vector of values of dependent variable.

@{known_x's}: array of values of independent variables, defaults to a single vector 1,...,n.

`affine`: if true, the model contains a constant term, defaults to true.

`stats`: if true, some additional statistics are provided, defaults to false

#### Description

If `stats` is true, the second row contains the corresponding standard errors of the regression coefficients.In this case, the third row contains the R^2 value and the standard error for the predicted value. The fourth row contains the observed F value and its degrees of freedom. Finally, the fifth row contains the regression sum of squares and the residual sum of squares.

#### Description

If `affine` is false, R^2 is the uncentered version of the coefficient of determination; that is the proportion of the sum of squares explained by the model.

#### Note

If the length of @{known_y's} does not match the corresponding length of @{known_x's}, this function returns a #NUM! error.

#### See also

`LOGEST`, `TREND`.

LOGEST

### `LOGEST`

    LOGEST(known_y's,known_x's,const,stat)

#### Description

`LOGEST` function applies the ``least squares'' method to fit an exponential curve of the form y = b * m{1}^x{1} * m{2}^x{2}... to your data.

@{known_y's}: known y-values

@{known_x's}: known x-values; if `known_x`'s is omitted, an array {1, 2, 3, ...} is used.

`const`: if this is false the line will be forced to go through (0,1); defaults to TRUE

`stat`: If `stat` is TRUE, extra statistical information will be returned; defaults to FALSE.

#### Description

`LOGEST` returns an array { m{n},m{n-1}, ...,m{1},b }.

#### Note

Extra statistical information is written below the regression line coefficients in the result array. Extra statistical information consists of four rows of data. In the first row the standard error values for the coefficients m1, (m2, ...), b are represented. The second row contains the square of R and the standard error for the y estimate. The third row contains the F-observed value and the degrees of freedom. The last row contains the regression sum of squares and the residual sum of squares.

#### Note

If `known_y`'s and `known_x`'s have unequal number of data points, this function returns a #NUM! error.

#### See also

`GROWTH`, `TREND`.

LOGFIT

### `LOGFIT`

    LOGFIT(known_y's,known_x's)

#### Description

`LOGFIT` function applies the ``least squares'' method to fit the logarithmic equationy = a + b * ln(sign * (x - c)) , sign = +1 or -1 to your data. The graph of the equation is a logarithmic curve moved horizontally by c and possibly mirrored across the y-axis (if sign = -1).

@{known_y's}: known y-values

@{known_x's}: known x-values

#### Description

`LOGFIT` returns an array having five columns and one row. `Sign' is given in the first column, `a', `b', and `c' are given in columns 2 to 4. Column 5 holds the sum of squared residuals.

#### Note

An error is returned when there are less than 3 different x's or y's, or when the shape of the point cloud is too different from a ``logarithmic'' one.

#### Note

You can use the above formula = a + b * ln(sign * (x - c)) or rearrange it to = (exp((y - a) / b)) / sign + c to compute unknown y's or x's, respectively.

#### Note

This is non-linear fitting by trial-and-error. The accuracy of `c' is: width of x-range -> rounded to the next smaller (10^integer), times 0.000001. There might be cases in which the returned fit is not the best possible.

#### See also

`LOGREG`, `LINEST`, `LOGEST`.

LOGINV

### `LOGINV`

    LOGINV(p,mean,stddev)

#### Description

.

`p`: probability

`mean`: mean

`stddev`: standard deviation

#### Note

If `p` < 0 or `p` > 1 or `stddev` <= 0 this function returns #NUM! error.

#### See also

`EXP`, `LN`, `LOG`, `LOG10`, `LOGNORMDIST`.

LOGISTIC

### `LOGISTIC`

#### See also

`RANDLOGISTIC`.

LOGNORMDIST

### `LOGNORMDIST`

    LOGNORMDIST(x,mean,stddev)

#### Description

.

`x`:

`mean`: mean

`stddev`: standard deviation

#### Note

If `stddev` = 0 `LOGNORMDIST` returns a #DIV/0! error.

#### Note

If `x` <= 0, `mean` < 0 or `stddev` <= 0 this function returns a #NUM! error.

#### See also

`NORMDIST`.

LOGREG

### `LOGREG`

    LOGREG(known_y's,known_x's,const,stat)

#### Description

`LOGREG` function transforms your x's to z=ln(x) and applies the ``least squares'' method to fit the linear equation y = m * z + b to your y's and z's --- equivalent to fitting the equation y = m * ln(x) + b to y's and x's. `LOGREG` returns an array having two columns and one row. m is given in the first column and b in the second.

@{known_y's}: known y-values

@{known_x's}: known x-values; if `known_x`'s is omitted, an array {1, 2, 3, ...} is used.

`const`: If this is FALSE, the curve will be forced to go through [1; 0], i.e., b will be zero. The default is TRUE.

`stat`: If `stat` is TRUE, extra statistical information will be returned; defaults to FALSE.

#### Description

Any extra statistical information is written below m and b in the result array. This extra statistical information consists of four rows of data: In the first row the standard error values for the coefficients m, b are given. The second row contains the square of R and the standard error for the y estimate. The third row contains the F-observed value and the degrees of freedom. The last row contains the regression sum of squares and the residual sum of squares.The default of `stat` is FALSE.

#### Note

If `known_y`'s and `known_x`'s have unequal number of data points, this function returns a #NUM! error.

#### See also

`LOGFIT`, `LINEST`, `LOGEST`.

MAX

### `MAX`

#### See also

`MIN`, `ABS`.

MAXA

### `MAXA`

    MAXA(number1,number2)

#### Description

Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.

`number1`: first value

`number2`: second value

#### See also

`MAX`, `MINA`.

MEDIAN

### `MEDIAN`

    MEDIAN(number1,number2)

#### Description

Strings and empty cells are simply ignored.

`number1`: first value

`number2`: second value

#### Note

If even numbers are given `MEDIAN` returns the average of the two numbers in the center.

#### See also

`AVERAGE`, `COUNT`, `COUNTA`, `DAVERAGE`, `MODE`, `SSMEDIAN`, `SUM`.

MIN

### `MIN`

#### See also

`MAX`, `ABS`.

MINA

### `MINA`

    MINA(number1,number2)

#### Description

Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.

`number1`: first value

`number2`: second value

#### See also

`MIN`, `MAXA`.

MODE

### `MODE`

    MODE(number1,number2)

#### Description

Strings and empty cells are simply ignored.

`number1`: first value

`number2`: second value

#### Description

If the data set does not contain any duplicates this function returns a #N/A error.

#### See also

`AVERAGE`, `MEDIAN`.

NEGBINOMDIST

### `NEGBINOMDIST`

    NEGBINOMDIST(f,t,p)

#### Description

.

`f`: number of failures

`t`: threshold number of successes

`p`: probability of a success

#### Note

If `f` or `t` is a non-integer it is truncated.

#### Note

If (`f` + `t` -1) <= 0 this function returns a #NUM! error.

#### Note

If `p` < 0 or `p` > 1 this functions returns a #NUM! error.

#### See also

`BINOMDIST`, `COMBIN`, `FACT`, `HYPGEOMDIST`, `PERMUT`.

NORMDIST

### `NORMDIST`

    NORMDIST(x,mean,stddev,cumulative)

#### Description

.

`x`:

`mean`: mean of the distribution

`stddev`: standard deviation of the distribution

`cumulative`: whether to evaluate the density function or the cumulative distribution function

#### Note

If `stddev` is 0 this function returns a #DIV/0! error.

#### See also

`POISSON`.

NORMINV

### `NORMINV`

    NORMINV(p,mean,stddev)

#### Description

.

`p`: probability

`mean`: mean of the distribution

`stddev`: standard deviation of the distribution

#### Note

If `p` < 0 or `p` > 1 or `stddev` <= 0 this function returns a #NUM! error.

#### See also

`NORMDIST`, `NORMSDIST`, `NORMSINV`, `STANDARDIZE`, `ZTEST`.

NORMSDIST

### `NORMSDIST`

#### See also

`NORMDIST`.

NORMSINV

### `NORMSINV`

    NORMSINV(p)

#### Description

.

`p`: given probability

#### Note

If `p` < 0 or `p` > 1 this function returns #NUM! error.

#### See also

`NORMDIST`, `NORMINV`, `NORMSDIST`, `STANDARDIZE`, `ZTEST`.

PARETO

### `PARETO`

#### See also

`RANDPARETO`.

PEARSON

### `PEARSON`

    PEARSON(array1,array2)

#### Description

Strings and empty cells are simply ignored.

`array1`: first component values

`array2`: second component values

#### See also

`INTERCEPT`, `LINEST`, `RSQ`, `SLOPE`, `STEYX`.

PERCENTILE

### `PERCENTILE`

    PERCENTILE(array,k)

#### Description

.

`array`: data points

`k`: which percentile to calculate

#### Note

If `array` is empty, this function returns a #NUM! error.

#### Note

If `k` < 0 or `k` > 1, this function returns a #NUM! error.

#### See also

`QUARTILE`.

PERCENTRANK

### `PERCENTRANK`

    PERCENTRANK(array,x,significance)

#### Description

.

`array`: range of numeric values

`x`: data point to be ranked

`significance`: number of significant digits, defaults to 3

#### Note

If `array` contains no data points, this function returns a #NUM! error.

#### Note

If `significance` is less than one, this function returns a #NUM! error.

#### Note

If `x` exceeds the largest value or is less than the smallest value in `array`, this function returns a #NUM! error.

#### Note

If `x` does not match any of the values in `array` or `x` matches more than once, this function interpolates the returned value.

#### See also

`LARGE`, `MAX`, `MEDIAN`, `MIN`, `PERCENTILE`, `QUARTILE`, `SMALL`.

PERMUT

### `PERMUT`

    PERMUT(n,k)

#### Description

.

`n`: size of the base set

`k`: number of elements in each permutation

#### Note

If `n` = 0 this function returns a #NUM! error.

#### Note

If `n` < `k` this function returns a #NUM! error.

#### See also

`COMBIN`.

PERMUTATIONA

### `PERMUTATIONA`

    PERMUTATIONA(x,y)

#### Description

.

`x`: total number of objects

`y`: number of selected objects

#### Note

If both `x` and `y` equal 0, `PERMUTATIONA` returns 1.

#### Note

If `x` < 0 or `y` < 0, `PERMUTATIONA` returns #NUM!

#### Note

If `x` or `y` are not integers, they are truncated

#### See also

`POWER`.

POISSON

### `POISSON`

    POISSON(x,mean,cumulative)

#### Description

.

`x`: number of events

`mean`: mean of the distribution

`cumulative`: whether to evaluate the mass function or the cumulative distribution function

#### Note

If `x` is a non-integer it is truncated.

#### Note

If `x` < 0 this function returns a #NUM! error.

#### Note

If `mean` <= 0 `POISSON` returns the #NUM! error.

#### See also

`NORMDIST`, `WEIBULL`.

PROB

### `PROB`

    PROB(x_range,prob_range,lower_limit,upper_limit)

#### Description

.

`x_range`: possible values

`prob_range`: probabilities of the corresponding values

`lower_limit`: lower interval limit

`upper_limit`: upper interval limit, defaults to `lower_limit`

#### Note

If the sum of the probabilities in `prob_range` is not equal to 1 this function returns a #NUM! error.

#### Note

If any value in `prob_range` is <=0 or > 1, this function returns a #NUM! error.

#### Note

If `x_range` and `prob_range` contain a different number of data entries, this function returns a #N/A error.

#### See also

`BINOMDIST`, `CRITBINOM`.

QUARTILE

### `QUARTILE`

    QUARTILE(array,quart)

#### Description

.

`array`: data points

`quart`: A number from 0 to 4, indicating which quartile to calculate. A value of 0 causes the smallest value of `array` to be returned.

#### Note

If `array` is empty, this function returns a #NUM! error.

#### Note

If `quart` < 0 or `quart` > 4, this function returns a #NUM! error.

#### Note

If `quart` is not an integer, it is truncated.

#### See also

`LARGE`, `MAX`, `MEDIAN`, `MIN`, `PERCENTILE`, `SMALL`.

R.DBETA

### `R.DBETA`

    R.DBETA(x,a,b,give_log)

#### Description

This function returns the probability density function of the beta distribution.

`x`: observation

`a`: the first shape parameter of the distribution

`b`: the second scale parameter of the distribution

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PBETA`, `R.QBETA`.

R.DBINOM

### `R.DBINOM`

    R.DBINOM(x,n,psuc,give_log)

#### Description

This function returns the probability density function of the binomial distribution.

`x`: observation

`n`: the number of trials

`psuc`: the probability of success in each trial

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PBINOM`, `R.QBINOM`.

R.DCAUCHY

### `R.DCAUCHY`

    R.DCAUCHY(x,location,scale,give_log)

#### Description

This function returns the probability density function of the Cauchy distribution.

`x`: observation

`location`: the center of the distribution

`scale`: the scale parameter of the distribution

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PCAUCHY`, `R.QCAUCHY`.

R.DCHISQ

### `R.DCHISQ`

    R.DCHISQ(x,df,give_log)

#### Description

This function returns the probability density function of the chi-square distribution.

`x`: observation

`df`: the number of degrees of freedom of the distribution

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PCHISQ`, `R.QCHISQ`.

R.DEXP

### `R.DEXP`

    R.DEXP(x,scale,give_log)

#### Description

This function returns the probability density function of the exponential distribution.

`x`: observation

`scale`: the scale parameter of the distribution

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PEXP`, `R.QEXP`.

R.DF

### `R.DF`

    R.DF(x,n1,n2,give_log)

#### Description

This function returns the probability density function of the F distribution.

`x`: observation

`n1`: the first number of degrees of freedom of the distribution

`n2`: the second number of degrees of freedom of the distribution

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PF`, `R.QF`.

R.DGAMMA

### `R.DGAMMA`

    R.DGAMMA(x,shape,scale,give_log)

#### Description

This function returns the probability density function of the gamma distribution.

`x`: observation

`shape`: the shape parameter of the distribution

`scale`: the scale parameter of the distribution

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PGAMMA`, `R.QGAMMA`.

R.DGEOM

### `R.DGEOM`

    R.DGEOM(x,psuc,give_log)

#### Description

This function returns the probability density function of the geometric distribution.

`x`: observation

`psuc`: the probability of success in each trial

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PGEOM`, `R.QGEOM`.

R.DHYPER

### `R.DHYPER`

    R.DHYPER(x,r,b,n,give_log)

#### Description

This function returns the probability density function of the hypergeometric distribution.

`x`: observation

`r`: the number of red balls

`b`: the number of black balls

`n`: the number of balls drawn

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PHYPER`, `R.QHYPER`.

R.DLNORM

### `R.DLNORM`

    R.DLNORM(x,logmean,logsd,give_log)

#### Description

This function returns the probability density function of the log-normal distribution.

`x`: observation

`logmean`: mean of the underlying normal distribution

`logsd`: standard deviation of the underlying normal distribution

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PLNORM`, `R.QLNORM`.

R.DNBINOM

### `R.DNBINOM`

    R.DNBINOM(x,n,psuc,give_log)

#### Description

This function returns the probability density function of the negative binomial distribution.

`x`: observation

`n`: the number of trials

`psuc`: the probability of success in each trial

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PNBINOM`, `R.QNBINOM`.

R.DNORM

### `R.DNORM`

    R.DNORM(x,mu,sigma,give_log)

#### Description

This function returns the probability density function of the normal distribution.

`x`: observation

`mu`: mean of the distribution

`sigma`: standard deviation of the distribution

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PNORM`, `R.QNORM`.

R.DPOIS

### `R.DPOIS`

    R.DPOIS(x,lambda,give_log)

#### Description

This function returns the probability density function of the Poisson distribution.

`x`: observation

`lambda`: the mean of the distribution

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PPOIS`, `R.QPOIS`.

R.DT

### `R.DT`

    R.DT(x,n,give_log)

#### Description

This function returns the probability density function of the Student t distribution.

`x`: observation

`n`: the number of degrees of freedom of the distribution

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PT`, `R.QT`.

R.DWEIBULL

### `R.DWEIBULL`

    R.DWEIBULL(x,shape,scale,give_log)

#### Description

This function returns the probability density function of the Weibull distribution.

`x`: observation

`shape`: the shape parameter of the distribution

`scale`: the scale parameter of the distribution

`give_log`: if true, log of the result will be returned instead

#### See also

`R.PWEIBULL`, `R.QWEIBULL`.

R.PBETA

### `R.PBETA`

    R.PBETA(x,a,b,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the beta distribution.

`x`: observation

`a`: the first shape parameter of the distribution

`b`: the second scale parameter of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DBETA`, `R.QBETA`.

R.PBINOM

### `R.PBINOM`

    R.PBINOM(x,n,psuc,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the binomial distribution.

`x`: observation

`n`: the number of trials

`psuc`: the probability of success in each trial

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DBINOM`, `R.QBINOM`.

R.PCAUCHY

### `R.PCAUCHY`

    R.PCAUCHY(x,location,scale,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the Cauchy distribution.

`x`: observation

`location`: the center of the distribution

`scale`: the scale parameter of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DCAUCHY`, `R.QCAUCHY`.

R.PCHISQ

### `R.PCHISQ`

    R.PCHISQ(x,df,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the chi-square distribution.

`x`: observation

`df`: the number of degrees of freedom of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DCHISQ`, `R.QCHISQ`.

R.PEXP

### `R.PEXP`

    R.PEXP(x,scale,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the exponential distribution.

`x`: observation

`scale`: the scale parameter of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DEXP`, `R.QEXP`.

R.PF

### `R.PF`

    R.PF(x,n1,n2,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the F distribution.

`x`: observation

`n1`: the first number of degrees of freedom of the distribution

`n2`: the second number of degrees of freedom of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DF`, `R.QF`.

R.PGAMMA

### `R.PGAMMA`

    R.PGAMMA(x,shape,scale,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the gamma distribution.

`x`: observation

`shape`: the shape parameter of the distribution

`scale`: the scale parameter of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DGAMMA`, `R.QGAMMA`.

R.PGEOM

### `R.PGEOM`

    R.PGEOM(x,psuc,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the geometric distribution.

`x`: observation

`psuc`: the probability of success in each trial

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DGEOM`, `R.QGEOM`.

R.PHYPER

### `R.PHYPER`

    R.PHYPER(x,r,b,n,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the hypergeometric distribution.

`x`: observation

`r`: the number of red balls

`b`: the number of black balls

`n`: the number of balls drawn

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DHYPER`, `R.QHYPER`.

R.PLNORM

### `R.PLNORM`

    R.PLNORM(x,logmean,logsd,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the log-normal distribution.

`x`: observation

`logmean`: mean of the underlying normal distribution

`logsd`: standard deviation of the underlying normal distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DLNORM`, `R.QLNORM`.

R.PNBINOM

### `R.PNBINOM`

    R.PNBINOM(x,n,psuc,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the negative binomial distribution.

`x`: observation

`n`: the number of trials

`psuc`: the probability of success in each trial

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DNBINOM`, `R.QNBINOM`.

R.PNORM

### `R.PNORM`

    R.PNORM(x,mu,sigma,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the normal distribution.

`x`: observation

`mu`: mean of the distribution

`sigma`: standard deviation of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DNORM`, `R.QNORM`.

R.PPOIS

### `R.PPOIS`

    R.PPOIS(x,lambda,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the Poisson distribution.

`x`: observation

`lambda`: the mean of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DPOIS`, `R.QPOIS`.

R.PT

### `R.PT`

    R.PT(x,n,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the Student t distribution.

`x`: observation

`n`: the number of degrees of freedom of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DT`, `R.QT`.

R.PWEIBULL

### `R.PWEIBULL`

    R.PWEIBULL(x,shape,scale,lower_tail,log_p)

#### Description

This function returns the cumulative distribution function of the Weibull distribution.

`x`: observation

`shape`: the shape parameter of the distribution

`scale`: the scale parameter of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DWEIBULL`, `R.QWEIBULL`.

R.QBETA

### `R.QBETA`

    R.QBETA(p,a,b,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the beta distribution.

`p`: probability

`a`: the first shape parameter of the distribution

`b`: the second scale parameter of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DBETA`, `R.PBETA`.

R.QBINOM

### `R.QBINOM`

    R.QBINOM(x,n,psuc,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the binomial distribution.

`x`: observation

`n`: the number of trials

`psuc`: the probability of success in each trial

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DBINOM`, `R.PBINOM`.

R.QCAUCHY

### `R.QCAUCHY`

    R.QCAUCHY(p,location,scale,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the Cauchy distribution.

`p`: probability

`location`: the center of the distribution

`scale`: the scale parameter of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DCAUCHY`, `R.PCAUCHY`.

R.QCHISQ

### `R.QCHISQ`

    R.QCHISQ(p,df,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the chi-square distribution.

`p`: probability

`df`: the number of degrees of freedom of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DCHISQ`, `R.PCHISQ`.

R.QEXP

### `R.QEXP`

    R.QEXP(p,scale,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the exponential distribution.

`p`: probability

`scale`: the scale parameter of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DEXP`, `R.PEXP`.

R.QF

### `R.QF`

    R.QF(x,n1,n2,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the F distribution.

`x`: observation

`n1`: the first number of degrees of freedom of the distribution

`n2`: the second number of degrees of freedom of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DF`, `R.PF`.

R.QGAMMA

### `R.QGAMMA`

    R.QGAMMA(p,shape,scale,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the gamma distribution.

`p`: probability

`shape`: the shape parameter of the distribution

`scale`: the scale parameter of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DGAMMA`, `R.PGAMMA`.

R.QGEOM

### `R.QGEOM`

    R.QGEOM(p,psuc,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the geometric distribution.

`p`: probability

`psuc`: the probability of success in each trial

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DGEOM`, `R.PGEOM`.

R.QHYPER

### `R.QHYPER`

    R.QHYPER(p,r,b,n,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the hypergeometric distribution.

`p`: probability

`r`: the number of red balls

`b`: the number of black balls

`n`: the number of balls drawn

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DHYPER`, `R.PHYPER`.

R.QLNORM

### `R.QLNORM`

    R.QLNORM(x,logmean,logsd,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the log-normal distribution.

`x`: observation

`logmean`: mean of the underlying normal distribution

`logsd`: standard deviation of the underlying normal distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DLNORM`, `R.PLNORM`.

R.QNBINOM

### `R.QNBINOM`

    R.QNBINOM(p,n,psuc,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the negative binomial distribution.

`p`: probability

`n`: the number of trials

`psuc`: the probability of success in each trial

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DNBINOM`, `R.PNBINOM`.

R.QNORM

### `R.QNORM`

    R.QNORM(p,mu,sigma,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the normal distribution.

`p`: probability

`mu`: mean of the distribution

`sigma`: standard deviation of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DNORM`, `R.PNORM`.

R.QPOIS

### `R.QPOIS`

    R.QPOIS(p,lambda,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the Poisson distribution.

`p`: probability

`lambda`: the mean of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DPOIS`, `R.PPOIS`.

R.QT

### `R.QT`

    R.QT(p,n,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the Student t distribution.

`p`: probability

`n`: the number of degrees of freedom of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DT`, `R.PT`.

R.QWEIBULL

### `R.QWEIBULL`

    R.QWEIBULL(p,shape,scale,lower_tail,log_p)

#### Description

This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the Weibull distribution.

`p`: probability

`shape`: the shape parameter of the distribution

`scale`: the scale parameter of the distribution

`lower_tail`: if true (the default), the lower tail of the distribution is considered

`log_p`: if true, log of the probability is used

#### See also

`R.DWEIBULL`, `R.PWEIBULL`.

RANK

### `RANK`

#### See also

`PERCENTRANK`.

RAYLEIGH

### `RAYLEIGH`

#### See also

`RANDRAYLEIGH`.

RAYLEIGHTAIL

### `RAYLEIGHTAIL`

#### See also

`RANDRAYLEIGHTAIL`.

RSQ

### `RSQ`

    RSQ(array1,array2)

#### Description

Strings and empty cells are simply ignored.

`array1`: first component values

`array2`: second component values

#### See also

`CORREL`, `COVAR`, `INTERCEPT`, `LINEST`, `LOGEST`, `PEARSON`, `SLOPE`, `STEYX`, `TREND`.

SKEW

### `SKEW`

    SKEW(number1,number2)

#### Description

Strings and empty cells are simply ignored.

`number1`: first value

`number2`: second value

#### Note

This is only meaningful if the underlying distribution really has a third moment. The skewness of a symmetric (e.g., normal) distribution is zero.

#### Note

If less than three numbers are given, this function returns a #DIV/0! error.

#### See also

`AVERAGE`, `VAR`, `SKEWP`, `KURT`.

SKEWP

### `SKEWP`

    SKEWP(number1,number2)

#### Description

Strings and empty cells are simply ignored.

`number1`: first value

`number2`: second value

#### Note

If less than two numbers are given, `SKEWP` returns a #DIV/0! error.

#### See also

`AVERAGE`, `VARP`, `SKEW`, `KURTP`.

SLOPE

### `SLOPE`

    SLOPE(known_y's,known_x's)

#### Description

.

@{known_y's}: known y-values

@{known_x's}: known x-values

#### Note

If `known_x` or `known_y` contains no data entries or different number of data entries, this function returns a #N/A error.

#### Note

If the variance of the `known_x` is zero, this function returns #DIV/0 error.

#### See also

`STDEV`, `STDEVPA`.

SMALL

### `SMALL`

    SMALL(data,k)

#### Description

.

`data`: data set

`k`: which value to find

#### Note

If data set is empty this function returns a #NUM! error.

#### Note

If `k` <= 0 or `k` is greater than the number of data items given this function returns a #NUM! error.

#### See also

`PERCENTILE`, `PERCENTRANK`, `QUARTILE`, `LARGE`.

SSMEDIAN

### `SSMEDIAN`

    SSMEDIAN(array,interval)

#### Description

The data points given in `array` are assumed to be the result of grouping data into intervals of length `interval`

`array`: data set

`interval`: length of each grouping interval, defaults to 1

#### Note

If `array` is empty, this function returns a #NUM! error.

#### Note

If `interval` <= 0, this function returns a #NUM! error.`SSMEDIAN` does not check whether the data points are at least `interval` apart.

#### See also

`MEDIAN`.

STANDARDIZE

### `STANDARDIZE`

    STANDARDIZE(x,mean,stddev)

#### Description

.

`x`: value

`mean`: mean of the original distribution

`stddev`: standard deviation of the original distribution

#### Note

If `stddev` is 0 this function returns a #DIV/0! error.

#### See also

`AVERAGE`.

STDEV

### `STDEV`

    STDEV(area1,area2)

#### Description

`STDEV` is also known as the N-1-standard deviation. Under reasonable conditions, it is the maximum-likelihood estimator for the true population standard deviation.

`area1`: first cell area

`area2`: second cell area

#### Description

To obtain the population standard deviation of a whole population use STDEVP.

#### See also

`AVERAGE`, `DSTDEV`, `DSTDEVP`, `STDEVA`, `STDEVPA`, `VAR`.

STDEVA

### `STDEVA`

    STDEVA(area1,area2)

#### Description

`STDEVA` is also known as the N-1-standard deviation. Under reasonable conditions, it is the maximum-likelihood estimator for the true population standard deviation.

`area1`: first cell area

`area2`: second cell area

#### Description

To obtain the population standard deviation of a whole population use STDEVPA.

#### Description

Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.

#### See also

`STDEV`, `STDEVPA`.

STDEVP

### `STDEVP`

    STDEVP(area1,area2)

#### Description

This is also known as the N-standard deviation

`area1`: first cell area

`area2`: second cell area

#### See also

`STDEV`, `STDEVA`, `STDEVPA`.

STDEVPA

### `STDEVPA`

    STDEVPA(area1,area2)

#### Description

This is also known as the N-standard deviation

`area1`: first cell area

`area2`: second cell area

#### Description

Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.

#### See also

`STDEVA`, `STDEVP`.

STEYX

### `STEYX`

    STEYX(known_y's,known_x's)

#### Description

.

@{known_y's}: known y-values

@{known_x's}: known x-values

#### Note

If `known_y`'s and `known_x`'s are empty or have a different number of arguments then this function returns a #N/A error.

#### See also

`PEARSON`, `RSQ`, `SLOPE`.

SUBTOTAL

### `SUBTOTAL`

#### See also

`COUNT`, `SUM`.

TDIST

### `TDIST`

    TDIST(x,dof,tails)

#### Description

The survival function is 1 minus the cumulative distribution function.

`x`:

`dof`: number of degrees of freedom

`tails`: 1 or 2. If this is 2, `x` is replaced by the absolute value and the returned value is multiplied by 2

#### Note

If `dof` < 1 this function returns a #NUM! error.

#### Note

If `tails` is neither 1 or 2 this function returns a #NUM! error.

#### Note

The parameterization of this function is different from what is used for, e.g., NORMSDIST. This is a common source of mistakes, but necessary for compatibility.

#### Description

This function is Excel compatible for non-negative `x`.

#### See also

`TINV`, `TTEST`.

TINV

### `TINV`

    TINV(p,dof)

#### Description

The survival function is 1 minus the cumulative distribution function.

`p`: probability

`dof`: number of degrees of freedom

#### Note

If `p` < 0 or `p` > 1 or `dof` < 1 this function returns a #NUM! error.

#### Note

The parameterization of this function is different from what is used for, e.g., NORMSINV. This is a common source of mistakes, but necessary for compatibility.

#### See also

`TDIST`, `TTEST`.

TREND

### `TREND`

    TREND(known_y's,known_x's,new_x's,const)

#### Description

.

@{known_y's}: known y-values

@{known_x's}: known x-values; if `known_x`'s is omitted, an array {1, 2, 3, ...} is used.

@{new_x's}: x-values for which you want to estimate the y-values; defaults to `known_x`'s

`const`: if this is false the line will be forced to go through the origin; defaults to TRUE

#### Note

If @{known_y's} and @{known_x's} have unequal number of data points, this function returns a #NUM! error.

#### See also

`LINEST`.

TRIMMEAN

### `TRIMMEAN`

    TRIMMEAN(ref,fraction)

#### Description

If `fraction`=0.2 and the data set contains 40 numbers, 8 numbers are trimmed from the data set (40 x 0.2): the 4 largest and the 4 smallest. To avoid a bias, the number of points to be excluded is always rounded down to the nearest even number.

`ref`: list of numbers whose mean you want to calculate

`fraction`: fraction of the data set excluded from the mean

#### See also

`AVERAGE`, `GEOMEAN`, `HARMEAN`, `MEDIAN`, `MODE`.

TTEST

### `TTEST`

    TTEST(array1,array2,tails,type)

#### Description

.

`array1`: sample from the first population

`array2`: sample from the second population

`tails`: number of tails to consider

`type`: Type of test to perform. 1 indicates a test for paired variables, 2 a test of unpaired variables with equal variances, and 3 a test of unpaired variables with unequal variances

#### Note

If the data sets contain a different number of data points and the test is paired (`type` one), `TTEST` returns the #N/A error.

#### Note

`tails` and `type` are truncated to integers.

#### Note

If `tails` is not one or two, this function returns a #NUM! error.

#### Note

If `type` is any other than one, two, or three, this function returns a #NUM! error.

#### See also

`FDIST`, `FINV`.

VAR

### `VAR`

    VAR(area1,area2)

#### Description

`VAR` is also known as the N-1-variance. Under reasonable conditions, it is the maximum-likelihood estimator for the true variance.

`area1`: first cell area

`area2`: second cell area

#### See also

`VARP`, `STDEV`.

VARA

### `VARA`

    VARA(area1,area2)

#### Description

`VARA` is also known as the N-1-variance. Under reasonable conditions, it is the maximum-likelihood estimator for the true variance

`area1`: first cell area

`area2`: second cell area

#### Description

To get the true variance of a complete population use VARPA.

#### Description

Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.

#### See also

`VAR`, `VARPA`.

VARP

### `VARP`

    VARP(area1,area2)

#### Description

`VARP` is also known as the N-variance.

`area1`: first cell area

`area2`: second cell area

#### See also

`AVERAGE`, `DVAR`, `DVARP`, `STDEV`, `VAR`.

VARPA

### `VARPA`

    VARPA(area1,area2)

#### Description

`VARPA` is also known as the N-variance.

`area1`: first cell area

`area2`: second cell area

#### Description

Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.

#### See also

`VARA`, `VARP`.

WEIBULL

### `WEIBULL`

    WEIBULL(x,alpha,beta,cumulative)

#### Description

If the `cumulative` boolean is true it will return: 1 - exp (-(`x`/`beta`)^`alpha`),otherwise it will return (`alpha`/`beta`^`alpha`) * `x`^(`alpha`-1) * exp(-(`x`/`beta`^`alpha`)).

`x`:

`alpha`: scale parameter

`beta`: scale parameter

`cumulative`: whether to evaluate the density function or the cumulative distribution function

#### Note

If `x` < 0 this function returns a #NUM! error.

#### Note

If `alpha` <= 0 or `beta` <= 0 this function returns a #NUM! error.

#### See also

`POISSON`.

ZTEST

### `ZTEST`

    ZTEST(ref,x,stddev)

#### Description

.

`ref`: data set

`x`: mean as given in the null hypothesis

`stddev`: population stadard deviation, defaults to the sample standard deviation

#### Note

If `ref` contains less than two data items `ZTEST` returns #DIV/0! error.

#### See also

`CONFIDENCE`, `NORMDIST`, `NORMINV`, `NORMSDIST`, `NORMSINV`, `STANDARDIZE`.

## String

ASC

### `ASC`

    ASC(text)

#### Description

`ASC` converts full-width katakana and ASCII characters to half-width equivalent characters, copying all others.

`text`: string

#### Description

The distinction between half-width and full-width characters is described in http://www.unicode.org/reports/tr11/.

#### Note

While in obsolete encodings `ASC` used to translate between 2-byte and 1-byte characters, this is not the case in UTF-8.

#### See also

`JIS`.

CHAR

### `CHAR`

    CHAR(x)

#### Description

`CHAR`(`x`) returns the CP1252 (Windows-1252) character with code `x`.

`x`: code point

#### Description

`x` must be in the range 1 to 255.

#### Description

CP1252 (Windows-1252) is also known as the "ANSI code page", but it is not an ANSI standard.

#### Description

CP1252 (Windows-1252) is based on an early draft of ISO-8859-1, and contains all of its printable characters (but partially at different positions.)

#### Note

In CP1252 (Windows-1252), 129, 141, 143, 144, and 157 do not have matching characters.

#### Note

For `x` from 1 to 255 except 129, 141, 143, 144, and 157 we have CODE(`CHAR`(`x`))=`x`.

#### Description

This function is Excel compatible.

#### See also

`CODE`.

CLEAN

### `CLEAN`

    CLEAN(text)

#### Description

`CLEAN` removes non-printable characters from its argument leaving only regular characters and white-space.

`text`: string

CODE

### `CODE`

    CODE(c)

#### Description

`c` must be a valid CP1252 (Windows-1252) character.

`c`: character

#### Description

CP1252 (Windows-1252) is also known as the "ANSI code page", but it is not an ANSI standard.

#### Description

CP1252 (Windows-1252) is based on an early draft of ISO-8859-1, and contains all of its printable characters (but partially at different positions.)

#### Note

In CP1252 (Windows-1252), 129, 141, 143, 144, and 157 do not have matching characters.

#### Note

For `x` from 1 to 255 except 129, 141, 143, 144, and 157 we have `CODE`(CHAR(`x`))=`x`.

#### Description

This function is Excel compatible.

#### See also

`CHAR`.

CONCATENATE

### `CONCATENATE`

#### See also

`LEFT`, `MID`, `RIGHT`.

DOLLAR

### `DOLLAR`

#### See also

`FIXED`, `TEXT`, `VALUE`.

EXACT

### `EXACT`

#### See also

`LEN`, `SEARCH`, `DELTA`.

FIND

### `FIND`

    FIND(string1,string2,start)

#### Description

.

`string1`: search string

`string2`: search field

`start`: starting position, defaults to 1

#### Note

This search is case-sensitive.

#### See also

`EXACT`, `LEN`, `MID`, `SEARCH`.

FINDB

### `FINDB`

    FINDB(string1,string2,start)

#### Description

.

`string1`: search string

`string2`: search field

`start`: starting byte position, defaults to 1

#### Note

This search is case-sensitive.

#### See also

`FIND`, `LEFTB`, `RIGHTB`, `LENB`, `LEFT`, `MID`, `RIGHT`, `LEN`.

FIXED

### `FIXED`

#### See also

`TEXT`, `VALUE`, `DOLLAR`.

JIS

### `JIS`

    JIS(text)

#### Description

`JIS` converts half-width katakana and ASCII characters to full-width equivalent characters, copying all others.

`text`: original text

#### Description

The distinction between half-width and full-width characters is described in http://www.unicode.org/reports/tr11/.

#### Note

While in obsolete encodings `JIS` used to translate between 1-byte and 2-byte characters, this is not the case in UTF-8.

#### See also

`ASC`.

LEFT

### `LEFT`

    LEFT(s,num_chars)

#### Description

.

`s`: the string

`num_chars`: the number of characters to return (defaults to 1)

#### Note

If the string `s` is in a right-to-left script, the returned first characters are from the right of the string.

#### See also

`MID`, `RIGHT`, `LEN`, `MIDB`, `RIGHTB`, `LENB`.

LEFTB

### `LEFTB`

    LEFTB(s,num_bytes)

#### Description

.

`s`: the string

`num_bytes`: the maximum number of bytes to return (defaults to 1)

#### Note

The semantics of this function is subject to change as various applications implement it.

#### Note

If the string is in a right-to-left script, the returned first characters are from the right of the string.

#### See also

`MIDB`, `RIGHTB`, `LENB`, `LEFT`, `MID`, `RIGHT`, `LEN`.

LEN

### `LEN`

#### See also

`CHAR`, `CODE`, `LENB`.

LENB

### `LENB`

#### See also

`CHAR`, `CODE`, `LEN`.

LOWER

### `LOWER`

#### See also

`UPPER`.

MID

### `MID`

#### See also

`LEFT`, `RIGHT`, `LEN`, `LEFTB`, `MIDB`, `RIGHTB`, `LENB`.

MIDB

### `MIDB`

    MIDB(s,start_pos,num_bytes)

#### Description

.

`s`: the string

`start_pos`: the number of the byte with which to start (defaults to 1)

`num_bytes`: the maximum number of bytes to return (defaults to 1)

#### Note

The semantics of this function is subject to change as various applications implement it.

#### See also

`LEFTB`, `RIGHTB`, `LENB`, `LEFT`, `MID`, `RIGHT`, `LEN`.

PROPER

### `PROPER`

#### See also

`LOWER`, `UPPER`.

REPLACE

### `REPLACE`

#### See also

`MID`, `SEARCH`, `SUBSTITUTE`, `TRIM`.

REPLACEB

### `REPLACEB`

    REPLACEB(old,start,num,new)

#### Description

`REPLACEB` replaces the string of valid unicode characters starting at the byte `start` and ending at `start`+`num`-1 with the string `new`.

`old`: original text

`start`: starting byte position

`num`: number of bytes to be replaced

`new`: replacement string

#### Note

The semantics of this function is subject to change as various applications implement it.

#### See also

`MID`, `SEARCH`, `SUBSTITUTE`, `TRIM`.

REPT

### `REPT`

#### See also

`CONCATENATE`.

RIGHT

### `RIGHT`

    RIGHT(s,num_chars)

#### Description

.

`s`: the string

`num_chars`: the number of characters to return (defaults to 1)

#### Note

If the string `s` is in a right-to-left script, the returned last characters are from the left of the string.

#### See also

`LEFT`, `MID`, `LEN`, `LEFTB`, `MIDB`, `RIGHTB`, `LENB`.

RIGHTB

### `RIGHTB`

    RIGHTB(s,num_bytes)

#### Description

.

`s`: the string

`num_bytes`: the maximum number of bytes to return (defaults to 1)

#### Note

The semantics of this function is subject to change as various applications implement it.

#### Note

If the string `s` is in a right-to-left script, the returned last characters are from the left of the string.

#### See also

`LEFTB`, `MIDB`, `LENB`, `LEFT`, `MID`, `RIGHT`, `LEN`.

SEARCH

### `SEARCH`

    SEARCH(search,text,start)

#### Description

`search` may contain wildcard characters (*) and question marks (?). A question mark matches any single character, and a wildcard matches any string including the empty string. To search for * or ?, precede the symbol with ~.

`search`: search string

`text`: search field

`start`: starting position, defaults to 1

#### Note

This search is not case sensitive.

#### Note

If `search` is not found, `SEARCH` returns #VALUE!

#### Note

If `start` is less than one or it is greater than the length of `text`, `SEARCH` returns #VALUE!

#### See also

`FIND`, `SEARCHB`.

SEARCHB

### `SEARCHB`

    SEARCHB(search,text,start)

#### Description

`search` may contain wildcard characters (*) and question marks (?). A question mark matches any single character, and a wildcard matches any string including the empty string. To search for * or ?, precede the symbol with ~.

`search`: search string

`text`: search field

`start`: starting byte position, defaults to 1

#### Note

This search is not case sensitive.

#### Note

If `search` is not found, SEARCH returns #VALUE!

#### Note

If `start` is less than one or it is greater than the byte length of `text`, SEARCH returns #VALUE!

#### Note

The semantics of this function is subject to change as various applications implement it.

#### See also

`FINDB`, `SEARCH`.

SUBSTITUTE

### `SUBSTITUTE`

#### See also

`REPLACE`, `TRIM`.

T

### `T`

#### See also

`CELL`, `N`, `VALUE`.

TEXT

### `TEXT`

#### See also

`DOLLAR`, `FIXED`, `VALUE`.

TRIM

### `TRIM`

#### See also

`CLEAN`, `MID`, `REPLACE`, `SUBSTITUTE`.

UNICHAR

### `UNICHAR`

#### See also

`CHAR`, `UNICODE`, `CODE`.

UNICODE

### `UNICODE`

#### See also

`UNICHAR`, `CODE`, `CHAR`.

UPPER

### `UPPER`

#### See also

`LOWER`.

VALUE

### `VALUE`

#### See also

`DOLLAR`, `FIXED`, `TEXT`.

## Time Series Analysis

FOURIER

### `FOURIER`

    FOURIER(Sequence,Inverse)

#### Description

This array function returns the Fourier or inverse Fourier transform of the given data sequence.

`Sequence`: the data sequence to be transformed

`Inverse`: if false, the inverse Fourier transform is calculated. Defaults to false

#### Description

The output consists always of one column of complex numbers.

#### Note

If `Sequence` is neither an n by 1 nor 1 by n array, this function returns #NUM!

INTERPOLATION

### `INTERPOLATION`

    INTERPOLATION(abscissas,ordinates,targets,interpolation)

#### Description

If an interpolation method is used, the number of returned values is one less than the number of targets and the targets values must be given in increasing order.

`abscissas`: The abscissas of the data to interpolate.

`ordinates`: The ordinates of the data to interpolate.

`targets`: The abscissas of the interpolated data.

`interpolation`: The method of interpolation to be used, defaults to no interpolation

#### Description

The output consists always of one column of numbers.

#### Description

Possible interpolation methods are:

0: linear;

1: linear with averaging;

2: staircase;

3: staircase with averaging;

4: natural cubic spline;

5: natural cubic spline with averaging.

#### Note

Strings and empty cells in `abscissas` and `ordinates` are ignored.

#### Note

If several target data are provided they must be in the same column in consecutive cells.

#### See also

`PERIODOGRAM`.

PERIODOGRAM

### `PERIODOGRAM`

    PERIODOGRAM(ordinates,filter,abscissas,interpolation,number)

#### Description

If an interpolation method is used, the number of returned values is one less than the number of targets and the targets values must be given in increasing order.

`ordinates`: The ordinates of the data to interpolate.

`filter`: Window function to be used, defaults to no window function.

`abscissas`: The abscissas of the data to interpolate, defaults to regularly spaced abscissa.

`interpolation`: The method of interpolation to be used, defaults to no interpolation

`number`: Number of interpolated data points to be used.

#### Description

The output consists always of one column of numbers.

#### Description

Possible interpolation methods are:

0: linear;

1: linear with averaging;

2: staircase;

3: staircase with averaging;

4: natural cubic spline;

5: natural cubic spline with averaging.

#### Description

Possible window functions are:

0: no filter (rectangular window)

1: Bartlett (triangular window)

2: Hahn (cosine window)

3: Welch (parabolic window)

#### Note

Strings and empty cells in `abscissas` and `ordinates` are ignored.

#### Note

If several target data are provided they must be in the same column in consecutive cells.

#### See also

`INTERPOLATION`.