LOG

The LOG function returns the logarithm of a number to the base that you specify.

Syntax

LOG(
    number
    [,base]
)

Parameters
  • number: Number whose logarithm you want to calculate.
  • base: Optional argument. Base of the logarithm.
Returned value

The LOG function returns a real number.

Additional Information

number must be a number greater than zero. In any other case the LOG function will return an error. If the base argument is omitted, the logarithm to base 10 will be calculated.

The graph of the logarithm function in base 2 is shown below:

log2(x)
Examples

The logarithm in base 2 of the number 8 is calculated, resulting in the number 3:

LOG function. Example of use

In this example, the logarithm of 100 is calculated without specifying the base, so base 10 is considered by default, returning the number 2:

LOG function. Example of use

Related functions
Category
Mathematical and trigonometric
Submitted by admin on Tue, 12/04/2018 - 12:46