# Documentation/Calc Functions/LOG

Jump to navigation Jump to search
Other languages:
English • ‎dansk

LOG

Mathematical

## Summary:

Returns the logarithm of a number to the specified base.

## Syntax:

LOG(Number [; Base])

## Returns:

Returns a real number that is the logarithmic value of the Number for the Base.

## Arguments:

Number is the positive real value or a reference to the cell containing that value whose logarithm is to be calculated.

Base (optional) is the positive real value or a reference to the cell containing that value which is the base for the logarithm calculation. If omitted, base 10 is assumed.

If either of the arguments are negative or 0, the function returns an error value.

## Additional details:

The figure below illustrates the LOG function for base-e, base-2 and base-10:

## Examples:

Formula Description Returns
=LOG(10;3) the logarithm of 10 base 3 2.09590327428938
=LOG(7^4;7) the logarithm of 7 raised to the power 4 with base 7 is itself 4
=LOG(-5;2) function returns an error value since one of the arguments is negative Err:502
=LOG(5;-2) function returns an error value since one of the arguments is negative Err:502

LOG