A logarithm calculator for any base, with antilog and solving
This free logarithm calculator finds log₁₀ (the common log), ln (the natural log, base e), log₂ (the binary log) or a logarithm to any base you type. It also works backwards — the antilog turns a logarithm back into the original number — and its solve mode finds whichever of b, y or x is missing in bʸ = x.
Every answer shows the change-of-base formula with your own numbers, a check that raises the base to the result, and — for the common log — the characteristic and mantissa used with printed log tables. Exact answers are recognised too: log₅ 125 is shown as exactly 3 and log₈ 2 as exactly 1/3, rather than 2.9999999999999996.
How to use the Logarithm Calculator
- Choose Logarithm, Antilog or Solve bʸ = x.
- Enter the base, or tap 10, e or 2. Type e for natural logarithms.
- Enter the number x (for a logarithm) or the exponent y (for an antilog). In solve mode, fill two boxes and leave the unknown empty.
- Read the answer and the check underneath it. In logarithm mode the tiles also give ln x, log₁₀ x, log₂ x and the characteristic and mantissa.
- Follow the working to see the change of base, then copy the result.
Logarithm Calculator features
Any base
Common, natural and binary logs one tap away, plus any positive base other than 1, including decimals like 1.05.
Exact answers recognised
Integer and simple fractional results such as log₈ 2 = 1/3 or log₄ 32 = 5/2 are shown exactly.
Antilog and solving
Turn a log back into a number, or solve bʸ = x for the base, the exponent or the result.
Log-table notation
Characteristic and mantissa, including bar notation for numbers below 1, as taught in many school syllabuses.
Domain errors explained
Logs of zero or negative numbers and bases of 0, 1 or below get a clear reason instead of “NaN”.
What a logarithm means
A logarithm answers the question “what power?”. logb(x) = y means exactly the same as bʸ = x. So log₁₀(1,000) = 3 because 10³ = 1,000, and log₂(32) = 5 because 2⁵ = 32. The natural logarithm ln uses the base e ≈ 2.71828, which appears in continuous growth, calculus and probability.
Because a positive base raised to any real power is always positive, logarithms are only defined for x > 0. The base must be positive and must not be 1.
Laws of logarithms and the change-of-base formula
Most calculators only have log and ln keys. To find a logarithm in any other base, use the change-of-base formula: logb(x) = ln(x) ÷ ln(b) = log(x) ÷ log(b). For example, log₃(50) = ln 50 ÷ ln 3 = 3.912 ÷ 1.0986 ≈ 3.561.
| Law | Formula | Example |
|---|---|---|
| Product | log(ab) = log a + log b | log 20 = log 2 + log 10 ≈ 1.301 |
| Quotient | log(a/b) = log a − log b | log 5 = log 10 − log 2 ≈ 0.699 |
| Power | log(aⁿ) = n · log a | log 8 = 3 log 2 ≈ 0.903 |
| Change of base | log_b x = log x ÷ log b | log₂ 10 ≈ 3.3219 |
| Log of 1 | log_b 1 = 0 | ln 1 = 0 |
| Log of the base | log_b b = 1 | log₇ 7 = 1 |
| Inverse | b^(log_b x) = x | 10^(log 345) = 345 |
Logarithms in real life
- Chemistry: pH = −log₁₀[H⁺]. A solution with [H⁺] = 3.2 × 10⁻⁴ mol/L has pH = 3.49.
- Sound: decibels use 10 · log₁₀ of an intensity ratio, so a sound 1,000 times more intense is 30 dB louder.
- Money: the time to double an investment at 8% a year is ln 2 ÷ ln 1.08 ≈ 9 years — compare it with the Compound Interest Calculator.
- Computing: log₂ tells you how many bits are needed: log₂(1,000,000) ≈ 19.93, so 20 bits can count to a million, and binary search needs about 20 steps.
- Big numbers: the number of digits in a whole number n is ⌊log₁₀ n⌋ + 1, which links logs to scientific notation.
Common mistakes with logarithms
- log(a + b) is not log a + log b. The product law only applies to multiplication inside the log.
- log versus ln. On most calculators “log” means base 10 and “ln” means base e; in many programming languages and higher maths, log means ln. Check which one a formula expects.
- Logs of negative numbers. log(−100) has no real value; if you meet one, check the sign of the quantity going into the log.
Logarithm Calculator FAQ
How do I calculate a logarithm with any base?
Divide the natural log of the number by the natural log of the base: log_b(x) = ln x ÷ ln b. For log₄(64): ln 64 ÷ ln 4 = 4.159 ÷ 1.386 = 3. The logarithm calculator does this and shows the working.
What is the difference between log and ln?
log usually means the common logarithm, base 10, and ln is the natural logarithm, base e ≈ 2.71828. They differ by a constant factor: ln x = 2.302585 × log₁₀ x.
What is an antilog?
The antilog reverses a logarithm: if log₁₀ x = y, then x = antilog(y) = 10ʸ. For example, antilog(2.5378) = 10^2.5378 ≈ 345. Choose Antilog mode and pick the base.
Why is the log of 0 or a negative number undefined?
Because no real power of a positive base gives 0 or a negative number. As the exponent becomes more and more negative, bʸ gets closer to 0 but never reaches it.
What are the characteristic and mantissa?
They split a common logarithm into a whole-number part and a decimal part between 0 and 1. log₁₀ 345 = 2.5378: the characteristic 2 says the number has three digits before the point, and the mantissa .5378 gives its digits 3, 4, 5. For 0.0345 the log is −1.4622, written 2̅.5378 so the mantissa stays positive.
How do I solve an equation like 3ˣ = 50?
Take logs of both sides: x = log 50 ÷ log 3 ≈ 3.561. In solve mode, enter b = 3 and x = 50 and leave y empty. The Exponent Calculator can solve the same equation and also find a missing base.