Natural Logarithm (ln) Calculator
Compute natural logarithms, common logarithms, and logarithms in any base with instant results.
Reviewed by the ToolNestr Editorial Team — July 2026
How logarithms work
A logarithm answers the question: what exponent produces this number? Specifically, logb(x) = y means that by = x. The natural logarithm ln(x) uses the special constant e ≈ 2.718281828459045 as its base. The constant e arises naturally in calculus, compound interest, and many physical processes, making ln(x) the most mathematically convenient logarithm to work with.
The natural logarithm has several defining properties. It is the inverse function of the exponential function ex, meaning ln(ex) = x and eln(x) = x for x > 0. Its derivative is 1/x, which makes it indispensable in calculus. The integral of 1/x from 1 to a is ln(a), connecting logarithms to areas under curves.
The change-of-base formula allows you to compute logarithms in any base using natural logarithms: logb(x) = ln(x) / ln(b). This is how this calculator works internally — it computes ln(x) and ln(b) using JavaScript's Math.log function, then divides them to get the result in the desired base.
The formula explained
Definition
ln(x) = y ⇔ ey = x
The natural logarithm of x is the exponent y such that e raised to the power y equals x.
Change-of-base
logb(x) = ln(x) / ln(b)
This formula lets you compute logarithms in any base using natural logarithms.
Worked example: log₁₀(100)
Step 1: We want log₁₀(100). Use change-of-base: log₁₀(100) = ln(100) / ln(10)
Step 2: ln(100) ≈ 4.605170186, ln(10) ≈ 2.302585093
Step 3: 4.605170186 / 2.302585093 = 2
Therefore: log₁₀(100) = 2, because 10² = 100
Similarly, ln(100) ≈ 4.605, meaning e4.605 ≈ 100.
Scientists
Natural logarithms appear in physics (entropy, radioactive decay), chemistry (reaction rates, pH = -log[H⁺]), and biology (population growth models, drug concentration curves). The logarithmic scale compresses wide-ranging data into manageable numbers.
Finance Professionals
Continuously compounded interest uses ln: A = Pert. The time to double an investment is ln(2)/r. Logarithmic returns are used in financial modeling because they are time-additive and normally distributed under the Black-Scholes model.
Data Scientists
Log transformations stabilize variance and make skewed distributions more normal. Log-loss (cross-entropy) is a standard loss function for classification models. Information theory measures entropy in nats (using ln) or bits (using log₂).
Engineers
Decibels use log₁₀: dB = 10 × log₁₀(P/P₀). The Richter scale for earthquakes uses log₁₀. Signal processing, control systems, and acoustics all rely heavily on logarithmic measures to handle wide dynamic ranges.
How to use the logarithm calculator
Enter the number
Type the positive number you want the logarithm of. Only positive numbers are valid — the calculator warns for zero or negative inputs.
Set the base
The default base is e (natural log). Change to 10 for common log, 2 for binary log, or any positive base other than 1.
Read the results
Both ln(x) and log_b(x) are shown. The change-of-base formula is displayed in the detail section so you can verify the calculation.
Tips for working with logarithms
The three most useful bases
Base e (natural log, ln) is used in calculus, physics, and continuous growth models. Base 10 (common log, log) is used in engineering, decibels, and the Richter scale. Base 2 (binary log, lg) is used in computer science for algorithm analysis, information theory, and data structures.
Logarithm properties simplify complex expressions
The key properties are: ln(ab) = ln(a) + ln(b), ln(a/b) = ln(a) - ln(b), and ln(ab) = b × ln(a). These properties convert multiplication into addition, division into subtraction, and powers into multiplication, making complex calculations much simpler.
Avoid common mistakes
Remember that ln(a + b) does NOT equal ln(a) + ln(b). The logarithm of a sum has no simple simplification. Also, the base of a logarithm must be positive and not equal to 1. The domain is strictly positive real numbers — ln(0) is undefined and approaches negative infinity as x approaches 0 from the right.
Logarithms linearize exponential data
If you suspect data follows an exponential trend y = aebx, taking the natural log transforms it to ln(y) = ln(a) + bx, which is a linear relationship. This is the foundation of log-linear plots and exponential regression in data analysis.
Related tools
Frequently asked questions
What is a natural logarithm?
The natural logarithm ln(x) is the logarithm with base e, where e ≈ 2.71828. It answers the question: to what power must e be raised to equal x?
What is the domain of ln(x)?
The natural logarithm is only defined for positive real numbers (x > 0). The logarithm of zero or a negative number is undefined in the real number system.
What is the change-of-base formula?
The change-of-base formula allows you to compute logarithms in any base: log_b(x) = ln(x) / ln(b). This is how calculators compute logarithms in uncommon bases.
What is the relationship between ln and log?
ln(x) is the natural log (base e). log(x) typically means base 10 (common log). They are related by ln(x) = log(x) × ln(10) ≈ log(x) × 2.3026.
Why is ln(1) = 0?
Because e⁰ = 1. Any number raised to the power of zero equals 1, so the logarithm (in any base) of 1 is always 0.