A general logarithm calculator that works with any base — base 10, base 2, natural log (base e), or any custom base.
How it works
Using the change-of-base formula, the logarithm is computed as the natural log of the number divided by the natural log of the chosen base.
What this does not include
This does not include a shortcut for base 2 specifically — for that dedicated page, use this site’s log base 2 calculator instead.
How to use this calculator
- Enter the number and the base.
A worked example
log base 10 of 1,000 = 3, since 10³ = 1,000.
log base 2 of 8 = 3, since 2³ = 8.
What the variables mean
| Variable | Meaning |
|---|---|
| x | The number being evaluated |
| Base | The base of the logarithm — how many times it’s multiplied to reach x |
Edge cases worth knowing
Zero and negative numbers have no real logarithm. No power of a positive base ever produces zero or a negative result, so the calculator declines to show one.
Different bases produce very different answers for the same x — log base 10 and log base 2 of the same number are rarely equal, since they’re asking “how many times” using a different multiplier each time.
Frequently asked questions
What does a logarithm actually answer?
“To what power must the base be raised to get this number” — log base 10 of 1000 is 3, because 10³ equals 1000.
How do I calculate a natural logarithm?
Enter the mathematical constant e (approximately 2.718281828) as the base.
Why can’t the base be 1 or less?
A base of 1 raised to any power always equals 1, making the logarithm undefined for any other input; a base of 0 or negative similarly breaks the underlying exponential relationship.