Logarithm Calculator
Enter a number and a base to get the logarithm log_b(x) — plus the natural logarithm ln(x) — using the change-of-base rule ln(x) ÷ ln(b).
Any base, instantly
Enter a value and a base and the calculator returns the logarithm log_b(x) and the natural logarithm ln(x) together — no base-10 or base-2 button juggling.
Stay positive
The value must be greater than 0 and the base greater than 0 and not equal to 1 — logarithms are undefined outside that range.
What is a logarithm?
The exponent that rebuilds a number
A logarithm answers a single question: to what power must you raise the base to get your number? Written log_b(x), it is the exponent that turns the base b into x, so log₁₀(1000) = 3 because 10³ = 1000. This logarithm calculator takes two inputs — the value x and the base b — and returns log_b(x) using the change-of-base rule ln(x) ÷ ln(b), alongside the natural logarithm ln(x) itself. Logarithms are the inverse of exponentiation and sit behind decibels, pH, the Richter scale, and the way we measure orders of magnitude.
Enter a positive value and a base greater than 0 (and not 1) to get the logarithm and the natural logarithm instantly.
The logarithm to any base is the natural logarithm of the value divided by the natural logarithm of the base — the change-of-base formula.
log_b(x) = ln(x) ÷ ln(b)Because every logarithm shares this single rule, the same calculation works for base 10 (common logs), base 2 (used in computing and information theory), base e ≈ 2.71828 (natural logs), or any other positive base. The natural logarithm ln(x) is simply log_b(x) with the base set to e, which is why it appears as the second result here.
Suppose you want the base-10 logarithm of 1000.
Take the natural log of the value
ln(1000) ≈ 6.907755 — the natural logarithm of 1000.
Take the natural log of the base
ln(10) ≈ 2.302585 — the natural logarithm of the base.
Divide
6.907755 ÷ 2.302585 = 3 — the logarithm of 1000 to base 10. The natural logarithm ln(1000) ≈ 6.907755 is reported as the second result.
The logarithm tells you the exponent, not the value. A result of 3 for log₁₀(1000) means 1000 is 10 raised to the power of 3 — three orders of magnitude. That is the real power of logs: they compress huge multiplicative ranges into small additive numbers, so a jump of 1 always means "multiply by the base again". On a base-10 scale, going from 2 to 3 is the difference between 100 and 1000; on the base-2 scale, each step of 1 doubles the value. The natural logarithm ln(x) uses the special base e and is the version that appears in growth, decay, and calculus, because its rate of change is uniquely simple. When your value equals the base the logarithm is 1, when the value is 1 the logarithm is 0, and values below 1 give negative logarithms — fractions need a negative exponent to rebuild them.
The change-of-base rule is exact, but the domain of a logarithm is strict.
Positive value, valid base
Logarithms are only defined for a value greater than 0; there is no real logarithm of 0 or a negative number. The base must also be greater than 0, and it cannot equal 1 — ln(1) is 0, so dividing by it is undefined and base 1 could never produce anything but 1. Outside this domain the calculator returns no result rather than a misleading number.