Description
Use this function to return the natural logarithm of a given number. Supported in Chains.
The natural logarithm is equivalent to log base e of a number, where e is Euler's number, a mathematical constant with an approximate value of 2.71828182845904.
This function models exponential decay and the output of the function at a given point is inversely proportional to the rate of change of the function at that point. Generally, this function is used in applications relating to compound interest.
The function that is the inverse of the logarithm function is the EXP (exponential) function, which represents exponential growth.
Syntax
LN(number)
Inputs
This function has the following arguments:
| Name | Required | Description | Valid input |
|---|---|---|---|
number |
Yes | The number to be acted on. | A cell reference, a number, or a formula which results in either of these. It must be a positive value. |
Example
Sample formulas
Sample data
A |
B |
||
|---|---|---|---|
1 |
4 |
1 |
|
2 |
35 |
11 |
|
3 |
12 |
54 |
Sample formulas
| Use case | Formula | Explanation and Result |
|---|---|---|
| Calculate the natural logarithm of a number in a cell. | =LN(A1) |
This formula works in the following manner:
Result: 1.386294361. |
| Calculate the natural logarithm of Euler's number (e). | =LN(EXP(1)) |
This formula works in the following manner:
This formula returns 1. |
| Calculate the natural logarithm of a calculated value. | =LN(B3-A3) |
This formula works in the following manner:
Result: 3.737669618. |
| Show an error for a negative number. | =LN(B2-A2) |
This formula works in the following manner:
Result: #NUM!. |
Notes
- Wildcards don't work with this function.
- Because logarithms can't be evaluated for non-positive numbers,
=LN(0)returns a #NUM! error, as does any case where the supplied number is negative.