HomeMath › Logarithm

Logarithm Calculator

logb(x), ln(x), log₂(x), and log₁₀(x) — live as you type.

logb(x)
0
ln(x) [loge(x)]
0
log2(x)
0
log10(x)
0
Show the math
Enter values to see the worked formula.

What Your Result Means

How This Calculator Works

You enter a positive number x and a base b (greater than 0 and not equal to 1). The tool computes the custom-base logarithm using the change-of-base identity: log_b(x) = ln(x) / ln(b). It also displays ln(x), log₂(x), and log₁₀(x) side by side. All calculations use the browser's built-in Math.log and Math.log10 functions.

Quick Questions

Why can't I use a base of 1 or a negative base?

A base of 1 would make the logarithm undefined because 1 raised to any power is always 1 — it can never reach any other number. Negative and zero bases are excluded because real-valued logarithms are only defined for positive bases other than 1.

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

In the real number system, no power of a positive base can produce zero or a negative result. Logarithms of non-positive numbers require complex numbers, which this calculator does not handle.

What is the change-of-base formula?

It states that log_b(x) = ln(x) / ln(b), or equivalently log_b(x) = log_c(x) / log_c(b) for any valid base c. This lets you compute any logarithm using just one built-in log function.

When would I use a custom base other than e, 2, or 10?

Custom bases appear in specific domains — for example, base-12 in some number systems, base-60 in time calculations, or arbitrary bases in certain information-theory and signal-processing formulas.

Sources

Method & review

MethodologyHow we calculate this Reviewed & Updated2026-04 Next review2027-04

Estimate only. Results reflect your inputs and standard formulas. Double-check important decisions independently.