← All tools/Calculators/Math/Logarithm Calculator

Logarithm Calculator

The logarithm of any number to any base — with its natural and base-10 logs alongside.

log base b of x

—

logb(x)
ln(x)
log₁₀(x)

How it works

log_b(x) = ln(x) ÷ ln(b).
Common logs: log₁₀(x) is the base-10 log, ln(x) is the natural log (base e ≈ 2.718).
A logarithm is only defined for x > 0 and a base b > 0 with b ≠ 1.

Worked example: log₁₀(100) = 2, because 10² = 100, and ln(100) = 4.6052. With base 2, log₂(8) = 3, because 2³ = 8. The calculator uses log_b(x) = ln(x) ÷ ln(b), so log₂(8) = ln(8) ÷ ln(2) = 2.0794 ÷ 0.6931 = 3.

Frequently asked questions

What is a logarithm, in plain words?

The power you raise the base to in order to get the number. log₁₀(100) = 2 because 10² = 100. It turns multiplication into addition, which is why logs show up in sound (decibels), earthquakes (Richter) and growth.

Why are log(0) and log of a negative number not allowed?

No power of a positive base gives zero or a negative number — 10 raised to any power is always positive. The calculator shows a plain message instead of an error for those inputs.

Why can the base not be 1?

Because 1 raised to any power is 1, so it can never make any other number — the logarithm would have no answer. The base must be positive and not equal to 1.

What is the difference between log and ln?

log usually means base 10 and ln means base e (about 2.718). They are the same idea with different bases — ln(x) = log₁₀(x) × 2.3026, and this calculator shows both.

Where are logarithms actually used?

Everywhere a quantity spans huge ranges: the Richter scale for earthquakes, decibels for sound, pH for acidity, compound growth, and computer science — binary search and sorting run in log₂(n) time.

More tools

Tell us what you think

Loving this tool, or stuck on something? Tell us — it takes a minute.

We’ll only use your name and email to reply if needed. The tool and page are filled in for you.