How to calculate logarithm
log_b(x) = ln(x) ÷ ln(b)
Worked example. log base 10 of 100: 2.
Example inputs — Number: 100; Base: 10. Starting values are illustrative.
From George Guju, founder of Calculyn · Educational calculator guidance, not professional advice.
How it works
A logarithm answers: what power do I raise the base to, to get this number? log₁₀(100) = 2 because 10² = 100.
Assumptions & limitations
- Results are rounded for display.
Formula and assumptions reviewed October 2026 by the Calculyn team. How we build our calculators
Frequently asked questions
Why can't I take the log of 0 or a negative?
No power of a positive base ever gives 0 or a negative number, so the log isn't defined there.
