Updated April 29, 2023

## LOG in Excel

The LOG function is a worksheet function categorized under the Math/Trigonometry function.

As per Mathematics, the logarithm is defined as an inverse function to exponentiation or logarithm of a positive real number x with respect to base b. i.e. b^{x}=y

**E.G.** log_{2} 16 = 4, since 2^{4} = 2 ×2 × 2 × 2 = 16

Here, the logarithm (with respect to base 2) of 16 is 4.

The LOG function in Excel is easy to use & very simple; it is the most widely used function in statistics, finance & business analytics, or domains.

The LOG function is also used to plot a graph for data representation & it is used with other tools for regression analysis.

The LOG function performs the inverse operation to that of a POWER function.

LOG function in Excel calculates the logarithm of a given number to a supplied base or returns the natural logarithm of a number.

**E.G.** 1000 = 10 × 10 × 10 = 10^{3}, the “logarithm to base 10” of 1000 is 3, i.e. logarithm counts repeated multiplication of the same factor. The logarithm of a given number x is the exponent to a fixed number, the base b, must be raised to produce that number x.

i.e. If a^{x} = b Then Log_{a}(b) = x.

### LOG Formula in Excel

Below is the LOG Formula in Excel :

**or **

### Explanation of LOG Function in Excel

LOG formula in Excel consists of two things Number & Base.

**Number**= It is a positive real number that you want to calculate the logarithm in Excel.

**Note:**It should be a numeric value that must always be greater than zero.

**Base**= It is a base to which the logarithm should be calculated or an optional argument specifying or indicating the base to which the logarithm should be calculated.

**Note:**If no base is listed, the base is assumed to be 10.

**How to Use the LOG Function in Excel?**

The LOG function in Excel is very simple and easy to use. Let us understand the working of the LOG function in Excel by some LOG Formula examples.

#### Example #1 – With Base Argument

In the below-mentioned example, let’s calculate the logarithm in Excel of 47, with a base value of 10.

Follow these steps to calculate the LOG in Excel:

- Select the output cell where we need to find out the log value, i.e. D8 in this example.

- Click the function button (fx) under the formula toolbar; a popup will appear; double-click on the LOG function under the select function.

- A dialog box appears where arguments (Number & Base) for the log function need to be filled.

- Here the number is 47 & the base argument is 10.

- Excel calculates the logarithm value and displays the answer 1.6720979 in the output cell.

#### Example #2 – Without Base Argument

In the below-mentioned example, let’s calculate the logarithm of 100 without a base value.

Follow these steps to calculate the LOG in Excel:

- Select the output cell where we need to find out the log value, i.e. D13 in this example.

- Click the function button (fx) under the formula toolbar; a popup will appear; double-click on the LOG function under the select function.

- A dialog box appears where arguments (Number & Base) for the log function need to be filled.

- Here the number is 100 & In this log function example, the Log function by default takes the base value as 10 if the second argument (Base) is not passed in the log function.

- Excel calculates the logarithm value and displays the answer
**2**in the output cell. i.e. 100 = 10 × 10 = 10^{2}, the “logarithm to base 10” of 100 is 2 i.e. logarithm counts repeated multiplication of the same factor. Therefore, it returns the output value or a result as 2.

#### Example #3 – With Decimal Value As Base Argument

In the below-mentioned example, let’s calculate the logarithm of 6, with the decimal value 0.5 as the base argument.

Follow these steps to calculate the LOG in Excel:

- Select the output cell where we need to find out the log value, i.e. D17 in this example.

- Click the function button (fx) under the formula toolbar; a popup will appear; double-click on the LOG function under the select function.

- A dialog box appears where arguments (Number & Base) for the log function need to be filled.

- Here the number is 6 & the base argument is 0.5.

- Excel calculates the logarithm value and displays the answer -2.584963 in the output cell. i.e. 0.5
^{-2}= 6; Therefore, Log_{0.5}(6) = -2.584963

#### Example #4 – **When Base Argument is Negative Value or Zero**

In the below-mentioned example, let’s calculate the logarithm in Excel of 47, with the base argument “0” ZERO or Negative value (-10).

Follow these steps to calculate the LOG in Excel:

- Select the output cell where we need to find out the log value, i.e. K8 in this example.

- A dialog box appears where the log function’s arguments (Number & Base) need to be filled.

- Here the number is 47 & the base argument is -1.

or 0.

- Calculate the logarithm in Excel value and display the answer #NUM! Error in the output cell.

#### Example #5 – When Base Argument is Non-Numeric Or Text Value

In the below-mentioned example, let’s calculate the logarithm of 47, where the base argument is a text string, i.e. “EXCEL”.

Follow these steps to calculate the LOG in Excel:

- Select the output cell where we need to find out the log value, i.e. K16 in this example.

- A dialog box appears where arguments (Number & Base) for the log function need to be filled.

- The number is 47 & the base argument is TEXT string, i.e. EXCEL.

- Excel calculates the logarithm value and displays the answer #VALUE! Error in the output cell.

**Things to remember about the LOG Function in Excel**

**Number argument in LOG Function:**It should always be a positive real number you want to calculate the logarithm in Excel.- It should be a numeric value & must always be greater than zero.
- If no base is listed in a Base argument, the base is always assumed to be 10.

### LOG Function Errors

If there is an error from the Log function, it is due to one of the following:

**Common Errors**

** 1) #VALUE! **– It Occurs due to or if supplied number argument or the supplied [base] argument is non-numeric.

**2) #NUM! – **It Occurs due to or if the supplied number argument or the supplied [base] argument is the negative value or zero.

The output will be :

**3) #DIV/0! **– It Occurs if the supplied [base] argument equals 1.

The output will be :

### Recommended Articles

This has been a guide to the LOG in Excel. Here we discuss the LOG Formula in Excel and How to use LOG Function in Excel, along with practical examples and a downloadable Excel template. You can also go through our other suggested articles –