How to calculate a logarithm
- Enter the number x.
- Enter the base b.
- Read log base b of x, plus ln(x) and log₁₀(x).
What a logarithm answers
log_b(x) is the power you raise b to in order to get x. log₂(8) = 3 because 2³ = 8.
It is calculated as ln(x) ÷ ln(b). The number must be above zero, and the base must be above zero and not 1. ln uses base e ≈ 2.71828 and log₁₀ uses base 10.
Worked examples
Base 2
log₂(8) = 3, because 2³ = 8.
Base 10
log₁₀(1000) = 3, because 10³ = 1000.
Frequently asked questions
What is the difference between log and ln?
log usually means base 10 and ln means base e. This calculator shows both alongside the base you choose.
Why can't I take the log of zero or a negative number?
No power of a positive base gives zero or a negative result, so there is no real answer.