Related Function:

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

Syntax

=LOG(number,[base])

Arguments

Argument Description
number The positive real number for which you want the logarithm
[base] Optional. The base of the logarithm

 • If [base] is omitted, it is assumed to be 10, i.e. the logarithm to the base 10 is calculated

Examples

A B C D
1 Formula Result Notes Description
2 =LOG(10) 1 Logarithm of 10. Because the second argument (base) is omitted, it is assumed to be 10 101 = 10; therefore, log10 = 1
3 =LOG(8,2) 3 Logarithm of 8 with base 2 23 = 8; therefore, log2(8) = 3
4 =LOG(64,2) 6 Logarithm of 64 with base 2 26 = 64; therefore, log2(64) = 6
5 =LOG(4,0.5) -2 Logarithm of 4 with base 0.5 0.5-2 = 4; therefore, log0.5(4) = -2

Common Function Error(s)

Problem What went wrong
#NUM! Occurs if either the supplied number argument or the supplied [base] argument is negative or zero
#DIV/0! Occurs if the supplied [base] argument is equal to 1
#NAME? Occurs if the supplied number argument or the supplied [base] argument is not a numeric value

The logarithm of a number, to a given base, is the power to which the base must be raised to give that number; it is the inverse operation to exponentiation. Therefore, if

then