Documentation/Calc Functions/LOG/en

Function name:
LOG

Category:
Mathematical

Summary:
Calculates the logarithm to a specified base of a positive real number.

Syntax:
LOG(Number [; Base])

Returns:
Returns a real number that is the logarithm to the specified base of the given number.

Arguments:
Number is a positive real number, or a reference to a cell containing that number, that is the value for which the logarithm is to be calculated.

Base is a positive real number, or a reference to a cell containing that number, that is the base to be used for calculating the logarithm of Number. If Base is omitted, LOG uses a default value of 10.


 * If either Number or Base is non-numeric, then LOG reports a #VALUE! error.
 * If either Number or Base is less than or equal to 0, then LOG reports an invalid argument error (Err:502).
 * If Base is equal to 1, then LOG reports an invalid argument error (Err:502).

Additional details:
$$\text{log}_b(x)~=~\frac{\text{log}_d(x)}{\text{log}_d(b)}$$
 * The following change of base formula may be used to determine a logarithm for any base:
 * This formula is valid for positive real numbers x, b, and d, such that neither b nor d is equal to 1.


 * The figure below illustrates the LOG function when Base is set to 2 (known as binary logarithms).


 * See LN for the corresponding illustration when Base is set to the mathematical constant e (natural logarithms).


 * See LOG10 for the corresponding illustration when Base is set to 10 (common logarithms).

Related LibreOffice functions:
EXP

LN

LOG10

POWER

ODF standard:
Section 6.16.40, part 2

Equivalent Excel functions:
LOG