Excel Functions Tutorials

- Excel Formulas Cheatsheet
- Excel
- Financial Functions in Excel
- Logical Functions in Excel
- TEXT Functions in Excel
- Lookup Reference in Excel
- Address Function in Excel
- Choose Function in Excel
- Column Function in Excel
- Columns Function in Excel
- REPLACE Function in Excel
- GetPivotData in Excel
- HLOOKUP in Excel
- Hyperlink Excel Function
- INDIRECT Function in Excel
- LOOKUP Excel Function
- Match Excel Function
- VLOOKUP Excel Function
- INDEX Excel Function
- VLOOKUP vs HLOOKUP

- Maths Functions in Excel
- POWER Function in Excel
- EVEN Function in Excel
- ODD Function in Excel
- ABS Function in Excel
- SUM Function in Excel
- SUMPRODUCT Function in Excel
- SUBTOTAL Excel Function
- ROUND in Excel
- AGGREGATE Excel Function
- PRODUCT Excel Function
- RAND Excel Function
- LOG Excel Function
- EXPONENTIAL Excel Function
- SUMIF in Excel
- TAN Excel Function
- CEILING Excel Function
- LN Excel Function
- SIGN Excel Function
- COS Excel Function
- FLOOR Function in Excel
- SIN Excel Function

- Date and Time Function in Excel
- Statistical Function in Excel

**LN Function on Excel (Table of Contents)**

- LN in Excel
- What is the Natural Logarithm Function?
- LN Formula in Excel
- How to use LN Function in Excel?

## LN Function in Excel

It is a built-in function in MS Excel. LN excel is categorized under Math Functions in MS Excel. Excel LN is used to calculate the natural logarithm of a number.

### What is the Natural Logarithm Function?

The natural logarithm of a number is its logarithm to the base of the mathematical constant ** e**, where

**is an irrational and transcendental number approximately equal to 2.718281828459. The natural logarithm function of x is generally written as**

*e**ln*

*x*,

*loge x,*or sometimes, if the base

*e*is implicit, simply

*log x*.

So, Ln(Number) = LOG (Number, e)

Where e~= 2.7128

Below is the LN Function Graph

In the LN Function Graph above, the X-axis indicates the number for which log is to be calculated and the Y-axis indicates the log values. E.g. log(1) is 0 as shown in the LN Function Graph.

### LN Formula in Excel

The formula of LN function Excel is as follows:* *

LN Formula has three arguments out of which two are optional. *Where,*

*number**= This is a required parameter. It indicates the number for which the natural logarithm function is to be calculated. The number must be a positive real number.*- If the parameter is a negative number, it returns an error with #NUM! indicating error with the number.
- If the parameter is zero, it returns an error with #NUM! indicating error with the number.
- If the parameter is a non-numeric value, it returns an error with #VALUE! indicating error with the generated value.

**How to use LN Function in Excel?**

The said function is a Worksheet (WS) function. As a WS function, Excel LN Function can be entered as a part of the formula in a cell of a worksheet. Refer to the examples given below to understand better.

#### LN in Excel Worksheet

Let’s look at the examples given below. Each example covers a different use case implemented using LN Excel.

### LN in Excel Example #1 – Fractional number

In this example, cell C2 has a LN formula associated with it. So, C2 is a result cell. The first argument of the LN in excel is B2, the number for which log is to be calculated. The number is 0.5 and the log of 0.5 is -0.693147. So, the value of the resultant cell is -0.693147.

### LN in Excel Example #2 – Zero number

In this example, cell C4 has a LN formula associated with it. So, C4 is a result cell. The first argument of the LN in excel is B4, the number for which log is to be calculated. The number is 0 and the log of 0 cannot be calculated. LN function in Excel doesn’t accept number value as zero and hence the error is thrown in return. The error is #NUM! which indicates the number is erroneous.

### LN in Excel Example #3 – Integer number

In this example, cell C6 has a LN formula associated with it. So, C6 is a result cell. The first argument of the LN in excel is B6, the number for which log is to be calculated. The number is 5 and the log of 5 is 1.609437912. So, the value in the resultant cell is 1.609437912.

### LN in Excel Example #4 – Non-numeric Value

In this example, cell C8 has a LN formula associated with it. So, C8 is a result cell. The first argument of the LN in excel is B8, the number for which log is to be calculated. The number is ‘abc’ and the log of non-numeric value cannot be calculated. LN function in Excel returns an error when the log cannot be calculated for such a value. The error is #VALUE! which indicates the value is erroneous.

### LN in Excel Example #5 – Negative Number

In this example, cell C10 has a LN formula associated with it. So, C10 is a result cell. The first argument of the LN in Excel is B10, the number for which log is to be calculated. The number is -1.2 and the log of a negative number cannot be calculated. Since the value is negative, the LN function in Excel returns an error indicating the value is erroneous. So, the value in the resultant cell is #NUM! which indicates the number is erroneous.

**Things to Remember About the LN** **Function in Excel**

- The LN function in Excel accepts an only positive real number as its parameter. The divisor cannot be zero.
- If the parameter is a negative number, it returns an error with #NUM! indicating an error with the number.
- If the parameter is zero, it returns an error with #NUM! indicating an error with the number.
- If the parameter is a non-numeric value, it returns an error with #VALUE! indicating an error with the generated value.

**Excel VBA for a Similar Purpose**

VBA has a separate inbuilt function to calculate the natural logarithm function which is LOG. It can be used as follows.

**Example**:

Let’s look at the example given below for better understanding.

*logVal = LOG (5)*

*logVal: 1.609437912*

Here, 5 is the number for which natural logarithm function is to be calculated. Log (5) to the base e is, 1.609437912. So, the variable logVal holds value 1.609437912.

You can download this LN Function in Excel template here – LN Excel Template

### Recommended Articles

This has been a guide to LN Function in Excel. Here we discuss the LN Formula in excel and how to use LN function along with excel example and downloadable excel templates. You may also look at these useful functions in excel –

## Leave a Reply