Key facts
- log_b(x) = y means bʸ = x. So log₂(8) = 3 because 2³ = 8.
- log means base 10, ln means base e ≈ 2.71828, and lg or lb often means base 2.
- Change of base: log_b(x) = ln(x) ÷ ln(b).
- Logs are only defined for positive numbers, and the base must be positive and not 1.
What is a logarithm?
A logarithm is the inverse of an exponent. If bʸ = x, then y = log_b(x), read "log base b of x". Logarithms turn multiplication into addition and powers into multiplication, which is why they were used for centuries to do hard arithmetic by hand. Today they describe quantities that span huge ranges: the pH scale, the Richter and moment magnitude scales, decibels and the growth of money and populations.
How to use the log calculator
- Enter the number x. It must be greater than zero.
- Choose a base: 10, e, 2 or a custom base.
- Read the result, the log in the other common bases and a check that the base raised to the answer gives back x.
Logarithm formulas and rules
log_b(x) = y ⟺ bʸ = xChange of base: log_b(x) = ln(x) ÷ ln(b) = log₁₀(x) ÷ log₁₀(b)| Rule | Formula | Example |
|---|---|---|
| Product | log_b(xy) = log_b(x) + log_b(y) | log(20) = log(2) + log(10) ≈ 1.301 |
| Quotient | log_b(x ÷ y) = log_b(x) − log_b(y) | log(5) = log(10) − log(2) ≈ 0.699 |
| Power | log_b(xⁿ) = n × log_b(x) | log(1000) = 3 × log(10) = 3 |
| Log of 1 | log_b(1) = 0 | ln(1) = 0 |
| Log of the base | log_b(b) = 1 | log₂(2) = 1 |
Worked examples: logarithms
Example 1: common log
log₁₀(1000) = 3, because 10 × 10 × 10 = 1000. log₁₀(0.01) = −2, because 10⁻² = 0.01.
Example 2: how long to double your money
At 7% interest compounded yearly, money doubles when 1.07ᵗ = 2. Take logs: t = ln(2) ÷ ln(1.07) = 0.6931 ÷ 0.0677 ≈ 10.24 years. The "rule of 72" (72 ÷ 7 ≈ 10.3) is a shortcut for the same idea.
Example 3: a custom base
log₃(81) = ln(81) ÷ ln(3) = 4.3944 ÷ 1.0986 = 4, because 3⁴ = 81.
Example 4: pH
A solution with a hydrogen-ion concentration of 0.001 mol/L has pH = −log₁₀(0.001) = 3. The pH calculator does this for any concentration.
Common logarithm values
| x | log₁₀(x) | ln(x) | log₂(x) |
|---|---|---|---|
| 1 | 0 | 0 | 0 |
| 2 | 0.30103 | 0.69315 | 1 |
| e ≈ 2.71828 | 0.43429 | 1 | 1.44270 |
| 10 | 1 | 2.30259 | 3.32193 |
| 100 | 2 | 4.60517 | 6.64386 |
| 1,024 | 3.01030 | 6.93147 | 10 |
| 1,000,000 | 6 | 13.81551 | 19.93157 |
Antilogs
The antilog undoes a log: if log₁₀(x) = 2.5, then x = 10^2.5 ≈ 316.23. For natural logs, x = eʸ. Use the exponent calculator to find antilogs.
Mistakes to avoid with logarithms
- Taking the log of zero or a negative number. There is no real answer.
- Mixing up log and ln. On most calculators, log is base 10 and ln is base e.
- Splitting a sum. log(x + y) is not log(x) + log(y). The product rule applies to log(xy).
- Forgetting the change of base. To find log₅(x) on a basic calculator, divide log(x) by log(5).
How logarithms changed calculation
John Napier, a Scottish laird, published *Mirifici Logarithmorum Canonis Descriptio* in 1614, introducing logarithms to turn multiplication into addition. Henry Briggs, a professor in London and later Oxford, worked with Napier to develop base-10 "common" logarithms and published tables in 1617 and 1624. Astronomers such as Johannes Kepler adopted them at once; Pierre-Simon Laplace later said logarithms doubled the life of the astronomer by shortening the labour. The slide rule, invented by William Oughtred in the 1620s, put logarithms on a sliding scale and was the engineer’s calculator until electronic calculators replaced it in the 1970s.
Logarithmic scales are still everywhere. The decibel measures sound level and signal power, the moment magnitude scale used by the US Geological Survey for earthquakes is logarithmic (each whole step means about 32 times more energy), and pH is the negative log of hydrogen-ion concentration. In computing, base-2 logarithms measure information in bits and the speed of algorithms such as binary search. The change-of-base rule, log_b x = ln x ÷ ln b, links all bases. For base e specifically, use the natural log calculator; to undo a logarithm, the antilog calculator; and for pH, the pH calculator.
How this calculator works
- log_b(x) = ln(x) ÷ ln(b), for base 10, base 2, base e or a custom base.
- x must be positive, and the base must be positive and not equal to 1.
- Exact powers (such as log₂ 1024 = 10) are recognized and shown exactly.
- A check shows b raised to the result returns x.
Frequently asked questions
What is a logarithm in simple terms?
It is the exponent you need. log₁₀(100) = 2 because you need to raise 10 to the power 2 to get 100.
What is the difference between log and ln?
log usually means the common logarithm, base 10. ln is the natural logarithm, base e ≈ 2.71828. They differ by a constant factor: ln(x) ≈ 2.3026 × log(x).
How do I calculate log base 2?
Divide the natural log of the number by ln(2), or the common log by log(2). log₂(64) = ln(64) ÷ ln(2) = 6.
What is log 0?
Undefined. No power of a positive base equals zero, although the log approaches minus infinity as x gets close to zero.
What is the natural log of e?
ln(e) = 1, because e¹ = e.
What is log 2?
log₁₀(2) ≈ 0.30103 and ln(2) ≈ 0.69315.
Can a logarithm be negative?
Yes. The log of any number between 0 and 1 is negative when the base is greater than 1. log₁₀(0.5) ≈ −0.301.
What is the change of base formula?
log_b(x) = log_k(x) ÷ log_k(b) for any convenient base k, usually 10 or e.
How do I find the antilog?
Raise the base to the log value. The antilog of 3 in base 10 is 10³ = 1000.