Home / Math / Logarithm Calculator

Logarithm Calculator

Find the logarithm of a positive number in base 10, base e, base 2 or any base you choose, or go the other way and raise the base to a power. The page also shows the three common logs together.

By Adzita Editorial Team · Updated 2026-11-03 · How we build and check our tools

Positive and not equal to 1.
For a logarithm: the number, which must be positive. For an antilog: the exponent.

What a logarithm is

A logarithm answers the question: to what power must the base be raised to get this number? Writing logb(x) = y is the same statement as by = x. So log10(1000) = 3, because 103 = 1000, and log2(8) = 3, because 23 = 8. The antilogarithm is the reverse step: given y and the base, it returns x.

Logs turn multiplication into addition, which is why they were central to calculation before electronic calculators and still organise many scales, such as decibels, pH and the Richter magnitude, where each step represents a multiplication.

The three common bases

Calculators sometimes write plain "log" for base 10 and sometimes for base e, depending on the field. This page labels the base on every result to avoid that ambiguity.

Change of base and the laws of logs

Any logarithm can be computed from natural logs with the change-of-base rule: logb(x) = ln(x) ÷ ln(b). This is how the custom-base option works. Floating-point division can leave tiny errors, so when the quotient is within one part in a trillion of a whole number and the base raised to that whole number matches the input, the page returns the whole number.

LawStatement
Productlog(xy) = log(x) + log(y)
Quotientlog(x ÷ y) = log(x) − log(y)
Powerlog(xk) = k × log(x)

Domain limits and common mistakes

Real logarithms exist only for positive numbers. Log of zero is undefined, because no power of a positive base reaches zero, and the log of a negative number is not real. The base must be positive and not 1, since powers of 1 are always 1. Another frequent slip is expecting log(x + y) to equal log(x) + log(y); only products split into sums. Also remember that logarithms of numbers between 0 and 1 are negative, so log base 10 of 0.01 is −2, and that a logarithm grows slowly: doubling the input adds only a fixed amount, about 0.301 in base 10. Relationships between logs and powers are explored further in the exponent calculator, and very large or small values are easier to read with the scientific notation calculator.

Worked example

How many times must 2 be multiplied by itself to reach 1,024? The binary logarithm answers exactly that.

Inputs

CalculationLogarithm: find log of a number
Base2 (binary log)
Value1024

Result

log_2(1,024) = 10

Logarithm of 1,024 to the base 2.

Result10
Common log, log₁₀(x)3.0102999566
Natural log, ln(x)6.9314718056
Binary log, log₂(x)10
Change of baseln(1,024) ÷ ln(2) = 6.9314718056 ÷ 0.6931471806
Meaning2 raised to 10 gives 1,024

Accuracy note: Results use standard double-precision arithmetic, so very large or very small values may be rounded. Check important results by another method.

Frequently asked questions

What is the difference between log and ln?

Log usually means base 10 and ln means base e, the natural logarithm. Some textbooks use log for base e, so check the convention, or read the base shown on this page.

How do I calculate a logarithm with a custom base?

Divide the natural log of the number by the natural log of the base. For log base 3 of 81 that is ln(81) ÷ ln(3) = 4.

What is an antilog?

An antilogarithm undoes a logarithm. If log base b of x equals y, then the antilog of y is b raised to the power y, which returns x.

Why can I not take the log of zero or a negative number?

No real power of a positive base can produce zero or a negative result, so the real logarithm is undefined there. Only positive inputs are accepted.

Why is the base not allowed to be 1?

Every power of 1 equals 1, so no exponent could produce any other number. The change-of-base formula would also divide by ln(1) = 0.

Exponent CalculatorRaise a base to any power: whole, negative or fractional, with exact integers and scientific notation.Scientific Notation CalculatorConvert numbers to scientific, E and engineering notation, or back to a plain decimal.Scientific CalculatorEvaluate typed expressions with trig, logs, roots, powers and factorials in degrees or radians.Square Root CalculatorSquare, cube and nth roots with simplified radical form and perfect-power check.

References and sources

  1. NIST Digital Library of Mathematical Functions, section 4.2: logarithms and exponentials. Link
  2. ISO 80000-2: Quantities and units, mathematical signs and symbols, which defines ln, lg and lb.

Check primary sources for anything you rely on.