LOG function

The LOG function in Excel returns the logarithm of a number to a specified base. The logarithm tells you how many times a certain base must be multiplied to reach the number.

Syntax

=LOG(number, [base])

Parameters

  • number: The positive real number for which you want to find the logarithm. This value must be greater than 0.
  • base (optional): The base of the logarithm. If omitted, the default base is 10, which calculates the common logarithm (logarithm with base 10). If specified, Excel will calculate the logarithm of the number with respect to the given base.

Return Value

The LOG function returns the logarithm of the given number to the specified base.

Examples

Example 1: Logarithm with Base 10 (Common Logarithm)

=LOG(1000)

Result: 3

Explanation: The logarithm of 1000 with base 10 is 3 because 103=100010^3 = 1000.

Example 2: Logarithm with a Custom Base

=LOG(16, 2)

Result: 4

Explanation: The logarithm of 16 with base 2 is 4 because 24=162^4 = 16.

Example 3: Logarithm with Base 10 (Default Behavior)

=LOG(100)

Result: 2

Explanation: The logarithm of 100 with base 10 is 2 because 102=10010^2 = 100.

Example 4: Using a Cell Reference

=LOG(A1, 2)

If cell A1 contains the number 64, the result will be the logarithm of 64 with base 2, which is 6 because 26=642^6 = 64.

Special Notes

  • Logarithms with Base 10: When the base is 10 (or if the base is omitted), this is called a common logarithm.
  • Natural Logarithm: If you want to calculate the natural logarithm (base e), you should use the LN function instead.
  • Error Handling: If the number is less than or equal to 0, Excel will return the #NUM! error because logarithms are only defined for positive numbers.
Leave a Reply 0

Your email address will not be published. Required fields are marked *