Documentation/Calc Functions/LOG

From The Document Foundation Wiki
Jump to: navigation, search
Other languages:
English

Function name:

LOG

Category:

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 GIFs below illustrates the LOG function for base-e, base-2 and base-10:

LOG base-e
LOG base-2
LOG 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

Related LibreOffice functions:

LN

LOG10

POWER

EXP

ODF standard:

Section 6.16.41, part2

Equivalent Excel functions:

LOG