Natural Logarithm Calculator
Enter a positive number to find its natural logarithm, ln(x).
Updated
Natural Logarithm Calculator
Our Natural Logarithm Calculator finds ln(x), the logarithm to base e, for any positive number. Type a number and the answer appears straight away to 10 decimal places, with the working, a check, and the matching base 10 and base 2 logarithms. It also accepts e, powers of e, fractions and very large or very small numbers in scientific notation, which makes it handy for algebra, calculus, finance and science homework.
Quick answer
The natural logarithm ln(x) is the power you must raise e ≈ 2.718281828 to, to get x. For example, ln(45) ≈ 3.8066624898, because e3.8066624898 ≈ 45. Enter any positive number above and the calculator shows ln(x) instantly.
- Definition: y = ln(x) means ey = x
- Key values: ln(1) = 0, ln(e) = 1, ln(2) ≈ 0.6931, ln(10) ≈ 2.3026
- Domain: only x > 0; ln(0) is undefined and ln(x) is negative for 0 < x < 1
- Converting: ln(x) ≈ 2.302585 × log10(x)
What Is the Natural Logarithm?
A logarithm undoes a power. The natural logarithm uses the base e, an irrational constant like π, so ln(x) tells you how many times e has to be multiplied by itself to reach x. It is the inverse of the exponential function ex: each one undoes the other.
ln(eˣ) = x and e^(ln x) = x
e = 2.718281828459045…
The number e comes from continuous growth: (1 + 1/n)n gets closer to e as n grows (n = 1,000 gives 2.7169). Because of this, ln(x) also measures time in growth problems: it is how long something growing continuously at 100% per unit of time takes to grow by a factor of x.
Natural Log Table
| x | ln(x) | x | ln(x) |
|---|---|---|---|
| 0.1 | −2.302585 | 5 | 1.609438 |
| 0.5 | −0.693147 | 10 | 2.302585 |
| 1 | 0 | 20 | 2.995732 |
| 2 | 0.693147 | 45 | 3.806662 |
| e | 1 | 100 | 4.605170 |
| 3 | 1.098612 | 1,000 | 6.907755 |
Each time x is multiplied by 10, ln(x) goes up by ln(10) ≈ 2.302585, which is why ln(10), ln(100) and ln(1,000) are spaced evenly.
Graph of ln(x)
- It is only defined for x > 0, and drops toward −∞ as x approaches 0 (the y-axis is a vertical asymptote).
- It crosses the x-axis at (1, 0) and passes through (e, 1).
- It always rises, but more and more slowly: its slope at x is 1/x, so it is 1 at x = 1 and only 0.01 at x = 100.
- It has no upper limit, even though it grows very slowly: ln(x) reaches 10 only at x ≈ 22,026.
Natural Log Rules
- Product: ln(ab) = ln(a) + ln(b), so ln(20) = ln(2) + ln(10) ≈ 2.9957.
- Quotient: ln(a/b) = ln(a) − ln(b), so ln(1/2) = −ln(2) ≈ −0.6931.
- Power: ln(ak) = k × ln(a), so ln(8) = 3 ln(2) ≈ 2.0794.
- Inverse: ln(ek) = k and eln(x) = x.
- Change of base: logb(x) = ln(x) ÷ ln(b), so log2(45) = 3.8067 ÷ 0.6931 ≈ 5.4919.
- Calculus: the derivative of ln(x) is 1/x, and the integral of 1/x is ln|x| + C.
Worked Examples
ln(45) from a base 10 log. Multiply the common logarithm by ln(10):
ln(45) = 1.6532125138 × 2.302585093
≈ 3.8066624898
Solving an exponential equation. To solve ex = 20, take ln of both sides:
x = ln(20) ≈ 2.9957
Doubling time with continuous interest. Money growing as A = P × ert doubles when ert = 2, so t = ln(2) ÷ r. At 8% a year (r = 0.08), 5,000 becomes 10,000 after:
= 0.693147 ÷ 0.08
≈ 8.66 years
This is where the “rule of 70” comes from: 100 × ln(2) ≈ 69.3, so the doubling time in years is roughly 70 divided by the percentage rate. The same maths gives half-lives in radioactive decay, t½ = ln(2) ÷ λ.
ln vs log
| Notation | Base and meaning |
|---|---|
| ln(x) | Base e, everywhere |
| log(x) | Base 10 on calculators and in school maths |
| log(x) | Base e in Python, JavaScript, C, Java and most higher maths |
| log₁₀(x), lg(x) | Base 10 (common logarithm) |
| log₂(x), lb(x) | Base 2 (binary logarithm) |
To convert, use ln(x) = 2.302585 × log10(x) and log10(x) = 0.434294 × ln(x). For any other base, use the change of base rule above or our Logarithm Calculator.
ln in Excel and Code
| Tool | ln(45) |
|---|---|
| Excel / Google Sheets | =LN(45) |
| Excel, the number e | =EXP(1) |
| Python | math.log(45) |
| JavaScript | Math.log(45) |
| Scientific calculator | the ln key, not log |
In Excel, LOG(45) is base 10 and LN(45) is base e. In code it is the other way round from school: Math.log and math.log are natural logs, and you need Math.log10 or math.log10 for base 10.
Common Mistakes
- Splitting a sum. ln(a + b) is not ln(a) + ln(b). The product rule works for ln(a × b) only.
- Treating ln(0) as 0. ln(0) is undefined. It is ln(1) that equals 0.
- Mixing up ln and log. log(100) = 2 on a calculator, but log(100) in Python gives 4.6052.
- Squaring the wrong thing. (ln x)2 and ln(x2) = 2 ln(x) are different: for x = 10 they are 5.3019 and 4.6052.
- Dividing logs. ln(a) ÷ ln(b) is logb(a), not ln(a ÷ b).
Key Terms
- e
- Euler’s number, 2.718281828…, the base of the natural logarithm.
- ln(x)
- The natural logarithm: the power of e that gives x.
- eˣ
- The exponential function, the inverse of ln(x).
- log₁₀(x)
- The common logarithm, base 10.
- Domain
- The inputs a function accepts; for ln(x), all x > 0.
- Asymptote
- A line a graph approaches but never reaches; for ln(x), the y-axis.
How to Use the Natural Logarithm Calculator
- Enter a positive number. Type the number x in the box, for example 45. You can also type e, a power of e such as e^2, a fraction such as 1/2, or scientific notation such as 1e500.
- Read the natural logarithm. ln(x) appears as you type, rounded to 10 decimal places, with the working underneath (for example ln(45) ≈ 3.8066624898 · e^3.8066624898 ≈ 45). The table below it shows log₁₀(x), log₂(x), whether the result is positive or negative, and a check.
- Copy the result. Press Copy to copy ln(x). Press Clear or Esc to start again.
Example: enter 1/2 and the result is −0.6931471806, the negative of ln(2). Enter 1e500, far beyond what most calculators accept, and the result is 500 × ln(10) ≈ 1151.292546497.
Who Can Use This Calculator?
Frequently Asked Questions (FAQs)
What is the natural logarithm (ln)?
The natural logarithm of x, written ln(x), is the logarithm with base e ≈ 2.718281828. It answers the question “e to what power gives x?”, so y = ln(x) means ey = x. For example, ln(45) ≈ 3.8067 because e3.8067 ≈ 45.
What is the difference between ln and log?
ln always means base e. On calculators and in school maths, log usually means base 10, so log(100) = 2 while ln(100) ≈ 4.6052. The two differ by a constant factor: ln(x) = ln(10) × log10(x) ≈ 2.302585 × log10(x). Careful in code: log() in Python, JavaScript, C and Java is the natural logarithm.
What is ln(1) and ln(e)?
ln(1) = 0, because e0 = 1, and ln(e) = 1, because e1 = e. More generally, ln(ek) = k, so ln(e3) = 3.
What is ln(0)?
ln(0) is undefined. No power of e equals 0. As x gets closer to 0, ln(x) falls without limit (ln(0.001) ≈ −6.9078, ln(0.000001) ≈ −13.8155), so mathematicians write that ln(x) tends to −∞ as x approaches 0 from above.
Can you take the natural log of a negative number?
Not as a real number, because e raised to any real power is positive. With complex numbers it is defined: ln(−x) = ln(x) + πi for positive x, so ln(−1) = πi. This calculator works with real numbers and shows a message for negative inputs.
Why is the natural log negative for numbers between 0 and 1?
To turn e into a number smaller than 1 you need a negative power, such as e−1 ≈ 0.3679. So ln(0.5) ≈ −0.6931 and ln(0.1) ≈ −2.3026. In general ln(1/x) = −ln(x).
How do you calculate ln without a calculator?
Use known values and the log rules. With ln(2) ≈ 0.6931 and ln(10) ≈ 2.3026, ln(20) = ln(2) + ln(10) ≈ 2.9957. For numbers near 1, the series ln(1 + y) = y − y2/2 + y3/3 − … works well: ln(1.1) ≈ 0.1 − 0.005 + 0.000333 ≈ 0.09533, against the true 0.09531.
Why is e called the natural base?
Because it makes calculus simplest. The function ex is its own derivative, and the derivative of ln(x) is just 1/x. Continuous growth also leads to e: growing at 100% a year, compounded ever more often, approaches e times the starting amount. That is why ln appears in interest, population growth, radioactive decay and many physics formulas.
What is the derivative and integral of ln(x)?
The derivative of ln(x) is 1/x for x > 0. The integral of 1/x is ln|x| + C, and the integral of ln(x) itself is x ln(x) − x + C.
Is the Natural Logarithm Calculator free?
Yes. It is completely free, needs no sign-up, and can be used as many times as you like.
Try our Natural Logarithm Calculator to find ln(x) of any positive number instantly.