About Logarithm Calculator
A logarithm answers the question "to what power must the base be raised to give this number?". Enter a positive number, choose base 10, 2, e or any other positive base, and the answer appears together with the natural, common and binary logarithms of the same number.
The working shows the change-of-base formula with your values, and a check raises the base to the answer to confirm it returns your number. Exact powers come out exact: log₃(81) is 4, not 3.9999999999999996.
How it works
- Bases 10, 2 and e use the browser’s own logarithm functions, which are exact at whole powers of the base.
- Any other base b uses the change-of-base rule, log_b(x) = ln x / ln b. When the base raised to the nearest whole number gives exactly x, that whole number is the answer.
- Results are rounded to 15 significant digits, the precision of the floating-point numbers the browser works with.
- Inputs are kept in the page address, so a calculation can be bookmarked or shared as a link.
Questions
Why can I not take the logarithm of zero or a negative number?
No power of a positive base is zero or negative, so there is no real answer. As x shrinks towards 0 the logarithm falls without limit, which is why some calculators show −∞ for log 0.
Which base does "log" mean?
It depends on the field. Calculators and school textbooks usually mean base 10; mathematicians often mean base e; computer scientists often mean base 2. This tool always names the base it used.
Why can the base not be 1?
Every power of 1 is 1, so base 1 cannot reach any other number, and ln 1 = 0 would put a zero under the change-of-base fraction.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.