Logarithm Calculator
Enter a number and a base to get its logarithm — base 10, natural log, base 2 or any base you choose.
log_b(x) = ln(x) ÷ ln(b). The logarithm answers: “to what power must the base be raised to get x?” — so log₁₀(1000) = 3 because 10³ = 1000.
How to use the logarithm calculator
- Enter the number x you want the logarithm of (must be above 0).
- Pick a base — 10, e (natural log), 2, or a custom base.
- Press “Calculate logarithm” to see the answer and the change-of-base working.
Logarithm calculation example
- log₂ 1,024 = 10, because 210 = 1,024.
- log₁₀ 5,000 ≈ 3.699.
- ln 10 ≈ 2.3026 (natural log, base e).
Useful rules
- log(ab) = log a + log b; log(a/b) = log a − log b; log(an) = n log a.
- Change of base: log_b x = ln x ÷ ln b.
- Logs turn growth into time: years to double at 8% = ln 2 ÷ ln 1.08 ≈ 9.0.
Logarithm calculator: common questions
- How is a logarithm worked out?
- With the change-of-base rule: log_b(x) = ln(x) ÷ ln(b). For example, log₅(125) = ln(125) ÷ ln(5) = 3, because 5³ = 125.
- What is the difference between log and ln?
- log is base 10 and ln is base e (about 2.71828, the natural base). Both answer the same question with a different base.
- Why must x be above 0?
- A logarithm is the power a base must be raised to — and no power of a positive base gives 0 or a negative number, so log of 0 or below has no real answer.
- Is my data stored?
- No. The calculation runs in your browser.
- Why can't I take the log of zero or a negative number?
- No power of a positive base gives 0 or a negative number, so the log is undefined there.