Skip to content

Logarithm Calculator

Enter a base and a number to get the logarithm, the antilogarithm, or the solution of an equation like 2^x = 100. Exact fractions are found where they exist (log base 4 of 8 is exactly 3/2), and every other answer comes with the change-of-base working and a check. Free, no sign-up.

What do you want to find?
Base

Must be positive: 1000, 0.001 or 2/3.

Results

3

Logarithm

6.90775528

Natural log, ln(x)

3.00000000

Common log, log₁₀(x)

9.96578428

Binary log, log₂(x)

2.30258509

ln of the base

The working

  • log₁₀(1000) is the exponent you must put on 10 to get 1000: 10^? = 1000.
  • 1000 = 10^3, so log₁₀(1000) = 3.

How to Use the Logarithm Calculator

  1. 1. Choose what to find. “Logarithm” gives log_b(x). “Antilogarithm” gives b^y. “Solve b^x = y” finds the exponent that turns the base into y, which is the same number as log_b(y) with the equation worked out.
  2. 2. Set the base. Pick 10 (the common log), e (the natural log, ln) or 2, or choose “Other” and type any positive base except 1 — a decimal, a fraction, or the letter e.
  3. 3. Enter the number. For a logarithm the number must be positive. Fractions and decimals such as 2/3 or 0.001 are read exactly.
  4. 4. Read the result. You get the answer, the natural, common and binary logs of the same number, and the working: the definition, the change-of-base step and a check.

What a Logarithm Is

A logarithm answers the question “what exponent?” The logarithm of x to the base b, written log_b(x), is the power you must raise b to in order to get x. Since 10³ = 1000, log₁₀(1000) = 3; since 2⁶ = 64, log₂(64) = 6. It is the inverse of exponentiation: log_b(b^y) = y and b^(log_b x) = x. The inverse operation, b^y, was historically called the antilogarithm, though today it is usually just called the exponential function.

The base must be positive and not equal to 1 (every power of 1 is 1), and x must be positive: no real power of a positive base is zero or negative. That is why log(0) and log(−5) are reported as undefined.

The logarithm laws (positive x, y, and base b ≠ 1)
LawRuleExample
Productlog_b(xy) = log_b x + log_b ylog₂(8 × 4) = 3 + 2 = 5
Quotientlog_b(x/y) = log_b x − log_b ylog₁₀(1000/10) = 3 − 1 = 2
Powerlog_b(x^p) = p · log_b xlog₂(8²) = 2 × 3 = 6
Change of baselog_b x = ln x / ln blog₄ 8 = ln 8 / ln 4 = 1.5
Special valueslog_b 1 = 0, log_b b = 1log₇ 1 = 0, log₇ 7 = 1

Log, Ln and Which Base “log” Means

The bare word “log” has no single meaning. Calculators and much of science and engineering use it for base 10; mathematics texts usually mean the natural logarithm, base e ≈ 2.71828; and computer science often means base 2. The international standard ISO 80000-2 suggests lg for base 10, ln for base e and lb for base 2 to remove the ambiguity. This calculator always shows the base, and its quick-pick buttons write the common (10), natural (e) and binary (2) logs explicitly.

Worked Example: Solving 2^x = 100

  • Take the logarithm of both sides: x · ln 2 = ln 100.
  • Divide by ln 2: x = ln 100 / ln 2 = 4.60517019 / 0.69314718.
  • The quotient is x ≈ 6.64385619. Because 2⁶ = 64 and 2⁷ = 128, the answer is between 6 and 7, as it should be.
  • Check: 2^6.64385619 ≈ 100.

Exact Answers and Precision

When x is a rational power of the base, the calculator finds the answer exactly by comparing prime factorizations: 4 = 2² and 8 = 2³, so log₄ 8 = 3/2, and log_(1/2) 8 = −3. All other results are computed in double precision, about 15 significant digits, then shown to the number of places you choose. The antilogarithm of a whole or fractional exponent is exact whenever the power is rational.

Where logarithms show up

pH is −log₁₀ of the hydrogen-ion concentration, so each pH unit is a tenfold change. Sound levels in decibels use 10 log₁₀ of an intensity ratio. Compound growth and half-life problems are solved with logarithms for the same reason as 2^x = 100: the unknown sits in an exponent.

Frequently Asked Questions

What is the difference between log and ln?
ln is the logarithm to the base e (about 2.71828), the natural logarithm. A bare log is base 10 on most calculators and in science, base e in many mathematics books, and base 2 in computer science, so always check the context. Convert between them with log₁₀ x = ln x / ln 10.
How do I calculate a log with any base?
Use the change-of-base formula: log_b x = ln x / ln b, or equally log₁₀ x / log₁₀ b. For log₅ 100, divide ln 100 ≈ 4.60517 by ln 5 ≈ 1.60944 to get about 2.86135.
What is the logarithm of zero or of a negative number?
Neither exists as a real number. A positive base raised to any real power is always positive, so no exponent produces 0 or a negative result. As x approaches 0 from above, log_b x decreases without bound.
What is an antilog?
The antilogarithm undoes a logarithm: if log₁₀ x = 2.5, then x = 10^2.5 ≈ 316.23. With a table of logarithms, finding x from its logarithm was called looking up the antilog; today it is just exponentiation.
Why can't the base of a logarithm be 1?
Every power of 1 equals 1, so no exponent could ever give another number, and log₁ x would be meaningless. The formula ln x / ln b also fails, because ln 1 = 0 and you would be dividing by zero.
How do I solve an equation with the unknown in the exponent?
Take the logarithm of both sides and use the power law to bring the exponent down: from 3^x = 20 you get x · ln 3 = ln 20, so x = ln 20 / ln 3 ≈ 2.727. The “Solve b^x = y” mode does this and shows each line.

Related Tools

More in Math Calculators

See all Math Calculators