Log Calculator

Compute the logarithm of a value to any base — base 10, base e (ln), or a custom base.

Equation used
log_b(x) = (ln(x))/(ln(b))

Frequently Asked Questions

Why must the value be greater than 0?

Logarithms are only defined for positive real numbers — there's no real power you can raise a positive base to that produces zero or a negative result, so the calculator flags value ≤ 0 as invalid.

Why can't the base be 1?

Any power of 1 is always 1, so log base 1 can't uniquely represent other values (the function isn't invertible) — the calculator excludes base = 1 and any base ≤ 0 for the same reason.

How does it compute logs to a custom base?

It uses the change-of-base formula log_b(x) = ln(x) / ln(b), computing the natural log of both the value and the base and dividing — this works for any valid base, not just 10 or e.

See it in action: interactive simulations