Skip to main content

MATH · LOGARITHM

Logarithm Calculator

Calculate the natural log, log base 10, log base 2, or any custom base logarithm. Results to 6 significant figures with full domain validation.

Base and value
02 Result
2
log_10(100) = 2

About This Calculator

The logarithm answers the question "what exponent do I raise this base to, to get this value?" Logarithms appear throughout science, engineering, computing, music, and finance — from decibels to earthquake magnitudes to information theory.

How It Works

Select a base — natural (e), common (10), binary (2), or custom — and enter the value. The calculator uses the change-of-base formula for custom bases and JavaScript's native log functions for the standard bases. Results are given to 6 significant figures. The domain is strictly x > 0; x ≤ 0 and base = 1 are errors.

The Formula

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

x
value (must be > 0)
b
base (must be > 0 and ≠ 1)

Frequently Asked Questions

What is the natural logarithm?
The natural logarithm (ln) uses Euler's number e ≈ 2.71828 as its base. It appears naturally in growth and decay equations, probability, and calculus.
Why can't I take the log of zero or a negative number?
Logarithm is the inverse of exponentiation. No real-number power of a positive base can produce zero or a negative result, so the logarithm is undefined for x ≤ 0. Attempting ln(0) produces negative infinity, which this calculator rejects as an error.
Why is base 1 rejected?
1^x = 1 for all x, so there is no finite exponent that makes 1^x = y for y ≠ 1. log_1(x) is undefined.