logologo
Get Started
Guide
Development
Plugins
API
English
简体中文
Get Started
Guide
Development
Plugins
API
English
简体中文
logologo
Calculation Engine
Overview
Formula.js
Math.js
Previous PageOverview
Next PageMath.js

#Formula.js

Formula.js provides a large collection of Excel-compatible functions.

#Function Reference

#Dates

FunctionDefinitionExample callParametersExpected result
DATECreates a date based on the supplied year, month, and day.DATE(2008, 7, 8)Year (integer), month (1-12), day (1-31).Tue Jul 08 2008 00:00:00 GMT-0700 (PDT)
DATEVALUEConverts a date in text format to a date serial number.DATEVALUE('8/22/2011')Text string that represents a date.Mon Aug 22 2011 00:00:00 GMT-0700 (PDT)
DAYReturns the day portion of a date.DAY('15-Apr-11')Date value or a date text string.15
DAYSCalculates the number of days between two dates.DAYS('3/15/11', '2/1/11')End date, start date.42
DAYS360Calculates the number of days between two dates based on a 360-day year.DAYS360('1-Jan-11', '31-Dec-11')Start date, end date.360
EDATEReturns the date that is a specified number of months before or after a date.EDATE('1/15/11', -1)Start date, number of months (positive for future, negative for past).Wed Dec 15 2010 00:00:00 GMT-0800 (PST)
EOMONTHReturns the last day of the month before or after the specified number of months.EOMONTH('1/1/11', -3)Start date, number of months (positive for future, negative for past).Sun Oct 31 2010 00:00:00 GMT-0700 (PDT)
HOURReturns the hour portion of a time value.HOUR('7/18/2011 7:45:00 AM')Time value or time text string.7
MINUTEReturns the minute portion of a time value.MINUTE('2/1/2011 12:45:00 PM')Time value or time text string.45
ISOWEEKNUMReturns the ISO week number of the year for a given date.ISOWEEKNUM('3/9/2012')Date value or a date text string.10
MONTHReturns the month portion of a date.MONTH('15-Apr-11')Date value or a date text string.4
NETWORKDAYSCounts the number of working days between two dates, excluding weekends and optional holidays.NETWORKDAYS('10/1/2012', '3/1/2013', ['11/22/2012'])Start date, end date, optional array of holidays.109
NETWORKDAYSINTLCounts working days between two dates, allowing custom weekends and optional holidays.NETWORKDAYSINTL('1/1/2006', '2/1/2006', 7, ['1/2/2006'])Start date, end date, weekend mode, optional array of holidays.23
NOWReturns the current date and time.NOW()No parameters.Thu Feb 20 2020 23:02:55 GMT+0100 (Central European Standard Time)
SECONDReturns the seconds portion of a time value.SECOND('2/1/2011 4:48:18 PM')Time value or time text string.18
TIMEBuilds a time value from the supplied hour, minute, and second.TIME(16, 48, 10)Hour (0-23), minute (0-59), second (0-59).0.7001157407407408
TIMEVALUEConverts a time in text format to a time serial number.TIMEVALUE('22-Aug-2011 6:35 AM')Text string that represents a time.0.2743055555555556
TODAYReturns the current date.TODAY()No parameters.Thu Feb 20 2020 23:02:55 GMT+0100 (Central European Standard Time)
WEEKDAYReturns the number corresponding to the day of the week.WEEKDAY('2/14/2008', 3)Date value or a date text string, return type (1-3).3
YEARReturns the year portion of a date.YEAR('7/5/2008')Date value or a date text string.2008
WEEKNUMReturns the week number in a year for a given date.WEEKNUM('3/9/2012', 2)Date value or a date text string, optional week starting day (1=Sunday, 2=Monday).11
WORKDAYReturns the date before or after a given number of working days, excluding weekends and optional holidays.WORKDAY('10/1/2008', 151, ['11/26/2008', '12/4/2008'])Start date, number of working days, optional array of holidays.Mon May 04 2009 00:00:00 GMT-0700 (PDT)
WORKDAYINTLReturns the date before or after a number of working days with custom weekends and optional holidays.WORKDAYINTL('1/1/2012', 30, 17)Start date, number of working days, weekend mode.Sun Feb 05 2012 00:00:00 GMT-0800 (PST)
YEARFRACCalculates the fractional number of years between two dates.YEARFRAC('1/1/2012', '7/30/2012', 3)Start date, end date, optional basis (day-count basis).0.5780821917808219

#Financial

FunctionDefinitionExample callParametersExpected result
ACCRINTCalculates accrued interest for a security that pays periodic interest.ACCRINT('01/01/2011', '02/01/2011', '07/01/2014', 0.1, 1000, 1, 0)Issue date, first interest date, settlement date, annual rate, par value, frequency, basis.350
CUMIPMTCalculates the cumulative interest paid on a series of payments.CUMIPMT(0.1/12, 30*12, 100000, 13, 24, 0)Rate, total periods, present value, start period, end period, payment type (0=end, 1=beginning).-9916.77251395708
CUMPRINCCalculates the cumulative principal paid on a series of payments.CUMPRINC(0.1/12, 30*12, 100000, 13, 24, 0)Rate, total periods, present value, start period, end period, payment type (0=end, 1=beginning).-614.0863271085149
DBCalculates depreciation using the fixed-declining balance method.DB(1000000, 100000, 6, 1, 6)Cost, salvage value, life, period, month.159500
DDBCalculates depreciation using double-declining balance or another specified method.DDB(1000000, 100000, 6, 1, 1.5)Cost, salvage value, life, period, factor.250000
DOLLARDEConverts a price expressed as a fraction to a decimal.DOLLARDE(1.1, 16)Price as a fractional dollar, denominator.1.625
DOLLARFRConverts a price expressed as a decimal to a fraction.DOLLARFR(1.625, 16)Price as a decimal dollar, denominator.1.1
EFFECTCalculates the effective annual interest rate.EFFECT(0.1, 4)Nominal annual rate, number of compounding periods per year.0.10381289062499977
FVCalculates the future value of an investment.FV(0.1/12, 10, -100, -1000, 0)Rate per period, number of periods, payment per period, present value, payment type (0=end, 1=beginning).2124.874409194097
FVSCHEDULECalculates the future value of principal using a series of compounding rates.FVSCHEDULE(100, [0.09,0.1,0.11])Principal, array of rates.133.08900000000003
IPMTCalculates the interest payment for a specific period.IPMT(0.1/12, 6, 2*12, 100000, 1000000, 0)Rate per period, period, total periods, present value, future value, payment type (0=end, 1=beginning).928.8235718400465
IRRCalculates the internal rate of return.IRR([-75000,12000,15000,18000,21000,24000], 0.075)Array of cash flows, guess.0.05715142887178447
ISPMTCalculates the interest paid during a specific period (for loans).ISPMT(0.1/12, 6, 2*12, 100000)Rate per period, period, total periods, loan amount.-625
MIRRCalculates the modified internal rate of return.MIRR([-75000,12000,15000,18000,21000,24000], 0.1, 0.12)Array of cash flows, finance rate, reinvestment rate.0.07971710360838036
NOMINALCalculates the nominal annual interest rate.NOMINAL(0.1, 4)Effective annual rate, number of compounding periods per year.0.09645475633778045
NPERCalculates the number of periods required to reach a target value.NPER(0.1/12, -100, -1000, 10000, 0)Rate per period, payment per period, present value, future value, payment type (0=end, 1=beginning).63.39385422740764
NPVCalculates the net present value of a series of future cash flows.NPV(0.1, -10000, 2000, 4000, 8000)Discount rate per period, array of cash flows.1031.3503176012546
PDURATIONCalculates the time required to reach a desired value.PDURATION(0.1, 1000, 2000)Rate per period, present value, future value.7.272540897341714
PMTCalculates the periodic payment for a loan.PMT(0.1/12, 2*12, 1000, 10000, 0)Rate per period, total periods, present value, future value, payment type (0=end, 1=beginning).-42426.08563793503
PPMTCalculates the principal payment for a specific period.PPMT(0.1/12, 6, 2*12, 100000, 1000000, 0)Rate per period, period, total periods, present value, future value, payment type (0=end, 1=beginning).-43354.909209775076
PVCalculates the present value of an investment.PV(0.1/12, 2*12, 1000, 10000, 0)Rate per period, number of periods, payment per period, future value, payment type (0=end, 1=beginning).-29864.950264779152
RATECalculates the interest rate per period.RATE(2*12, -1000, -10000, 100000, 0, 0.1)Total periods, payment per period, present value, future value, payment type (0=end, 1=beginning), guess.0.06517891177181533

#Engineering

FunctionDefinitionExample callParametersExpected result
BIN2DECConverts a binary number to decimal.BIN2DEC(101010)Binary number.42
BIN2HEXConverts a binary number to hexadecimal.BIN2HEX(101010)Binary number.2a
BIN2OCTConverts a binary number to octal.BIN2OCT(101010)Binary number.52
BITANDReturns the bitwise AND of two numbers.BITAND(42, 24)Integer, integer.8
BITLSHIFTPerforms a bitwise left shift.BITLSHIFT(42, 24)Integer, number of bits to shift.704643072
BITORReturns the bitwise OR of two numbers.BITOR(42, 24)Integer, integer.58
BITRSHIFTPerforms a bitwise right shift.BITRSHIFT(42, 2)Integer, number of bits to shift.10
BITXORReturns the bitwise XOR of two numbers.BITXOR(42, 24)Integer, integer.50
COMPLEXCreates a complex number.COMPLEX(3, 4)Real part, imaginary part.3+4i
CONVERTConverts a number from one measurement unit to another.CONVERT(64, 'kibyte', 'bit')Value, from unit, to unit.524288
DEC2BINConverts a decimal number to binary.DEC2BIN(42)Decimal number.101010
DEC2HEXConverts a decimal number to hexadecimal.DEC2HEX(42)Decimal number.2a
DEC2OCTConverts a decimal number to octal.DEC2OCT(42)Decimal number.52
DELTATests whether two values are equal.DELTA(42, 42)Number, number.1
ERFReturns the error function.ERF(1)Upper limit.0.8427007929497149
ERFCReturns the complementary error function.ERFC(1)Lower limit.0.1572992070502851
GESTEPTests whether a number is greater than or equal to a threshold.GESTEP(42, 24)Number, threshold.1
HEX2BINConverts a hexadecimal number to binary.HEX2BIN('2a')Hexadecimal number.101010
HEX2DECConverts a hexadecimal number to decimal.HEX2DEC('2a')Hexadecimal number.42
HEX2OCTConverts a hexadecimal number to octal.HEX2OCT('2a')Hexadecimal number.52
IMABSReturns the absolute value (magnitude) of a complex number.IMABS('3+4i')Complex number.5
IMAGINARYReturns the imaginary part of a complex number.IMAGINARY('3+4i')Complex number.4
IMARGUMENTReturns the argument of a complex number.IMARGUMENT('3+4i')Complex number.0.9272952180016122
IMCONJUGATEReturns the complex conjugate.IMCONJUGATE('3+4i')Complex number.3-4i
IMCOSReturns the cosine of a complex number.IMCOS('1+i')Complex number.0.8337300251311491-0.9888977057628651i
IMCOSHReturns the hyperbolic cosine of a complex number.IMCOSH('1+i')Complex number.0.8337300251311491+0.9888977057628651i
IMCOTReturns the cotangent of a complex number.IMCOT('1+i')Complex number.0.21762156185440265-0.8680141428959249i
IMCSCReturns the cosecant of a complex number.IMCSC('1+i')Complex number.0.6215180171704283-0.3039310016284264i
IMCSCHReturns the hyperbolic cosecant of a complex number.IMCSCH('1+i')Complex number.0.3039310016284264-0.6215180171704283i
IMDIVReturns the quotient of two complex numbers.IMDIV('1+2i', '3+4i')Dividend complex number, divisor complex number.0.44+0.08i
IMEXPReturns the exponential of a complex number.IMEXP('1+i')Complex number.1.4686939399158851+2.2873552871788423i
IMLNReturns the natural logarithm of a complex number.IMLN('1+i')Complex number.0.3465735902799727+0.7853981633974483i
IMLOG10Returns the base-10 logarithm of a complex number.IMLOG10('1+i')Complex number.0.1505149978319906+0.3410940884604603i
IMLOG2Returns the base-2 logarithm of a complex number.IMLOG2('1+i')Complex number.0.5000000000000001+1.1330900354567985i
IMPOWERReturns a complex number raised to a power.IMPOWER('1+i', 2)Complex number, exponent.1.2246063538223775e-16+2.0000000000000004i
IMPRODUCTReturns the product of complex numbers.IMPRODUCT('1+2i', '3+4i', '5+6i')Array of complex numbers.-85+20i
IMREALReturns the real part of a complex number.IMREAL('3+4i')Complex number.3
IMSECReturns the secant of a complex number.IMSEC('1+i')Complex number.0.4983370305551868+0.591083841721045i
IMSECHReturns the hyperbolic secant of a complex number.IMSECH('1+i')Complex number.0.4983370305551868-0.591083841721045i
IMSINReturns the sine of a complex number.IMSIN('1+i')Complex number.1.2984575814159773+0.6349639147847361i
IMSINHReturns the hyperbolic sine of a complex number.IMSINH('1+i')Complex number.0.6349639147847361+1.2984575814159773i
IMSQRTReturns the square root of a complex number.IMSQRT('1+i')Complex number.1.0986841134678098+0.45508986056222733i
IMSUBReturns the difference between two complex numbers.IMSUB('3+4i', '1+2i')Minuend complex number, subtrahend complex number.2+2i
IMSUMReturns the sum of complex numbers.IMSUM('1+2i', '3+4i', '5+6i')Array of complex numbers.9+12i
IMTANReturns the tangent of a complex number.IMTAN('1+i')Complex number.0.2717525853195117+1.0839233273386946i
OCT2BINConverts an octal number to binary.OCT2BIN('52')Octal number.101010
OCT2DECConverts an octal number to decimal.OCT2DEC('52')Octal number.42
OCT2HEXConverts an octal number to hexadecimal.OCT2HEX('52')Octal number.2a

#Logic

FunctionDefinitionExample callParametersExpected result
ANDReturns TRUE only when all arguments are TRUE, otherwise FALSE.AND(true, false, true)One or more logical values (Boolean); the function returns TRUE only when every argument is TRUE.
FALSEReturns the logical value FALSE.FALSE()No parameters.
IFReturns different values depending on whether a condition is TRUE or FALSE.IF(true, 'Hello!', 'Goodbye!')Condition, value if TRUE, value if FALSE.Hello!
IFSEvaluates multiple conditions and returns the result of the first TRUE condition.IFS(false, 'Hello!', true, 'Goodbye!')Multiple pairs of condition and corresponding value.Goodbye!
NOTReverses a logical value. TRUE becomes FALSE and vice versa.NOT(true)One logical value (Boolean).
ORReturns TRUE if any argument is TRUE, otherwise FALSE.OR(true, false, true)One or more logical values (Boolean); returns TRUE when any argument is TRUE.
SWITCHReturns the value that matches an expression; if none match, returns the default.SWITCH(7, 9, 'Nine', 7, 'Seven')Expression, match value 1, result 1, …, [default].Seven
TRUEReturns the logical value TRUE.TRUE()No parameters.
XORReturns TRUE only when an odd number of arguments are TRUE, otherwise FALSE.XOR(true, false, true)One or more logical values (Boolean); returns TRUE when an odd count are TRUE.

#Math

FunctionDefinitionExample callParametersExpected result
ABSReturns the absolute value of a number.ABS(-4)Number.4
ACOSReturns the arccosine (in radians).ACOS(-0.5)Number between -1 and 1.2.0943951023931957
ACOSHReturns the inverse hyperbolic cosine.ACOSH(10)Number greater than or equal to 1.2.993222846126381
ACOTReturns the arccotangent (in radians).ACOT(2)Any number.0.46364760900080615
ACOTHReturns the inverse hyperbolic cotangent.ACOTH(6)Number whose absolute value is greater than 1.0.16823611831060645
AGGREGATEPerforms an aggregate calculation while ignoring errors or hidden rows.AGGREGATE(9, 4, [-5,15], [32,'Hello World!'])Function number, options, array1, …, arrayN.10,32
ARABICConverts a Roman numeral to Arabic.ARABIC('MCMXII')Roman numeral string.1912
ASINReturns the arcsine (in radians).ASIN(-0.5)Number between -1 and 1.-0.5235987755982988
ASINHReturns the inverse hyperbolic sine.ASINH(-2.5)Any number.-1.6472311463710965
ATANReturns the arctangent (in radians).ATAN(1)Any number.0.7853981633974483
ATAN2Returns the arctangent (in radians) of a coordinate pair.ATAN2(-1, -1)y-coordinate, x-coordinate.-2.356194490192345
ATANHReturns the inverse hyperbolic tangent.ATANH(-0.1)Number between -1 and 1.-0.10033534773107562
BASEConverts a number to text in the specified base.BASE(15, 2, 10)Number, radix, [minimum length].0000001111
CEILINGRounds a number up to the nearest multiple.CEILING(-5.5, 2, -1)Number, significance, [mode].-6
CEILINGMATHRounds a number up, using the supplied multiple and direction.CEILINGMATH(-5.5, 2, -1)Number, [significance], [mode].-6
CEILINGPRECISERounds a number up to the nearest multiple, ignoring sign.CEILINGPRECISE(-4.1, -2)Number, [significance].-4
COMBINReturns the number of combinations.COMBIN(8, 2)Total items, number chosen.28
COMBINAReturns the number of combinations with repetitions.COMBINA(4, 3)Total items, number chosen.20
COSReturns the cosine (in radians).COS(1)Angle in radians.0.5403023058681398
COSHReturns the hyperbolic cosine.COSH(1)Any number.1.5430806348152437
COTReturns the cotangent (in radians).COT(30)Angle in radians.-0.15611995216165922
COTHReturns the hyperbolic cotangent.COTH(2)Any number.1.0373147207275482
CSCReturns the cosecant (in radians).CSC(15)Angle in radians.1.5377805615408537
CSCHReturns the hyperbolic cosecant.CSCH(1.5)Any number.0.46964244059522464
DECIMALConverts a number in text form to decimal.DECIMAL('FF', 16)Text, base.255
ERFReturns the error function.ERF(1)Upper limit.0.8427007929497149
ERFCReturns the complementary error function.ERFC(1)Lower limit.0.1572992070502851
EVENRounds a number up to the nearest even integer.EVEN(-1)Number.-2
EXPReturns e raised to a power.EXP(1)Exponent.2.718281828459045
FACTReturns the factorial.FACT(5)Non-negative integer.120
FACTDOUBLEReturns the double factorial.FACTDOUBLE(7)Non-negative integer.105
FLOORRounds a number down to the nearest multiple.FLOOR(-3.1)Number, significance.-4
FLOORMATHRounds a number down using the supplied multiple and direction.FLOORMATH(-4.1, -2, -1)Number, [significance], [mode].-4
FLOORPRECISERounds a number down to the nearest multiple, ignoring sign.FLOORPRECISE(-3.1, -2)Number, [significance].-4
GCDReturns the greatest common divisor.GCD(24, 36, 48)Two or more integers.12
INTRounds a number down to the nearest integer.INT(-8.9)Number.-9
ISEVENTests whether a number is even.ISEVEN(-2.5)Number.
ISOCEILINGRounds a number up to the nearest multiple following ISO rules.ISOCEILING(-4.1, -2)Number, [significance].-4
ISODDTests whether a number is odd.ISODD(-2.5)Number.
LCMReturns the least common multiple.LCM(24, 36, 48)Two or more integers.144
LNReturns the natural logarithm.LN(86)Positive number.4.454347296253507
LOGReturns the logarithm in the specified base.LOG(8, 2)Number, base.3
LOG10Returns the base-10 logarithm.LOG10(100000)Positive number.5
MODReturns the remainder of a division.MOD(3, -2)Dividend, divisor.-1
MROUNDRounds a number to the nearest multiple.MROUND(-10, -3)Number, multiple.-9
MULTINOMIALReturns the multinomial coefficient.MULTINOMIAL(2, 3, 4)Two or more non-negative integers.1260
ODDRounds a number up to the nearest odd integer.ODD(-1.5)Number.-3
POWERRaises a number to a power.POWER(5, 2)Base, exponent.25
PRODUCTReturns the product of numbers.PRODUCT(5, 15, 30)One or more numbers.2250
QUOTIENTReturns the integer portion of a division.QUOTIENT(-10, 3)Dividend, divisor.-3
RADIANSConverts degrees to radians.RADIANS(180)Degrees.3.141592653589793
RANDReturns a random real number between 0 and 1.RAND()No parameters.[Random real number between 0 and 1]
RANDBETWEENReturns a random integer within a specified range.RANDBETWEEN(-1, 1)Bottom, top.[Random integer between bottom and top]
ROUNDRounds a number to the specified number of digits.ROUND(626.3, -3)Number, digits.1000
ROUNDDOWNRounds a number down toward zero.ROUNDDOWN(-3.14159, 2)Number, digits.-3.14
ROUNDUPRounds a number up away from zero.ROUNDUP(-3.14159, 2)Number, digits.-3.15
SECReturns the secant (in radians).SEC(45)Angle in radians.1.9035944074044246
SECHReturns the hyperbolic secant.SECH(45)Any number.5.725037161098787e-20
SIGNReturns the sign of a number.SIGN(-0.00001)Number.-1
SINReturns the sine (in radians).SIN(1)Angle in radians.0.8414709848078965
SINHReturns the hyperbolic sine.SINH(1)Any number.1.1752011936438014
SQRTReturns the square root.SQRT(16)Non-negative number.4
SQRTPIReturns the square root of (number * π).SQRTPI(2)Non-negative number.2.5066282746310002
SUBTOTALReturns a subtotal for a set of data, ignoring hidden rows.SUBTOTAL(9, [-5,15], [32,'Hello World!'])Function number, array1, …, arrayN.10,32
SUMReturns the sum of numbers, ignoring text.SUM(-5, 15, 32, 'Hello World!')One or more numbers.42
SUMIFSums values that meet a single condition.SUMIF([2,4,8,16], '>5')Range, criteria.24
SUMIFSSums values that meet multiple conditions.SUMIFS([2,4,8,16], [1,2,3,4], '>=2', [1,2,4,8], '<=4')Sum range, criteria range 1, criteria 1, …, criteria range N, criteria N.12
SUMPRODUCTReturns the sum of products of array elements.SUMPRODUCT([[1,2],[3,4]], [[1,0],[0,1]])Two or more arrays.5
SUMSQReturns the sum of squares.SUMSQ(3, 4)One or more numbers.25
SUMX2MY2Returns the sum of the difference of squares of corresponding array elements.SUMX2MY2([1,2], [3,4])Array1, array2.-20
SUMX2PY2Returns the sum of the sum of squares of corresponding array elements.SUMX2PY2([1,2], [3,4])Array1, array2.30
SUMXMY2Returns the sum of squares of differences of corresponding array elements.SUMXMY2([1,2], [3,4])Array1, array2.8
TANReturns the tangent (in radians).TAN(1)Angle in radians.1.5574077246549023
TANHReturns the hyperbolic tangent.TANH(-2)Any number.-0.9640275800758168
TRUNCTruncates a number to an integer without rounding.TRUNC(-8.9)Number, [digits].-8

#Statistics

FunctionDefinitionExample callParametersExpected result
AVEDEVReturns the average absolute deviation.AVEDEV([2,4], [8,16])Arrays of numbers representing data points.4.5
AVERAGEReturns the arithmetic mean.AVERAGE([2,4], [8,16])Arrays of numbers representing data points.7.5
AVERAGEAReturns the average of values, including text and logical values.AVERAGEA([2,4], [8,16])Arrays of numbers, text, or logical values; all non-empty values are included.7.5
AVERAGEIFCalculates the average based on a single condition.AVERAGEIF([2,4,8,16], '>5', [1, 2, 3, 4])First parameter is the range to check, second is the condition, third optional range used for averaging.3.5
AVERAGEIFSCalculates the average based on multiple conditions.AVERAGEIFS([2,4,8,16], [1,2,3,4], '>=2', [1,2,4,8], '<=4')First parameter is the values to average, followed by pairs of criteria ranges and criteria expressions.6
BETADISTReturns the cumulative beta probability density.BETADIST(2, 8, 10, true, 1, 3)Value, alpha, beta, cumulative flag, A (optional), B (optional).0.6854705810117458
BETAINVReturns the inverse of the cumulative beta distribution.BETAINV(0.6854705810117458, 8, 10, 1, 3)Probability, alpha, beta, A (optional), B (optional).1.9999999999999998
BINOMDISTReturns the probability of a binomial distribution.BINOMDIST(6, 10, 0.5, false)Number of successes, trials, probability of success, cumulative flag.0.205078125
CORRELReturns the correlation coefficient between two datasets.CORREL([3,2,4,5,6], [9,7,12,15,17])Two arrays of numbers.0.9970544855015815
COUNTCounts numeric cells.COUNT([1,2], [3,4])Arrays or ranges of numbers.4
COUNTACounts non-empty cells.COUNTA([1, null, 3, 'a', '', 'c'])Arrays or ranges of any type.4
COUNTBLANKCounts blank cells.COUNTBLANK([1, null, 3, 'a', '', 'c'])Arrays or ranges of any type.2
COUNTIFCounts cells matching a condition.COUNTIF(['Caen', 'Melbourne', 'Palo Alto', 'Singapore'], 'a')Range of numbers or text, and the condition.3
COUNTIFSCounts cells matching multiple conditions.COUNTIFS([2,4,8,16], [1,2,3,4], '>=2', [1,2,4,8], '<=4')Pairs of criteria ranges and criteria expressions.2
COVARIANCEPReturns the population covariance.COVARIANCEP([3,2,4,5,6], [9,7,12,15,17])Two arrays of numbers.5.2
COVARIANCESReturns the sample covariance.COVARIANCES([2,4,8], [5,11,12])Two arrays of numbers.9.666666666666668
DEVSQReturns the sum of squares of deviations.DEVSQ([2,4,8,16])Array of numbers representing data points.115
EXPONDISTReturns the exponential distribution.EXPONDIST(0.2, 10, true)Value, lambda, cumulative flag.0.8646647167633873
FDISTReturns the F probability distribution.FDIST(15.2069, 6, 4, false)Value, degrees of freedom 1, degrees of freedom 2, cumulative flag.0.0012237917087831735
FINVReturns the inverse of the F distribution.FINV(0.01, 6, 4)Probability, degrees of freedom 1, degrees of freedom 2.0.10930991412457851
FISHERReturns the Fisher transformation.FISHER(0.75)Number representing a correlation coefficient.0.9729550745276566
FISHERINVReturns the inverse Fisher transformation.FISHERINV(0.9729550745276566)Number representing a Fisher transform result.0.75
FORECASTPredicts a y-value for a given x using known x and y values.FORECAST(30, [6,7,9,15,21], [20,28,31,38,40])New x value, array of known y values, array of known x values.10.607253086419755
FREQUENCYReturns a frequency distribution.FREQUENCY([79,85,78,85,50,81,95,88,97], [70,79,89])Data array, bins array.1,2,4,2
GAMMAReturns the gamma function.GAMMA(2.5)Positive number.1.3293403919101043
GAMMALNReturns the natural logarithm of the gamma function.GAMMALN(10)Positive number.12.801827480081961
GAUSSReturns the probability based on the standard normal distribution.GAUSS(2)Number representing a z-score.0.4772498680518208
GEOMEANReturns the geometric mean.GEOMEAN([2,4], [8,16])Arrays of numbers.5.656854249492381
GROWTHPredicts exponential growth values based on known data.GROWTH([2,4,8,16], [1,2,3,4], [5])Array of known y values, array of known x values, new x values.32.00000000000003
HARMEANReturns the harmonic mean.HARMEAN([2,4], [8,16])Arrays of numbers.4.266666666666667
HYPGEOMDISTReturns the hypergeometric distribution.HYPGEOMDIST(1, 4, 8, 20, false)Sample successes, sample size, population successes, population size, cumulative flag.0.3632610939112487
INTERCEPTReturns the intercept of a linear regression line.INTERCEPT([2,3,9,1,8], [6,5,11,7,5])Array of known y values, array of known x values.0.04838709677419217
KURTReturns kurtosis.KURT([3,4,5,2,3,4,5,6,4,7])Array of numbers.-0.15179963720841627
LARGEReturns the k-th largest value.LARGE([3,5,3,5,4,4,2,4,6,7], 3)Array of numbers, k.5
LINESTPerforms linear regression analysis.LINEST([1,9,5,7], [0,4,2,3], true, true)Array of known y values, array of known x values, return additional stats, return more stats.2,1
LOGNORMDISTReturns the lognormal distribution.LOGNORMDIST(4, 3.5, 1.2, true)Value, mean, standard deviation, cumulative flag.0.0390835557068005
LOGNORMINVReturns the inverse of the lognormal distribution.LOGNORMINV(0.0390835557068005, 3.5, 1.2, true)Probability, mean, standard deviation, cumulative flag.4.000000000000001
MAXReturns the maximum value.MAX([0.1,0.2], [0.4,0.8], [true, false])Arrays of numbers.0.8
MAXAReturns the maximum value including text and logical values.MAXA([0.1,0.2], [0.4,0.8], [true, false])Arrays of numbers, text, or logical values.1
MEDIANReturns the median.MEDIAN([1,2,3], [4,5,6])Arrays of numbers.3.5
MINReturns the minimum value.MIN([0.1,0.2], [0.4,0.8], [true, false])Arrays of numbers.0.1
MINAReturns the minimum value including text and logical values.MINA([0.1,0.2], [0.4,0.8], [true, false])Arrays of numbers, text, or logical values.0
MODEMULTReturns an array of the most frequently occurring values.MODEMULT([1,2,3,4,3,2,1,2,3])Array of numbers.2,3
MODESNGLReturns the most frequently occurring single value.MODESNGL([1,2,3,4,3,2,1,2,3])Array of numbers.2
NORMDISTReturns the normal distribution.NORMDIST(42, 40, 1.5, true)Value, mean, standard deviation, cumulative flag.0.9087887802741321
NORMINVReturns the inverse of the normal distribution.NORMINV(0.9087887802741321, 40, 1.5)Probability, mean, standard deviation.42
NORMSDISTReturns the standard normal distribution.NORMSDIST(1, true)Number representing a z-score.0.8413447460685429
NORMSINVReturns the inverse of the standard normal distribution.NORMSINV(0.8413447460685429)Probability.1.0000000000000002
PEARSONReturns the Pearson product-moment correlation coefficient.PEARSON([9,7,5,3,1], [10,6,1,5,3])Two arrays of numbers.0.6993786061802354
PERCENTILEEXCReturns the k-th percentile, exclusive.PERCENTILEEXC([1,2,3,4], 0.3)Array of numbers, k.1.5
PERCENTILEINCReturns the k-th percentile, inclusive.PERCENTILEINC([1,2,3,4], 0.3)Array of numbers, k.1.9
PERCENTRANKEXCReturns the rank of a value in a data set as a percentage (exclusive).PERCENTRANKEXC([1,2,3,4], 2, 2)Array of numbers, x value, significance (optional).0.4
PERCENTRANKINCReturns the rank of a value in a data set as a percentage (inclusive).PERCENTRANKINC([1,2,3,4], 2, 2)Array of numbers, x value, significance (optional).0.33
PERMUTReturns the number of permutations.PERMUT(100, 3)Total number n, number chosen k.970200
PERMUTATIONAReturns the number of permutations with repetitions.PERMUTATIONA(4, 3)Total number n, number chosen k.64
PHIReturns the density function of the standard normal distribution.PHI(0.75)Number representing a z-score.0.30113743215480443
POISSONDISTReturns the Poisson distribution.POISSONDIST(2, 5, true)Number of events, mean, cumulative flag.0.12465201948308113
PROBReturns the sum of probabilities.PROB([1,2,3,4], [0.1,0.2,0.2,0.1], 2, 3)Array of values, array of probabilities, lower limit, upper limit.0.4
QUARTILEEXCReturns the quartile of the data set, exclusive.QUARTILEEXC([1,2,3,4], 1)Array of numbers, quart.1.25
QUARTILEINCReturns the quartile of the data set, inclusive.QUARTILEINC([1,2,3,4], 1)Array of numbers, quart.1.75
RANKAVGReturns the average rank.RANKAVG(4, [2,4,4,8,8,16], false)Number, array of numbers, order (ascending/descending).4.5
RANKEQReturns the rank of a number.RANKEQ(4, [2,4,4,8,8,16], false)Number, array of numbers, order (ascending/descending).4
RSQReturns the coefficient of determination.RSQ([9,7,5,3,1], [10,6,1,5,3])Two arrays of numbers.0.4891304347826088
SKEWReturns skewness.SKEW([3,4,5,2,3,4,5,6,4,7])Array of numbers.0.3595430714067974
SKEWPReturns population skewness.SKEWP([3,4,5,2,3,4,5,6,4,7])Array of numbers.0.303193339354144
SLOPEReturns the slope of the linear regression line.SLOPE([1,9,5,7], [0,4,2,3])Array of known y values, array of known x values.2
SMALLReturns the k-th smallest value.SMALL([3,5,3,5,4,4,2,4,6,7], 3)Array of numbers, k.3
STANDARDIZEReturns a normalized value as a z-score.STANDARDIZE(42, 40, 1.5)Value, mean, standard deviation.1.3333333333333333
STDEVAReturns the standard deviation, including text and logical values.STDEVA([2,4], [8,16], [true, false])Arrays of numbers, text, or logical values.6.013872850889572
STDEVPReturns the population standard deviation.STDEVP([2,4], [8,16], [true, false])Arrays of numbers.5.361902647381804
STDEVPAReturns the population standard deviation, including text and logical values.STDEVPA([2,4], [8,16], [true, false])Arrays of numbers, text, or logical values.5.489889697333535
STDEVSReturns the sample standard deviation.VARS([2,4], [8,16], [true, false])Arrays of numbers.6.191391873668904
STEYXReturns the standard error of the predicted y-value.STEYX([2,3,9,1,8,7,5], [6,5,11,7,5,4,4])Array of known y values, array of known x values.3.305718950210041
TINVReturns the inverse of the t-distribution.TINV(0.9946953263673741, 1)Probability, degrees of freedom.59.99999999996535
TRIMMEANReturns the mean of the interior portion of a data set.TRIMMEAN([4,5,6,7,2,3,4,5,1,2,3], 0.2)Array of numbers, trim proportion.3.7777777777777777
VARAReturns the variance including text and logical values.VARA([2,4], [8,16], [true, false])Arrays of numbers, text, or logical values.36.16666666666667
VARPReturns the population variance.VARP([2,4], [8,16], [true, false])Arrays of numbers.28.75
VARPAReturns the population variance including text and logical values.VARPA([2,4], [8,16], [true, false])Arrays of numbers, text, or logical values.30.13888888888889
VARSReturns the sample variance.VARS([2,4], [8,16], [true, false])Arrays of numbers.38.333333333333336
WEIBULLDISTReturns the Weibull distribution.WEIBULLDIST(105, 20, 100, true)Value, alpha, beta, cumulative flag.0.9295813900692769
ZTESTReturns the one-tailed probability of a z-test.ZTEST([3,6,7,8,6,5,4,2,1,9], 4)Array of numbers, hypothesized mean.0.09057419685136381

#Text

FunctionDefinitionExample callParametersExpected result
CHARConverts a number code to the corresponding character.CHAR(65)Number representing the character code.A
CLEANRemoves all non-printing characters from text.CLEAN('Monthly report')Text string to clean.Monthly report
CODEReturns the numeric code of the first character in a text string.CODE('A')Text string containing a single character.65
CONCATENATEJoins multiple text strings into one string.CONCATENATE('Andreas', ' ', 'Hauser')One or more text strings to join.Andreas Hauser
EXACTChecks whether two strings are exactly the same, case-sensitive.EXACT('Word', 'word')Two text strings to compare.
FINDFinds the position of a substring starting from a given position.FIND('M', 'Miriam McGovern', 3)Text to find, source text, optional start position.8
LEFTReturns a specified number of characters from the left side of a string.LEFT('Sale Price', 4)Text string and number of characters.Sale
LENReturns the number of characters in a text string.LEN('Phoenix, AZ')Text string to count.11
LOWERConverts all characters to lowercase.LOWER('E. E. Cummings')Text string to convert.e. e. cummings
MIDReturns a specified number of characters from the middle of a string.MID('Fluid Flow', 7, 20)Text string, start position, number of characters.Flow
NUMBERVALUEConverts text to a number using specified separators.NUMBERVALUE('2.500,27', ',', '.')Text string, decimal separator, group separator.2500.27
PROPERCapitalizes the first letter of each word.PROPER('this is a TITLE')Text string to format.This Is A Title
REPLACEReplaces part of a text string with new text.REPLACE('abcdefghijk', 6, 5, '*')Original text, start position, number of characters, new text.abcde*k
REPTRepeats text a specified number of times.REPT('*-', 3)Text string and repeat count.--*-
RIGHTReturns a specified number of characters from the right side of a string.RIGHT('Sale Price', 5)Text string and number of characters.Price
ROMANConverts an Arabic numeral to Roman numerals.ROMAN(499)Arabic number to convert.CDXCIX
SEARCHFinds the position of a substring, case-insensitive.SEARCH('margin', 'Profit Margin')Text to find, source text.8
SUBSTITUTEReplaces a specific instance of old text with new text.SUBSTITUTE('Quarter 1, 2011', '1', '2', 3)Original text, old text, new text, optional instance number.Quarter 1, 2012
TReturns the text if the value is text; otherwise returns an empty string.T('Rainfall')Argument can be any type of data.Rainfall
TRIMRemoves spaces from text except for single spaces between words.TRIM(' First Quarter Earnings ')Text string to trim.First Quarter Earnings
TEXTJOINJoins multiple text items into one string using a delimiter.TEXTJOIN(' ', true, 'The', '', 'sun', 'will', 'come', 'up', 'tomorrow.')Delimiter, ignore-empty flag, text items to join.The sun will come up tomorrow.
UNICHARReturns the character for a given Unicode number.UNICHAR(66)Unicode code point.B
UNICODEReturns the Unicode number of the first character of text.UNICODE('B')Text string containing a single character.66
UPPERConverts all characters to uppercase.UPPER('total')Text string to convert.TOTAL