The Excel LOG Function

Related Function:
LN Function
Logarithm

The Logarithm of a number, to a given base, is the power to which the base must be raised to give that number.

Therefore,

If   ax = b   Then   Lna(b) = x

Basic Description

The Excel LOG function calculates the logarithm of a given number, to a supplied base.

The syntax of the function is:

LOG( number, [base] )

where the arguments are as follows:


number-The positive real number that you want to calculate the logarithm of.
[base]-

An optional argument that specifies the base to which the logarithm should be calculated.

If omitted, the [base] argument uses the default value 10 (i.e. the logarithm to the base 10 is calculated).


Excel Log Function Examples

The following spreadsheet shows four examples of the Excel Log function:

 Formulas:
 A
1=LOG( 64, 2 )
2=LOG( 100 )
3=LOG( 4, 0.5 )
4=LOG( 500 )
 Results:
 AB
16  26 = 64; Therefore, Log2(64) = 6
22  102 = 100; Therefore, Log10(100) = 2
3-2  0.5-2 = 4; Therefore, Log0.5(4) = -2
42.698970004  102.698970004 = 500; Therefore, Log10(500) = 2.698970004

Note that, in cells A2 and A4 of the above spreadsheet, the [base] argument has not been supplied to the function and so, in these cases, base 10 is used.


Further examples of the Excel Log function are provided on the Microsoft Office website.


Log Function Errors

If you get an error from the Excel Log function, this is likely to be one of the following:

Common Errors
#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.
#VALUE!-Occurs if the supplied number argument or the supplied [base] argument is non-numeric.