Logarithm Calculator
Enter a number and a base to find its logarithm, along with the natural log, log base 10, and log base 2.
How logarithms work
The logarithm log_b(x) answers the question: to what power must b be raised to get x? This calculator uses the change-of-base formula, log_b(x) = ln(x) / ln(b), to compute the logarithm for any valid base.
Natural log (ln) uses base e (≈2.71828), common log uses base 10, and binary log uses base 2 — all three are shown automatically since they're the most frequently used in math, science, and computing.
Frequently asked questions
Why must x be greater than 0?
Logarithms are only defined for positive real numbers — there's no real power you can raise a base to that produces zero or a negative number.
Why can't the base equal 1?
Any power of 1 is always 1, so log base 1 could never reach any value other than 1, making it undefined as a logarithm base.
What's the difference between log and ln?
"log" conventionally refers to log base 10 (the common logarithm), while "ln" specifically means the natural logarithm, log base e.