Math

Google Sheets: Math

ROUND()

ROUND(value, [places])

The ROUND function rounds a number to a certain number of decimal places according to standard rules.

Formula Result
=ROUND(826.645, 0) 827
=ROUND(826.645) 827
=ROUND(826.645, 1) 826.6
=ROUND(826.645, 2) 826.65
=ROUND(826.645, 3) 826.645
=ROUND(826.645, -1) 830
=ROUND(826.645, -2) 800

FLOOR()

FLOOR(value, [factor])

Rounds a number down to the nearest integer multiple of specified significance.

Formula Result
=FLOOR(126.85, 0.1) 126.8
=FLOOR(126.85, 1) 126
=FLOOR(126.85, 2) 126
=FLOOR(126.85, 10) 120
=FLOOR(126.85, 100) 100

CEILING()

CEILING(value, [factor])

The CEILING function rounds a number up to the nearest integer multiple of specified significance.

Formula Result
=CEILING(126.85, 0.1) 126.9
=CEILING(126.85, 1) 127
=CEILING(126.85, 2) 128
=CEILING(126.85, 10) 130
=CEILING(126.85, 100) 200

POWER() or POW()

POWER(base, exponent)

POW(base, exponent)

Returns a number raised to a power.

Formula Result
=POWER(2, 4) 16
=POWER(3, 1.5) 5.196152423
=POWER(0, 10) 0
=POWER(10, 0) 1

SQRT()

SQRT(value)

Returns the positive square root of a positive number.

Formula Result
=SQRT(4) 2
=SQRT(16) 4
=SQRT(0) 0
=SQRT(-6) #NUM!

MOD()

MOD(dividend, divisor)

Returns the result of the modulo operator, the remainder after a division operation.

dividend divisor Result Formula
5 2 1 =MOD(5, 2)
36 6 0 =MOD(36, 6)
10 0 #DIV/0! =MOD(10, 0)

ABS()

ABS(value)

Returns the absolute value of a number.

Formula Result
=ABS(-26) 26
=ABS(-3.68) 3.68
=ABS(-6/3) 2

INT()

INT(value)

Rounds a number down to the nearest integer that is less than or equal to it.

Formula Result
=INT(10) 10
=INT(6.18) 6
=INT(-6.18) -7
=INT(2.49) 2
=INT(-2.49) -3

PRODUCT()

PRODUCT(factor1, [factor2, ...])

Returns the result of multiplying a series of numbers together.

Formula Result
=PRODUCT(1, 2, 3) 6
=PRODUCT(-2, -1, 1, 40) 80
=PRODUCT(2, -2, 6, 0) 0

LOG()

LOG(value, [base])

Returns the logarithm of a number given a base. Base 10 by default

Formula Result
=LOG(100, 10) 2
=LOG(100) 2
=LOG(50, 10) 1.698970004
=LOG(50) 1.698970004
=LOG(125, 5) 3

BASE()

BASE(value, base, [min_length])

The BASE function converts a decimal number into a text representation in another base. For example, base 2 for binary.

Formula Result
=BASE(255, 16) FF
=BASE(4095, 16, 6) 000FFF
=BASE(21, 2) 10101
Function Description
DECIMAL The DECIMAL function converts the text representation of a number in another base, to base 10 (decimal).
BIN2DEC The BIN2DEC function converts a signed binary number to decimal format.
BIN2HEX The BIN2HEX function converts a signed binary number to signed hexadecimal format.
BIN2OCT The BIN2OCT function converts a signed binary number to signed octal format.
OCT2BIN The OCT2BIN function converts a signed octal number to signed binary format.
OCT2DEC The OCT2DEC function converts a signed octal number to decimal format.
OCT2HEX The OCT2HEX function converts a signed octal number to signed hexadecimal format.
DEC2BIN The DEC2BIN function converts a decimal number to signed binary format.
DEC2OCT The DEC2OCT function converts a decimal number to signed octal format.
DEC2HEX The DEC2HEX function converts a decimal number to signed hexadecimal format.
HEX2BIN The HEX2BIN function converts a signed hexadecimal number to signed binary format.
HEX2DEC The HEX2DEC function converts a signed hexadecimal number to decimal format.
HEX2OCT The HEX2OCT function converts a signed hexadecimal number to signed octal format.

All Math Function

  • ABS
  • ACOS
  • ACOSH
  • ACOT function
  • ACOTH function
  • ASIN
  • ASINH
  • ATAN
  • ATAN2
  • ATANH
  • BASE function
  • CEILING
  • CEILING.MATH function
  • CEILING.PRECISE function
  • COMBIN
  • COMBINA function
  • COS
  • COSH
  • COT function
  • COTH function
  • COUNTBLANK
  • COUNTIF
  • COUNTIFS
  • COUNTUNIQUE
  • CSC function
  • CSCH function
  • DECIMAL function
  • DEGREES
  • ERFC
  • EVEN
  • EXP
  • FACT
  • FACTDOUBLE
  • FLOOR
  • FLOOR.MATH function
  • FLOOR.PRECISE function
  • GAMMALN
  • GCD
  • IMLN function
  • IMPOWER function
  • IMSQRT function
  • INT
  • ISEVEN
  • ISODD
  • LCM
  • LN
  • LOG
  • LOG10
  • MOD
  • MROUND
  • MULTINOMIAL
  • MUNIT function
  • ODD
  • PI
  • POWER function
  • PRODUCT
  • QUOTIENT function
  • RADIANS
  • RAND
  • RANDBETWEEN
  • ROUND function
  • ROUNDDOWN
  • ROUNDUP
  • SEC function
  • SECH function
  • SEQUENCE function
  • SERIESSUM
  • SIGN
  • SIN
  • SINH
  • SQRT
  • SQRTPI
  • SUBTOTAL function
  • SUM
  • SUMIF
  • SUMIFS function
  • SUMSQ
  • TAN
  • TANH
  • TRUNC
  • RANDARRAY function

Reference