Logarithm Calculator (Any Base)
Compute log base b of any positive number using the change-of-base formula, alongside natural log, base-10 and base-2.
How it works
log_b(x) = ln(x) ÷ ln(b) = log₁₀(x) ÷ log₁₀(b) (change-of-base formula)
A logarithm answers “what power turns the base into this number?” — log base b of x is the exponent e for which bᵉ = x. Calculators only build in the natural log (base e) and base-10, so any other base is reached through the change-of-base formula: divide the log of x by the log of the base, in whichever built-in base you like. The three common bases — e, 10 and 2 — are shown alongside for convenience.
Worked example
For x = 1000 and base b = 10: log₁₀(1000) = 3, because 10³ = 1000. Using change of base with natural logs gives the same answer, ln(1000) ÷ ln(10) ≈ 6.9078 ÷ 2.3026 = 3. In base 2, log₂(1000) ≈ 9.9658, since 2^9.9658 ≈ 1000.
Sources: Logarithm — Wikipedia
Frequently asked questions
What is the change-of-base formula?
log_b(x) = ln(x) ÷ ln(b). Any base works in the numerator and denominator as long as they match, so you can compute a logarithm in an unusual base using only the natural log or base-10 log your calculator provides.
Why must the value be positive?
No real power of a positive base produces zero or a negative number, so the logarithm of x ≤ 0 has no real value. Logarithms of negative numbers exist only in the complex plane, which this calculator does not cover.
Why can’t the base be 1?
Because 1 raised to any power is always 1, so 1ᵉ = x has no solution unless x is 1 — the function is not defined. The base must also be positive, ruling out negative bases whose powers alternate in sign.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.