In this Article

*This Tutorial demonstrates how to use the Excel LN Function in Excel to calculate the natural logarithm to a number.*

## LN Function Overview

The LN Function Calculates the natural logarithm of a number.

To use the LN Excel Worksheet Function, select a cell and type:

(Notice how the formula inputs appear)

## LN Function Syntax and Inputs:

1 |
=LN(number) |

**number** – A number.

**LN Function **

The LN Function returns the natural logarithm of a number entered.

1 |
=LN(70) |

**LN & EXP Function**

The inverse of LN Function is EXP Function. If EXP Function is nested within LN Function, it will return the given argument as it is.

1 |
=LN(EXP(6)) |

Alternatively, the same observation can be made if the argument is given as a power of e.

1 |
=LN(POWER(EXP(1),2)) |

Here the POWER Function raises the natural number e to the power of 2. To learn more about POWER Function, click here.

Note: The number natural e cannot be directly entered in Excel so EXP(1) is used. You can explore the EXP Function here.

**LN & LOG Function**

The LN Function is the special case of LOG Function with the base e. LOG(4,e) will return the same result as LN(4).

1 |
=LOG(4,EXP(1)) |

LOG Function is discussed in detail, click here to learn more.

**LN Function – Negative Number/Zero**

The LN Function will return an error if the argument is zero or a negative number.

1 |
=LN(0) |

1 |
=LN(-9) |

**LN** in Google Sheets

The LN Function works exactly the same in Google Sheets as in Excel:

## Additional Notes

Use the LN Function to calculate the natural logarithm of a number. Simply enter any number directly into the formula, or reference a cell containing a number.

## LN Examples in VBA

You can also use the LN function in VBA. Type:

`application.worksheetfunction.ln(number)`

For the function arguments (number, etc.), you can either enter them directly into the function, or define variables to use instead.

1 |
Application.WorksheetFunction.Ln(5) |

will return the natural logarithm of number 5, which is 1.6094

Also, we can use an existing cell as an input parameter, so if we enter the following VBA command

1 |
Range("B1") = Application.WorksheetFunction.Ln(Range("A1")) |

and the value in cell A1 is 4, we will get the following result:

Return to the List of all Functions in Excel