Logarithm Calculator

Enter a positive number and a base to find its logarithm. The calculator shows log base 10, the natural log (ln), log base 2 and your custom base at once, using the change-of-base formula, plus the antilog check.

Enter a number and base, then press Calculate log.

What a logarithm is

A logarithm answers the question "to what power must I raise the base to get this number?" The log base b of x is the exponent y such that by = x. Logs turn multiplication into addition, which is why they underpin slide rules, decibels, pH and the Richter scale.

logb(x) = y  ⇔  by = x

Three bases are so common they have names: log (base 10, the common log), ln (base e ≈ 2.71828, the natural log) and log₂ (base 2, used in computing and information theory). This tool reports all of them plus your custom base.

Worked example

Find log base 2 of 1000:

Question: 2 to what power equals 1000?
Change of base: log₂(1000) = ln(1000) ÷ ln(2) = 6.9078 ÷ 0.6931.
Result: ≈ 9.9658, so 29.9658 ≈ 1000.

Change of base

Calculators compute natural and common logs directly; any other base comes from the change-of-base formula: log​b(x) = ln(x) ÷ ln(b). That is how this tool handles your custom base. Logarithms are only defined for positive numbers, and the base must be positive and not equal to 1 - the calculator flags those cases. The antilog (b raised to the result) confirms the answer round-trips back to x. Everything is computed in your browser.

Tip: exploring exponents and roots too? Use the scientific calculator, or write huge or tiny numbers compactly with the scientific notation calculator.

Frequently asked questions

What is the difference between log and ln?

log usually means base 10 (the common log) and ln means base e ≈ 2.71828 (the natural log). They differ by a constant factor: ln(x) = log(x) × ln(10).

Why can't I take the log of a negative number?

Because no real exponent of a positive base produces a negative result. Logs of zero or negative numbers are undefined in the real numbers, so the calculator flags them.

How does it compute an unusual base?

With the change-of-base formula: log base b of x equals ln(x) divided by ln(b). The calculator computes both natural logs and divides, which works for any valid base.

What does the antilog show?

The antilog raises the base to the logarithm, which should return your original number. It is a built-in check that the result is correct.

MB
Mustafa Bilgic · Editor, Calcool
Uses the JavaScript Math log functions and the change-of-base formula logb(x) = ln(x) ÷ ln(b). Everything runs in your browser - nothing you enter is uploaded, logged or stored.

Related calculators