Log Calculator

MATH · LOGARITHMS

Calculate log_b(x)

Calculated on this device
Enter a positive number greater than 0.

LOG BASE 10 OF 100

2

Exponential check: 10 ^ 2 = 100

Formula: log_b(x) = ln(x) ÷ ln(b)

log₁₀(x) & ln(x)2ln(x): 4.60517
Binary log₂(x)6.643856Base-2 bits

HOW IT WORKS

Logarithms and the change-of-base formula

The logarithm log_b(x) = y answers: “To what power must base b be raised to equal x?” Equivalently, bʸ = x.

01

Common, Natural & Binary Logs

Base 10 (log₁₀), base e (ln), and base 2 (log₂) are evaluated using dedicated IEEE-754 math functions for maximum accuracy.

02

Change-of-Base Identity

For any custom base b > 0 with b ≠ 1, the calculator uses the exact change-of-base identity:

log_b(x) = ln(x) ÷ ln(b)

LOGARITHM GUIDE

Essential log laws and when to use base 10, base e, or base 2

Choosing the right logarithm base

Use base 10 for pH, decibels, and Richter scales; base e (natural log) for continuous compounding and radioactive decay (see our Half-Life Calculator); and base 2 for information entropy and binary tree depth. For the inverse operation, use our Exponent Calculator.

Frequently asked questions

Why is log(0) or log of a negative number undefined here?

No real power of a positive base b can produce 0 or a negative number, so real logarithms require x > 0.

Why can't the logarithm base be 1?

Because 1ʸ = 1 for every exponent y, base 1 cannot uniquely represent any number other than 1, and ln(1) = 0 causes division by zero.

What is log_b(1) for any valid base?

Always 0, because b⁰ = 1 for every positive base b.

Can a logarithm be negative?

Yes. Whenever 0 < x < 1 (with b > 1), log_b(x) is negative—for example, log₁₀(0.01) = −2.

Your logarithm values are computed locally in this browser.