㏒Logarithm Calculator - log, ln, lg and Any Base Online (Change of Base)
Enter a base and a value to get log_b(x), with the natural log ln, the common log lg and log₂ listed next to it and the change-of-base formula written out. You can also go the other way and compute bˣ, or solve an exponential equation b^x = y.
Free · No sign-up · Runs in your browserLast updated:
Loading tool...
How to use Logarithm Calculator
- 1Pick a mode: logarithm, power bˣ, or solve b^x = y
- 2Enter the base b and the value x (shortcuts for 2, 10, e and 0.5)
- 3Read the result — the check row raises b back to that power to confirm it
- 4Use the plot link to see y = log_b(x) or y = bˣ
FAQ
- What is the difference between ln, lg and log?
- ln is the natural logarithm to base e (about 2.71828) and lg is the common logarithm to base 10. Plain “log” depends on context: maths textbooks often mean lg, Math.log in most languages is ln, and computer science usually means log₂ — so all three are listed separately here.
- How do I compute a base 2 logarithm?
- Set the base to 2 (or use the shortcut button) and enter the value. By hand you can use the change of base: log₂ x = ln x / ln 2 = lg x / lg 2.
- Why can the base not be 1 or negative?
- Any power of 1 is 1, so it could never produce another number, and a negative base jumps around outside the real numbers. That is why the base must satisfy b > 0 and b ≠ 1.
- Why must the value be positive?
- A positive base raised to any real power is positive, so log_b(x) is only defined for x > 0. As x approaches 0 the logarithm heads to negative infinity.
- How do I solve something like 2^x = 100?
- Switch to “Solve b^x = y”, set the base to 2 and the right-hand side to 100. The answer is x = log₂100 ≈ 6.6439 — the same as taking logarithms of both sides.