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


Download the Practice Workbook

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


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


9 Examples of Using the LN Function in Excel

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

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  

Read More: How to Use Excel LOG Function (5 Easy Methods)


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.  

Read More: 51 Mostly Used Math and Trig Functions in Excel


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.  

Read More: 44 Mathematical Functions in Excel (Download Free PDF)


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. Learn more

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.


Similar Readings


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.

Read More: How to Use Excel EXP Function (5 Examples)


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.

Read More: Exponential Notation E in Excel & How to Turn Off Auto Scientific Notation!


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.

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


Related Articles

Al Arafat Siddique

Al Arafat Siddique

Hello! This is Arafat. Here I'm researching Microsoft Excel. I did my graduation from Bangladesh University of Engineering and Technology(BUET). My interest in data science and machine learning allured me to play with data and find solutions to real-life problems. I want to explore this data-driven world and make innovative solutions.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo