Math & Statistics

Logarithm Calculator

Calculate the logarithm of any number in base 10, base e, base 2 or a custom base. Find antilogs and unknown bases too, with the change of base working shown.

Free, runs in your browserUpdated October 2026Any base, steps shownBy Talha Salman
Solve for
Must be greater than 0.
Logarithm
–
Natural log, ln x–
Common log, log₁₀ x–
Binary log, log₂ x–
Check: base^result–

Quick answer: A logarithm tells you the power a base must be raised to in order to get a number: logb(x) = y means by = x. So log10(1,000) = 3, because 103 = 1,000. For any base, use logb(x) = ln(x) ÷ ln(b). This logarithm calculator also finds the antilog and solves for an unknown base.

Logarithm calculator diagram: 1, 10, 100, 1,000 and 10,000 map to log base 10 values 0, 1, 2, 3 and 4, with ln 1,000 about 6.9078 and log base 2 of 1,000 about 9.9658
Each step multiplies x by 10 but adds only 1 to the common log, which is why logs compress huge ranges.

What Does a Logarithm Calculator Do?

A logarithm calculator works out logb(x) for any positive number x and any valid base b. Choose base 10 for the common log, base e for the natural log (ln) or base 2 for the binary log, or type your own base such as 3, 5 or 1.5. The answer comes with the change of base working, the ln, log10 and log2 of the same number, and a check that raises the base to the result.

The calculator also runs the relationship backward. Antilog mode finds x when you know the log, which is the same as working out by, and Base mode finds the base when you know both x and the log. When the answer is a simple fraction, such as log8(4) = 2/3, it says so instead of only showing 0.666667. For powers going the other way, the exponent calculator is the natural partner.

How Do You Use the Logarithm Calculator?

How to use the logarithm calculator: choose what to solve for, pick the base, enter the number x, then read the logarithm and the ln, log10 and log2 values
Choose what to solve for, pick a base, enter x and read the logarithm with its working.
  1. Choose Logarithm to find logb(x), Antilog to find x, or Base to find b.
  2. Pick the base from the list, or choose Custom base and type it. You can type e for 2.71828.
  3. Enter the number x. It has to be greater than 0.
  4. Set the decimal places you want, from 2 to 10.
  5. Read the answer and the steps, then press Copy to paste the result into your homework or spreadsheet.

The tool accepts e and pi as inputs, so ln(e2) and similar checks are easy. Results update as you type.

What Is the Change of Base Formula?

The change of base formula lets you find a logarithm in any base using only natural logs or common logs. Divide the log of the number by the log of the base, using the same type of log on top and bottom.

logb(x) = ln(x) ÷ ln(b) = log10(x) ÷ log10(b)
Antilog: x = by    Unknown base: b = x1/y

Worked example: find log2(50). Using natural logs, ln(50) ≈ 3.912023 and ln(2) ≈ 0.693147. Dividing gives 3.912023 ÷ 0.693147 ≈ 5.643856. As a check, 25.643856 ≈ 50. That fits, because 25 = 32 and 26 = 64, so the answer has to fall between 5 and 6.

Unknown base example: if logb(81) = 4, then b4 = 81, so b = 811/4 = 3. The definitions behind all of this, including the principal natural logarithm, are set out in the NIST Digital Library of Mathematical Functions chapter on logarithms.

What Are the Log Rules?

Three rules turn multiplication, division and powers into addition, subtraction and multiplication, which is why logarithms were invented. They hold for any valid base.

RuleFormulaExample (base 10)
Productlog(xy) = log x + log ylog 200 = log 2 + log 100 ≈ 0.30103 + 2 = 2.30103
Quotientlog(x/y) = log x − log ylog 0.5 = log 1 − log 2 ≈ −0.30103
Powerlog(xn) = n log xlog 8 = 3 log 2 ≈ 0.90309
Identitylogb(b) = 1, logb(1) = 0log 10 = 1, log 1 = 0
Inverseblogb(x) = x10log 7 = 7

The power rule is the one you use to solve for an unknown exponent. To find how long money takes to double at 6% a year, solve 1.06t = 2: t = log 2 ÷ log 1.06 ≈ 11.9 years. The exponential growth calculator runs the same idea for growth and decay problems.

Where Are Logarithms Used?

Logarithms appear wherever values span many powers of ten. The pH scale is a negative base 10 log of hydrogen ion concentration, so pH 5 water is ten times more acidic than pH 6, as the USGS Water Science School explains in its guide to pH. You can try that calculation directly with the pH calculator. Earthquake magnitudes, decibels and star brightness use the same kind of scale.

In computing, log2 counts bits and the steps in a binary search, so 1,000 items need about 10 comparisons. In statistics and finance, natural logs turn compound growth into straight lines, which is why ln shows up in continuous interest and in log returns.

Frequently asked questions

What is the difference between log and ln?

On most calculators, log means the common logarithm with base 10 and ln means the natural logarithm with base e, about 2.71828. They differ by a constant factor: ln(x) ≈ 2.302585 × log(x).

How do you calculate a log without a log button?

Use the change of base formula with whatever log you have: logb(x) = ln(x) ÷ ln(b). For a quick estimate, find the two powers of the base that x falls between, which tells you the whole number part.

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

A positive base raised to any real power is always positive, so no real exponent gives 0 or a negative result. The log of those numbers is undefined in the real numbers, and the calculator shows an error instead.

What is an antilog?

The antilog reverses a logarithm. If logb(x) = y, the antilog is x = by. The antilog of 3 in base 10 is 1,000, and the antilog of 1 in base e is e itself.

Can a logarithm be negative?

Yes. When the base is greater than 1, any number between 0 and 1 has a negative log. For example, log10(0.01) = −2, because 10−2 = 0.01.

Why can't the base be 1?

Every power of 1 equals 1, so 1y can never reach any other number and the division by ln(1) = 0 in the change of base formula fails. Bases must be positive and not equal to 1.