Logarithm Calculator (log)

Enter a number (x) and a base (b) to compute logb(x) — the logarithm of x in that base. You can also use e as the base for the natural logarithm, or leave the base as 10 for the common log. The calculator returns the logarithm result (y), plus the equivalent natural log and log base 2 values so you can compare across the most common bases at a glance.

The number whose logarithm you want to find. Must be a positive value.

Select a common base or choose Custom to enter your own.

Enter any positive number (not equal to 1) as the custom base.

Results

Logarithm Result (y)

--

log₁₀(x)

--

ln(x) — Natural Log

--

log₂(x)

--

Antilog bʸ (verification)

--

Logarithm Values Across Common Bases

Results Table

Frequently Asked Questions

What is a logarithm?

A logarithm answers the question: to what exponent must a given base be raised to produce a certain number? For example, log₁₀(1000) = 3 because 10³ = 1000. Logarithms are the inverse operation of exponentiation.

What is the difference between log and ln?

log typically refers to the common logarithm with base 10, while ln is the natural logarithm with base e (≈ 2.71828). Base 10 is common in science and engineering, while ln is widely used in mathematics and physics. They are related by: ln(x) = log₁₀(x) / log₁₀(e).

How do I calculate a logarithm with an arbitrary base?

Use the change-of-base formula: log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b). This lets you compute a logarithm in any base using natural log or base-10 log, both of which are available on most calculators.

What is log 1 in any base?

log_b(1) = 0 for any valid base b. This is because any number raised to the power of 0 equals 1 (b⁰ = 1). So regardless of which base you choose, the logarithm of 1 is always 0.

Can a logarithm be negative?

Yes — a logarithm can be negative when the input number x is between 0 and 1. For example, log₁₀(0.01) = −2 because 10⁻² = 0.01. However, the input x itself must always be a positive number; the logarithm of zero or a negative number is undefined in real numbers.

What is log base 2 used for?

Log base 2 (binary logarithm) is heavily used in computer science and information theory. It tells you how many bits are needed to represent a number, and it appears in algorithms analysis — for example, a binary search of n items takes log₂(n) steps.

What is an antilogarithm?

The antilogarithm is the inverse of the logarithm. If log_b(x) = y, then the antilog is x = bʸ. For example, if log₁₀(x) = 3, the antilog gives x = 10³ = 1000. This calculator shows the antilog as a verification step.

What are the basic rules of logarithms?

The key log rules are: Product rule — log_b(x·y) = log_b(x) + log_b(y); Quotient rule — log_b(x/y) = log_b(x) − log_b(y); Power rule — log_b(xⁿ) = n·log_b(x); and the Change-of-base rule — log_b(x) = log_c(x) / log_c(b). These rules simplify complex logarithmic expressions.

More Math Tools