Logarithm Calculator
Calculate logarithms in any base, including log base 10, natural log and log base 2, using the change-of-base formula.
Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.
What the Logarithm Calculator does
This logarithm calculator will calculate logarithms in any base, including log base 10, natural log and log base 2, using the change-of-base formula. Fill in all 2 fields and the result updates as you type — there is no Calculate button to press and no page reload. It is most often used for converting between linear and decibel or pH scales. The companion to this one is our simplify fractions calculator.
How to use it
- Enter the number you want the logarithm of.
- Set the base — 10 for common log, 2 for binary, e (about 2.71828) for natural.
- All three standard bases are shown alongside your chosen one.
- The antilog row reverses the operation.
When to use it
- Converting between linear and decibel or pH scales.
- Finding how many bits are needed to represent a number.
- Solving for an exponent in a growth equation.
Common mistakes to avoid
- Taking the log of zero or a negative number, which is undefined for real values.
- Using base 10 where natural log is required, which scales the answer by about 2.3.
Frequently asked questions
What is the difference between log and ln?
Plain "log" usually means base 10 in engineering and base e in pure maths, which is a genuine source of confusion. "ln" always means base e. Both are shown above so there is no ambiguity.
Why can I not take the log of zero?
Because no exponent produces zero from a positive base. As x approaches zero the logarithm tends to negative infinity, so it has no finite value there.