Numeric functions

ABS (Absolute Value)

    Calculates the absolute value of a numeric value. The result is either a positive number or zero.

    Format: =ABS(number)

    Argument:
    number: a numeric expression

    Example: If cell A1 contains 5, =ABS(A1) returns 5.
    If cell A1 contains -5, =ABS(A1) returns 5.
    If cell A1 is blank, =ABS(A1) returns 0.

Top

BASETONUM

    Interprets text of a specified base and returns a number in base 10. This function is the reverse of NUMTOBASE.

    Format: =BASETONUM(text,base)

    Arguments:
    text: a string (limited to 255 characters)
    base: a value between 1 and 36

    Example: =BASETONUM(1001,2) interprets 1001 as binary and returns 9.

Top

EXP (Exponent)

    Calculates e to the power of the argument number.

    Format: =EXP(number)

    Argument:
    number: a numeric expression

    Example: =EXP(sin(radians(45))) returns 2.02811. The sine of 45 degrees is 0.71..., and e0.71 equals 2.02811.

Top

FACT (Factorial)

    Calculates the factorial of a number.

    Format: =FACT(number)

    Argument:
    number: a positive whole number

    Example: =FACT(5) returns 120, or 5 x 4 x 3 x 2 x 1.

Top

FRAC (Fraction)

    Calculates the fractional part of a real number. The result is always positive.

    Format: =FRAC(number)

    Argument:
    number: a numeric expression

    Example: =FRAC(22.575) returns 0.575, the fractional part of the number (to the right of the decimal point).

Top

INT (Integer)

    If the argument is a positive real number, INT returns the integer equal to or less than the value in the argument number. If the argument is a negative real number, INT rounds it down to the next lowest whole number.

    Format: =INT(number)

    Argument:
    number: a numeric expression

    Example: =INT(5.76) returns 5, the integer closest to but not greater than the value in the argument.

Top

LN (Natural Log)

    Calculates the natural logarithm of a number.

    Format: =LN(number)

    Argument:
    number: a positive number

    Example: =LN(2.71828) returns 1.00 (when using a fixed format and a precision of 2), the natural log of 2.71828.

Top

LOG

    Calculates the logarithm of a number to a base.

    Format: =LOG(number,base)

    Arguments:
    number: a positive number
    base (optional): a positive number not equal to 1. If base is omitted, it's assumed to be 10.

    Example: =LOG(2) returns 0.301 (when using a fixed format and a precision of 3), the logarithm of 2. Because no argument is included for base, the base is assumed to be 10.

Top

LOG10 (Log to Base 10)

    Calculates the logarithm of a number to base 10. This function is the inverse of the number E in scientific notation.

    Format: =LOG10(number)

    Argument:
    number: a positive number

    Example: If cell C2 contains 100000, =LOG10(C2) returns 5, the exponent of the scientific representation of the number.

Top

MOD (Modulo)

    Calculates the remainder when a number is divided by another number. The result has the same sign as the value of the number being divided.

    Format: =MOD(number,divisor number)

    Arguments:
    number: a number, cell reference, or arithmetic operation. This number is the dividend.
    divisor number: any number but 0. The divisor can be a negative number, but the sign of the result is that of the dividend, not the divisor.

    Example: =MOD(4.5,-2) returns 0.5.

Top

NUMTOBASE

    Converts a number in base 10 into another base and returns a string that uses 0-9 first and then A-Z to represent digits beyond base 10. This function is the reverse of BASETONUM.

    Format: =NUMTOBASE(number,base,min digits)

    Arguments:
    number: a number in base 10
    base: a value between 1 and 36
    min digits (optional): the minimum number of digits that will represent the result. If the result has fewer digits than given in min digits, then leading zeros are used.

    Example: =NUMTOBASE(255,2,8) returns 11111111. =NUMTOBASE(255,16,1) returns FF.

Top

PI

    Supplies the value of pi, the ratio of a circle's circumference to its diameter.

    Format: =PI()

    Argument: No argument

    Example: =PI() returns 3.141592653...

Top

RAND (Random)

    Generates a random number between 1 and the argument. If no argument is supplied, the returned value is between 0 and 1.

    Format: =RAND(number)

    Argument:
    number (optional): the upper limit of the random number

    Example: =RAND() returns, for example, 0.67, 0.12, 0.8, and so on. Because no argument is provided, RAND returns a number between 0 and 1.

Top

ROUND

    Returns a number rounded to the specified number of digits from the decimal point.

    Format: =ROUND(number,number of digits)

    Arguments:
    number: a number or numeric expression
    number of digits: a number or numeric expression. A negative number represents the number of digits to the left of the decimal point; a positive number represents the number of digits to the right of the decimal point.

    Example: =ROUND(1572.589,-2) rounds 1572.589 to two digits to the left of the decimal point and returns 1600.

Top

SIGN

    Returns 1 when the argument number is positive, -1 when it is negative, and 0 when it is zero.

    Format: =SIGN(number)

    Argument:
    number: a number or numeric expression

    Example: =SIGN(123.56) returns 1.

Top

SQRT (Square Root)

    Calculates the square root of a number.

    Format: =SQRT(number)

    Argument:
    number: a positive number or numeric expression

    Example: =SQRT(12.25) returns 3.5, the square root of 12.25.

Top

TRUNC (Truncate)

    Truncates a number to an integer by discarding the fractional portion of the number.

    Format: =TRUNC(number)

    Argument:
    number: a numeric expression

    Example: =TRUNC(10.9) returns 10.

Top

Related topic

 


Table of contents | Index