Returns the natural logarithm of a number. Natural logarithm uses base e (Euler's number ≈ 2.718). LN is the inverse of EXP. Essential for exponential growth/decay calculations, compound interest, scientific computing, and advanced mathematics.
Master the fundamentals of Excel LN function
The LN function returns the natural logarithm of a number. Natural logarithm uses base e (Euler's number, approximately 2.718281828). LN(x) = log_e(x). LN is the inverse function of EXP: LN(EXP(x)) = x and EXP(LN(x)) = x (for x > 0). Key properties: LN(1) = 0, LN(e) = 1, LN(x) is negative for 0 < x < 1, LN(x) grows slowly for large x. Essential for exponential growth/decay models, compound interest calculations, probability distributions, scientific computing, and advanced mathematics.
Uses Euler's number as base
LN(EXP(x)) = x
Input must be > 0
Grows slowly compared to linear
Function-specific parameters
Function-specific return type
Calculate continuous compounding
Natural logarithm in science
Exponential growth/decay
Log transformations
Exact matching required
Returns numeric position
Handles missing text gracefully
=LN(number)The positive number for which you want the natural logarithm.
The natural logarithm (base e)
Description: Returns the natural logarithm of a number
Calculate natural log of e
Returns 1 because LN(e) = 1. Natural logarithm of e (Euler's number) equals 1. This is the fundamental property: LN(e) = 1.
Use LN function in VBA
' Basic LN in VBA
Range("C1").Value = Application.WorksheetFunction.Ln(10)
' Returns: 2.303
' Calculate natural logarithm
Sub CalculateLN()
Dim number As Double
number = Range("A1").Value
Dim result As Double
result = Application.WorksheetFunction.Ln(number)
Range("B1").Value = result
End Sub
' Calculate continuous compound interest
Sub ContinuousCompoundInterest()
Dim principal As Double
Dim finalAmount As Double
Dim rate As Double
Dim time As Double
principal = Range("A1").Value
finalAmount = Range("A2").Value
' Solve for time: t = LN(A/P) / r
rate = Range("A3").Value
time = Application.WorksheetFunction.Ln(finalAmount / principal) / rate
Range("B1").Value = time
End Sub
' Generate LN curve
Sub GenerateLNCurve()
Dim i As Integer
For i = 1 To 100
Dim value As Double
value = Application.WorksheetFunction.Ln(i)
Range("A" & i).Value = i
Range("B" & i).Value = value
Next i
End Sub
' Calculate with EXP (inverse relationship)
Sub LNWithEXP()
Dim x As Double
x = Range("A1").Value
' LN(EXP(x)) = x
Dim expValue As Double
expValue = Application.WorksheetFunction.Exp(x)
Dim result As Double
result = Application.WorksheetFunction.Ln(expValue)
Range("B1").Value = result
' Should equal x
End SubCalculate continuous compounding
Exponential growth/decay calculations
Natural logarithm in science
Log transformations for normalization
LN returns #NUM! for zero or negative numbers
=IF(A1>0, LN(A1), "Invalid")Solution: LN only works with positive numbers. LN(0) and LN(negative) return #NUM!. Ensure input is > 0. Check for negative values or zero in your data.
Non-numeric input in LN
=LN(VALUE(A1))Solution: Ensure input is numeric. LN requires a positive number. Check for text, errors, or empty cells. Use VALUE() if needed.
LN results have many decimal places
=ROUND(LN(A1), 4)Solution: Use ROUND for display: ROUND(LN(value), digits). LN can return many decimal places that may need formatting.
Uncertainty about LN vs EXP relationship
LN(EXP(5)) = 5, EXP(LN(5)) = 5Solution: LN and EXP are inverse: LN(EXP(x)) = x and EXP(LN(x)) = x (for x > 0). Use LN when you have EXP value, use EXP when you have LN value.