Logarithm calculator

Find the power a base must be raised to in order to give your number.

Tier 0 · browser · unlimited

Logarithm

Logarithm
3
Natural log (ln)6.907755278982
Log base 103
Log base 29.965784284662

What a logarithm answers

log_b(x) answers the question "to what power must b be raised to get x?". log₁₀(1,000) = 3 because 10³ = 1,000; log₂(1,024) = 10 because 2¹⁰ = 1,024. Logarithms turn multiplication into addition, which is why they appear in scales that span many orders of magnitude: decibels, pH, the Richter scale and star magnitudes.

The natural logarithm, ln, uses base e ≈ 2.71828 and appears in growth and decay: an amount growing continuously at 5% a year doubles in ln(2)/0.05 ≈ 13.9 years. Base 2 counts bits: a number up to 1,000,000 needs ⌈log₂ 1,000,000⌉ = 20 bits.

Change of base

Any logarithm can be computed from natural logs: log_b(x) = ln(x) ÷ ln(b). log₃(81) = ln 81 ÷ ln 3 = 4.394 ÷ 1.0986 = 4.

How this works

The page uses the change-of-base formula, log_b(x) = ln(x) ÷ ln(b), with standard double-precision natural logarithms. Results that land within 10⁻¹² of a whole number are shown as that whole number, so exact powers give clean answers. The table also lists ln, log₁₀ and log₂ of the same number. The number must be positive, and the base must be positive and different from 1. Everything runs in your browser.

Frequently asked

What is the difference between log and ln?

log usually means base 10 (in calculators and science) and ln means base e. In much of mathematics and programming, log means ln.

Why is log of 0 undefined?

No power of a positive base gives 0; the logarithm tends to minus infinity.

How do I calculate log base 2 on a normal calculator?

Divide ln(x) by ln(2), or log(x) by log(2).

What is ln(1)?

0, for any base: b⁰ = 1.

Sources

Reviewed Oct 17, 2026 · test vectors fixtures/calculators/math/logarithm-calculator/