What does a logarithm mean?
A logarithm undoes an exponent. If bʸ = x, then log_b(x) = y, so the log gives you back the power.
Every log statement can be rewritten as an exponent statement, and that is the easiest way to check one. log₃(81) = 4 because 3⁴ = 81. log₂(1/8) = −3 because 2⁻³ = 1/8.
The base has to be positive and not equal to 1, and x has to be positive. Those limits come straight from the exponent form.
A base 10 log also tells you roughly how many digits a number has. log(500) ≈ 2.69897000434 and log(5000) ≈ 3.69897000434, so each extra digit adds 1 to the log. That is why log scales are used for things that span huge ranges.
What is the difference between log and ln?
log with no base written means log base 10, the common log. ln means the natural log, which uses base e ≈ 2.71828182846.
Base 10 fits our number system, so whole powers of ten give whole answers: log(100) = 2 and log(0.01) = −2. The natural log comes up in growth, decay and calculus. Use this page as a natural log calculator by typing ln( ): ln(10) ≈ 2.30258509299 and ln(1) = 0.
The two are easy to mix up on paper, and they give very different numbers. log(100) = 2, while ln(100) ≈ 4.60517018599. If a textbook writes log without a base, it almost always means base 10, though some higher-level books use log for ln.
| You type | Base | Example result |
|---|---|---|
| log(1000) | 10 | 3 |
| ln(10) | e | ≈ 2.30258509299 |
| log_2(32) | 2 | 5 |
| log(32, 2) | 2 | 5 |
How do you calculate a log with a different base?
Use the change of base formula: divide the natural log of the number by the natural log of the base. Base 10 logs work the same way in place of ln.
Here is how a log base 2 calculator gets log₂(10), which isn't a whole number.
A quick sense check: 2³ = 8 and 2⁴ = 16, so log₂(10) has to be between 3 and 4. An answer of about 3.32 fits.
What are the rules of logarithms?
The three main log rules turn multiplication into addition, division into subtraction and powers into multiplication. They are the exponent rules read backwards.
The rules hold in any base, including ln. For instance, ln(4) + ln(5) = ln(20) ≈ 2.99573227355.
Why is the log of 0 or a negative number undefined?
No power of a positive base ever gives 0 or a negative number. So there is no exponent that could be the answer, and log(0) and log(−5) are undefined.
Try it with base 10: 10² = 100, 10⁰ = 1 and 10⁻² = 0.01. The results get closer to 0 but never reach it, and they never go below it. The calculator shows a domain error for these inputs instead of a number.
When is a logarithm an exact answer?
A log is exact when the number is a power of the base. log(1000) = 3 exactly, log₂(64) = 6 and log₄(2) = 1/2, because 4^(1/2) = 2.
Otherwise the answer is irrational, and the logarithm calculator shows it to 12 significant digits with the ≈ sign. log(2) ≈ 0.301029995664 and ln(10) ≈ 2.30258509299 are examples. Round only at the end of a problem so the error doesn't build up.
How do you use logs to solve exponential equations?
When the unknown is in the exponent, take the log with the same base on both sides. That brings the exponent down where you can solve for it.
- Start with 2ˣ = 10.
- Take log base 2 of both sides: x = log₂(10).
- Use change of base: x = ln(10) ÷ ln(2) ≈ 3.32192809489.
With base e, use ln: eˣ = 5 gives x = ln(5) ≈ 1.60943791243. This page evaluates logs, so to solve the equation itself with steps, type it into the algebra solver.
Sometimes you don't need a log at all. If both sides can be written with the same base, match the exponents. 3^(x + 1) = 27 is 3^(x + 1) = 3³, so x + 1 = 3 and x = 2. Reach for logs when the numbers aren't powers of the same base.
What mistakes do people make with logs?
The biggest one is splitting a log over a sum. log(a + b) is not log a + log b. For example, log(2 + 8) = log(10) = 1, but log 2 + log 8 ≈ 1.20411998266.
A similar slip is treating a quotient of logs as a log of a quotient. log(8) ÷ log(2) is about 3, but log(8/2) = log(4) ≈ 0.602059991328. Also watch the base: log on most calculators means base 10, not base e.