ln
Learn how to use the ln function in Notion formulas.
The ln() function returns the natural logarithm of a number.
1
ln(number)
The natural logarithm is
$\log_e$
, where
$e$
is Euler’s Constant (approximately 2.718281828459045).
For reference, here are the named components of a logarithm:
$\log_{base} argument = exponent$
A logarithm is the exponent of the base that returns the argument.
Demystifying the Natural Logarithm (ln) – BetterExplained
A Mathematical Example

# Example Formulas

1
ln(20) // Output: 2.995732273554
2
3
ln(e) // Output: 1

# Example Database

This example database calculates the calculates the number of years needed for a starting population to reach a target end number given a specific growth rate.

## View and Duplicate Database

ln
College Info Geek on Notion

## “Years Needed” Property Formula

1
// Compressed
2
round(ln(prop("Target Num") / prop("Starting Num")) / prop("Growth Rate") * 100) / 100
3
4
// Expanded
5
round(
6
ln(
7
prop("Target Num") /
8
prop("Starting Num")
9
) /
10
prop("Growth Rate")
11
* 100
12
) / 100
The first part of this formula replicates the mathematical example in the toggle block above.
First, we find the natural logarithm of the quotient of the Target Num and the Starting Num:
$log_e(Target Num/Starting Num)$
This is done with the following code: ln(prop("Target Num") / prop("Starting Num"))
Next, we divide this result by the Growth Rate.
Finally, the result is passed through the round function, and we use the following trick to round it to two decimal places: round(result * 100)/100