Skip to content
Calculator.hair

Log Calculator (Logarithm)

Fill in two of the three boxes and leave the one to solve for empty. The base is a positive number other than 1, or e.

Press Calculate to see the results.

This log calculator solves log_b(x) = y for whichever value is missing. Enter e as the base for the natural logarithm, or 10 for the common logarithm.

Logarithms answer the question: to what power must a base be raised to produce a given number? They turn multiplication into addition and powers into multiplication, which made them indispensable for calculation before electronic calculators and keeps them central to science today.

What is Log?

The logarithm is the inverse of exponentiation. If bʸ = x, then log_b(x) = y. Since 10² = 100, log₁₀(100) = 2; since 2⁵ = 32, log₂(32) = 5. The base b must be positive and not equal to 1, and the number x must be positive, because no real power of a positive base gives zero or a negative number.

Two bases are used so often they have their own notation. The common logarithm, base 10, is written log or log₁₀ and counts powers of ten; it underlies the decibel scale, pH and the Richter magnitude. The natural logarithm, base e ≈ 2.71828, is written ln and arises naturally in calculus, continuous growth and decay, and probability. The binary logarithm, base 2, is common in computing. With the default inputs, ln(100) ≈ 4.60517.

Basic Log Rules

Logarithm rules mirror the exponent laws. They hold for any valid base b and positive numbers x and y.

Product rule: log_b(xy) = log_b(x) + log_b(y). The log of a product is the sum of the logs. log₁₀(1,000 × 100) = 3 + 2 = 5.

Quotient rule: log_b(x / y) = log_b(x) − log_b(y). log₂(64 ÷ 4) = 6 − 2 = 4.

Power rule: log_b(xⁿ) = n log_b(x). log₁₀(10⁴) = 4 × 1 = 4. This rule is how logarithms solve equations with an unknown exponent: from 2ⁿ = 50 we get n log 2 = log 50, so n ≈ 5.644.

Change of base: log_b(x) = log_k(x) ÷ log_k(b) for any convenient base k. Calculators usually provide only ln and log₁₀, so log₇(343) is computed as ln 343 ÷ ln 7 = 3. This calculator uses the same identity internally.

Special values: log_b(1) = 0 for every base, because b⁰ = 1, and log_b(b) = 1, because b¹ = b. Logs of numbers between 0 and 1 are negative: log₁₀(0.01) = −2. Finally, b^(log_b x) = x and log_b(bˣ) = x, expressing that the logarithm and the power undo each other.

Frequently asked questions

What is the difference between log and ln?

log usually means base 10 and ln means base e (about 2.71828). ln(x) = log(x) ÷ log(e) ≈ 2.302585 × log₁₀(x).

Why can't you take the log of a negative number?

A positive base raised to any real power is positive, so no real exponent produces zero or a negative number.

How do I calculate a log with an unusual base?

Use the change-of-base rule: log_b(x) = ln(x) ÷ ln(b). For example log₅(125) = ln 125 ÷ ln 5 = 3.

What is log of 1?

Zero, in every base, because any valid base raised to the power 0 equals 1.

Updated by Calculator.hair. How we build and check our calculators