The LN function in Excel is used to calculate the natural logarithm of a given number, which is a key mathematical constant represented by the base ‘e’ (approximately 2.71828). This function is particularly useful in fields such as mathematics, science, and finance where logarithmic calculations are necessary for various analyses and modeling tasks.
Syntax
LN(number)
- number: The positive real number for which you want to compute the natural logarithm.
Example #1
=LN(10)
The function calculates the natural logarithm of 10, resulting in approximately 2.3026.
Example #2
=LN(1)
This function computes the natural logarithm of 1, which is always 0, as the logarithm of 1 is defined to be zero.
Example #3
=LN(20)
This function calculates the natural logarithm of 20, yielding approximately 2.9957 as the result.
Error handling
- NUM!: This error occurs if the number is less than or equal to zero, as the natural logarithm is undefined for these values.
- VALUE!: This error happens if you provide an invalid argument that is not a number.