The LN function in Excel is a Math Function that returns the natural logarithm of a number. Here is an overview:
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)
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)
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)
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)
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)
- In D6 put D5 as the input for the LN function, i.e.
 =LN(D5)
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)
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:
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.