Log
LOG Function¶
The LOG function in Excel is used to calculate the logarithm of a number to a specified base. This function is
versatile and allows you to calculate logarithms for various bases such as 2, 10, or any other positive number.
Syntax:¶
LOG(number, [base])
- number: The positive numeric value for which you want to calculate the logarithm.
- base (optional): The base of the logarithm. If omitted, the default base is
10.
Examples:¶
-
=LOG(1000, 10)
Returns3, because10^3 = 1000. -
=LOG(8, 2)
Returns3, because2^3 = 8. -
=LOG(81, 3)
Returns4, because3^4 = 81. -
=LOG(1, 10)
Returns0, because10^0 = 1. -
=LOG(32, 2)
Returns5, because2^5 = 32. -
=LOG(100)
Returns2, because the default base is10, and10^2 = 100.
Usage Notes:¶
- The number must be positive; otherwise, the function will return a
#NUM!error. - The base must be a positive number and cannot be
1, as logarithms with those values are undefined. - If base is omitted, Excel assumes a base of
10(default logarithm base). - Use the
LOGfunction in various contexts such as mathematical, financial, or scientific computations whenever non-default bases are needed. For simple base-10 logarithms, you may also use theLOG10function.