Excel functions
Math & trig functions
Math and trigonometry functions are the calculators of Excel. They add with or without conditions (SUM, SUMIF, SUMIFS, SUMPRODUCT), round numbers in every possible way (ROUND, MROUND, CEILING.MATH), generate numbers (SEQUENCE, RANDARRAY) and handle angles, powers, logarithms and matrices.
Start with these
ABSReturns the absolute value of a number: the number without its sign.AGGREGATECalculates SUM, AVERAGE, MAX, LARGE, MEDIAN and 14 other statistics while optionally ignoring errors and hidden rows.CEILING.MATHRounds a number up to the nearest integer or multiple of significance, with control over negative numbers.FLOOR.MATHRounds a number down to the nearest integer or multiple of significance, with control over negative numbers.INTRounds a number down to the nearest integer, toward minus infinity (−7.85 becomes −8).MODReturns the remainder after dividing one number by another; the result has the sign of the divisor.MROUNDRounds a number to the nearest multiple of another number, such as 0.05, 15 minutes or a pallet size.POWERRaises a number to a power, e.g. squares, cubes, roots and compound growth. Same as the ^ operator.PRODUCTMultiplies all the numbers given as arguments or in ranges and returns the product.RANDReturns a random decimal number from 0 up to (but not including) 1, recalculated every time the sheet changes.RANDBETWEENReturns a random whole number between two values you specify, inclusive.ROUNDRounds a number to a chosen number of digits, with halves rounded away from zero.ROUNDDOWNRounds a number toward zero to a chosen number of digits, cutting off the rest.ROUNDUPRounds a number away from zero to a chosen number of digits, e.g. to count boxes or billable units.SEQUENCEGenerates a spilled list or grid of sequential numbers with a chosen start and step.SQRTReturns the positive square root of a number.SUBTOTALReturns a sum, count, average and more for a list, ignoring rows hidden by a filter and other SUBTOTAL results.SUMAdds numbers, cell ranges or both and returns the total. The most used function in Excel.SUMIFAdds the cells that meet one condition, such as all sales for the East region or every invoice above 500.SUMIFSAdds the values that meet several conditions at once, such as East-region laptop sales in April.SUMPRODUCTMultiplies matching items in arrays and adds the results; also the classic way to sum or count with complex conditions.TRUNCCuts a number to a given number of decimal places without rounding; the default removes all decimals.
All 80 math & trig functions
- ABSReturns the absolute value of a number: the number without its sign.
- ACOSReturns the arccosine (inverse cosine) in radians: the angle whose cosine is the given number.
- ACOSHReturns the inverse hyperbolic cosine of a number that is 1 or greater.
- ACOTReturns the arccotangent (inverse cotangent) of a number, as an angle in radians from 0 to π.
- ACOTHReturns the inverse hyperbolic cotangent of a number whose absolute value is greater than 1.
- AGGREGATECalculates SUM, AVERAGE, MAX, LARGE, MEDIAN and 14 other statistics while optionally ignoring errors and hidden rows.
- ARABICConverts a Roman numeral (text) into an ordinary number.
- ASINReturns the arcsine (inverse sine) in radians: the angle whose sine is the given number.
- ASINHReturns the inverse hyperbolic sine of a number; a log-like transform that also works for zero and negatives.
- ATANReturns the arctangent (inverse tangent) in radians: the angle whose tangent is the given number.
- ATAN2Returns the angle from the x-axis to a point (x, y) in radians, from −π to π, using both coordinates.
- ATANHReturns the inverse hyperbolic tangent of a number between −1 and 1 (the Fisher z-transform).
- BASEConverts a number into text in another base (radix 2–36), e.g. binary, hexadecimal or base 36.
- CEILING.MATHRounds a number up to the nearest integer or multiple of significance, with control over negative numbers.
- CEILING.PRECISERounds a number up (toward plus infinity) to the nearest integer or multiple, ignoring the significance sign.
- COMBINReturns the number of ways to choose a group of items from a larger set when order does not matter.
- COMBINAReturns the number of combinations when items can be chosen more than once (with repetition).
- COSReturns the cosine of an angle given in radians; used for horizontal distances and force components.
- COSHReturns the hyperbolic cosine of a number, the shape of a hanging cable or chain (catenary).
- COTReturns the cotangent of an angle in radians (1 / tangent), e.g. horizontal run per unit of rise.
- COTHReturns the hyperbolic cotangent of a number (COSH ÷ SINH).
- CSCReturns the cosecant of an angle in radians (1 / sine), e.g. sloping length from a vertical rise.
- CSCHReturns the hyperbolic cosecant of a number (1 ÷ SINH).
- DECIMALConverts text representing a number in another base (2–36) into an ordinary decimal number.
- DEGREESConverts an angle from radians to degrees.
- EVENRounds a number away from zero to the nearest even integer.
- EXPReturns e (about 2.71828) raised to a power; the inverse of LN. Used for continuous growth and decay.
- FACTReturns the factorial of a number (n! = 1 × 2 × … × n), the count of ways to order n items.
- FACTDOUBLEReturns the double factorial n!!: the product of every other integer down from n.
- FLOOR.MATHRounds a number down to the nearest integer or multiple of significance, with control over negative numbers.
- FLOOR.PRECISERounds a number down (toward minus infinity) to the nearest integer or multiple, ignoring the significance sign.
- GCDReturns the greatest common divisor of two or more integers: the largest number that divides them all.
- INTRounds a number down to the nearest integer, toward minus infinity (−7.85 becomes −8).
- ISO.CEILINGRounds a number up toward plus infinity to the nearest integer or multiple; same results as CEILING.PRECISE.
- LCMReturns the least common multiple of integers: the smallest number all of them divide into evenly.
- LNReturns the natural logarithm (base e) of a positive number; the inverse of EXP.
- LOGReturns the logarithm of a number to a base you choose (base 10 if omitted).
- LOG10Returns the base-10 logarithm of a number, used for decibels, pH and orders of magnitude.
- MDETERMReturns the determinant of a square matrix, showing whether a system of equations has a unique solution.
- MINVERSEReturns the inverse of a square matrix as a spilled array; used with MMULT to solve linear equations.
- MMULTReturns the matrix product of two arrays as a spilled array (rows of the first times columns of the second).
- MODReturns the remainder after dividing one number by another; the result has the sign of the divisor.
- MROUNDRounds a number to the nearest multiple of another number, such as 0.05, 15 minutes or a pallet size.
- MULTINOMIALReturns the ratio of the factorial of a sum to the product of factorials: ways to split items into groups.
- MUNITReturns an identity matrix of the given size: 1s on the diagonal, 0s elsewhere.
- ODDRounds a number away from zero to the nearest odd integer.
- PERCENTOFReturns the share a subset represents of a total: SUM(subset) divided by SUM(all). Microsoft 365.
- PIReturns the constant π (3.14159265358979), accurate to 15 digits.
- POWERRaises a number to a power, e.g. squares, cubes, roots and compound growth. Same as the ^ operator.
- PRODUCTMultiplies all the numbers given as arguments or in ranges and returns the product.
- QUOTIENTReturns the whole-number part of a division, discarding the remainder (truncated toward zero).
- RADIANSConverts an angle from degrees to radians, the unit Excel's SIN, COS and TAN expect.
- RANDReturns a random decimal number from 0 up to (but not including) 1, recalculated every time the sheet changes.
- RANDARRAYReturns a spilled array of random numbers with the size, range and type (decimal or whole) you choose.
- RANDBETWEENReturns a random whole number between two values you specify, inclusive.
- ROMANConverts a number from 1 to 3999 into Roman numerals as text, in classic or simplified form.
- ROUNDRounds a number to a chosen number of digits, with halves rounded away from zero.
- ROUNDDOWNRounds a number toward zero to a chosen number of digits, cutting off the rest.
- ROUNDUPRounds a number away from zero to a chosen number of digits, e.g. to count boxes or billable units.
- SECReturns the secant of an angle in radians (1 / cosine), e.g. sloping length from a horizontal run.
- SECHReturns the hyperbolic secant of a number (1 ÷ COSH), a bell-shaped curve with peak 1 at zero.
- SEQUENCEGenerates a spilled list or grid of sequential numbers with a chosen start and step.
- SERIESSUMReturns the sum of a power series a1·x^n + a2·x^(n+m) + a3·x^(n+2m) + … for given coefficients.
- SIGNReturns 1 for a positive number, 0 for zero and −1 for a negative number.
- SINReturns the sine of an angle given in radians; used for heights on slopes, waves and seasonal patterns.
- SINHReturns the hyperbolic sine of a number; used e.g. for the length of a hanging cable.
- SQRTReturns the positive square root of a number.
- SQRTPIReturns the square root of a number multiplied by pi, √(number × π).
- SUBTOTALReturns a sum, count, average and more for a list, ignoring rows hidden by a filter and other SUBTOTAL results.
- SUMAdds numbers, cell ranges or both and returns the total. The most used function in Excel.
- SUMIFAdds the cells that meet one condition, such as all sales for the East region or every invoice above 500.
- SUMIFSAdds the values that meet several conditions at once, such as East-region laptop sales in April.
- SUMPRODUCTMultiplies matching items in arrays and adds the results; also the classic way to sum or count with complex conditions.
- SUMSQReturns the sum of the squares of the numbers given, e.g. for squared errors or distances.
- SUMX2MY2Adds up the difference of squares (x² − y²) for matching values in two arrays.
- SUMX2PY2Adds up the sum of squares (x² + y²) for matching values in two arrays.
- SUMXMY2Adds the squared differences between matching values in two arrays, the basis of RMSE and least squares.
- TANReturns the tangent of an angle in radians; turns an angle and a distance into a height or slope.
- TANHReturns the hyperbolic tangent of a number: a smooth S-curve between −1 and 1.
- TRUNCCuts a number to a given number of decimal places without rounding; the default removes all decimals.