How to Use LN Function in Excel (9 Examples)

Get FREE Advanced Excel Exercises with Solutions!

The LN function in Excel is a Math Function that returns the natural logarithm of a number. Here is an overview:

the LN Function in Excel


Introduction to the LN Function

Objective: To calculate the natural logarithm of a number.
Syntax: =LN(number)
Arguments: number- that you want to calculate the natural logarithm of


How to Use the LN Function in Excel: 9 Examples

Integer Numbers: In mathematics, integers are a set of whole numbers that can be positive, negative, or zero, but cannot be a fraction.

1. Find Out the Natural Logarithm of a Positive Integer Number Using the LN Function in Excel

The integer numbers include positive whole numbers like 1,2,3,4, etc. Let’s compute the natural logarithm for them.

How to Do: In cell E5 put the following formula:

=LN(2)

the LN Function in Excel

Result: The natural logarithm of positive integer 2 results as 0.69

Similarly, we can get the natural logarithms of all positive integers as we did in the example for 3,4,5, and 10  


2. Compute the Natural Logarithm of a Negative Integer Number

The integer numbers include negative whole numbers like -1,-2,-3,-4, etc. let’s compute the natural logarithm for them.

How to Do: In cell E5 put the following formula:

=LN(-1)

Result: The natural logarithm of negative integer -1 results in  #NUM! error.

Similarly, as shown in the example, any negative number will result in #NUM! error in the LN function.  


3. Evaluate the Natural Logarithm of 0 by the LN Function

Zero (0) is an integer number as we described before. Let’s evaluate the natural logarithm for zero.

How to Do: In cell E5 put the following formula:

=LN(0)

evaluate Natural Logarithm of Zero Using the LN Function in Excel

Result: The natural logarithm of zero (0) results in  #NUM! error.  


4. Calculate the Natural Logarithm of a Fractional Number

Fractions: In Mathematics, fractions are defined as parts of whole numbers that can be both positive and negative.

4.1 Natural Logarithm for a Positive Fractional Number

How to Do: In cell E5 put the following formula:

=LN(0.1)

Natural Logarithm of Fractions the LN Function in Excel

Result: The natural logarithm of 0.1 is –2.30.

Similarly, we can see from the example that the natural logarithm of positive fractional numbers will result in negative fraction numbers.  


4.2 Natural Logarithm for a Negative Fractional Number

How to Do: In cell E8 put the following formula:

=LN(0-.5)

Result: The natural logarithm of all negative fractional numbers will result in  #NUM! error as shown in the example. 


5. Use the LN Function to Calculate the Natural Logarithm of 1 

How to Do: In cell D5 put the following formula:

=LN(1)

Natural Logarithm of 1 Using the LN Function in Excel

Result: The natural logarithm of 1 results in 0.


6. Natural Logarithm of 2.718 Using the LN Function in Excel 

The LN is a function that works opposite of the EXP function. In this example, we first calculated the exponential of 1 and then used the result as input for the LN function.

How to Do:

  • In the cell, D5 put the following formula:
=EXP(1)

the LN Function in Excel

  • In D6 put D5 as the input for the LN function, i.e.
 =LN(D5)

the LN Function in Excel

Result: The natural logarithm of 2.718 results in 1.


7. Find Out the Natural Logarithm of a Non-numeric Value

The LN function cannot evaluate a non-numeric value as it is a Mathematical function. Let’s dive into the example:

How to Do: In cell E5 put the following formula:

=LN(a)

Natural Logarithm of Non-numeric Values Usingthe LN Function in Excel

Result: The natural logarithm of the non-numeric value a results in  #NAME? error.

Similarly, any non-numeric values or a combination of number and non-numeric values results in #NAME? or #VALUE! error.


8. Figure Out the Natural Logarithm of an Exponential Number Using the LN Function in Excel 

The LN function and the EXP function are opposite of each other. When we use the EXP function nested within the LN function it results in the argument of the EXP function itself. 

See a bunch of examples in the screenshot below:

Natural Logarithm of Exponentials Using the LN Function in Excel


9. Relation Between LN and LOG Function

The LN function is a form of the LOG function that has e as its base. In this example, we’ll show how these two can be used alternately to get the same result.

How to Do: 

  • Put the following formula in cell E5
=LOG(4,EXP(1))

  • In the next step, write the LN function which takes 4 as its argument. 

Result: The output from both the formulas is 1.39 which confirms our previous statement.


Things to Remember

  • The LN function only allows positive numbers (whole or fractional) as arguments.
  •  Negative whole numbers, negative fractional numbers and zero will result in #NUM! error as they are considered invalid arguments for the LN function.

Download the Practice Workbook

Download this practice workbook to exercise while you are reading this article.


Conclusion

Now, we know how to use the LN function in Excel. Hopefully, it would encourage you to use this function more confidently. Any questions or suggestions don’t forget to put them in the comment box below.


<< Go Back to Excel Functions | Learn Excel

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Al Arafat Siddique
Al Arafat Siddique

Al Arafat Siddique, BSc, Naval Architecture and Marine Engineering, Bangladesh University of Engineering and Technology, has worked on the ExcelDemy project for two years. He has written over 85+ articles for ExcelDemy. Currently, he is working as a software developer. He is leading a team of six members to develop Microsoft Office Add-ins, extending Office applications to interact with office documents. Other assigned projects to his team include creating AI-based products and online conversion tools using the latest... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo