Logarithm calculator: log base b of x, ln and antilog

Find log base b of x, solve b^y = x for x or for the base, and see the change-of-base steps. Runs on your device.

How it works

  1. Choose what to find: the logarithm, the antilog or the base
  2. Type the base, the number or the exponent
  3. Read the answer and the change-of-base steps

What the logarithm calculator computes

A logarithm calculator finds the power y that turns a base b into a number x, so log base 2 of 64 is 6 because 2⁶ = 64. The page opens on that example. It also shows ln(64) = 4.158883, log₁₀(64) = 1.80618 and log₂(64) = 6, which are the natural, common and binary logarithms, and a check that the base to the power y gives x back. Type e as the base for the natural logarithm, and use the three choices at the top to switch between finding a logarithm, an antilog and a base. Results are rounded to the decimal places you set, from 0 to 10, and whole-number answers are recognised, so log₁₀ 1000 reads 3 and not 2.9999999999999996.

The change-of-base formula

For a base the keyboard does not have, use log base b of x = ln(x) ÷ ln(b), or the same with log₁₀ on top and bottom. For log base 5 of 200, ln 200 = 5.298317 and ln 5 = 1.609438, and 5.298317 ÷ 1.609438 = 3.29203. The working box writes this out with your numbers. Any base works as long as it is positive and not 1. This is ordinary double-precision arithmetic, so a result is rounded to the decimal places you choose and whole-number answers are recognised. Natural logarithms use the base e, about 2.718282, which you type as the letter e.

Antilog, and solving for x or the base

The antilog undoes a logarithm: if log base b of x is y, then x = bʸ. Choose x from b^y to get 10^2.5 = 316.227766 or e³ = 20.085537. Choose The base b to solve b^y = x for b: with x = 27 and y = 3, b = 27^(1/3) = 3. To solve an equation such as 2^x = 50, use the logarithm mode with base 2 and x = 50, which gives x = 5.643856. Results of 1e15 or more, or below 1e-6, are shown in scientific notation. The result card also shows the base to the power of the answer as a check, so a typing slip such as a wrong base is easy to see.

When a logarithm does not exist

The page explains each invalid input. No power of a positive base gives 0 or a negative number, so x must be more than 0. The base must be more than 0 and not 1, because 1 to any power is 1. In the base mode, y cannot be 0, because x raised to 1 ÷ 0 is undefined. A message appears under the box to fix. Complex logarithms are not covered, and results beyond 1e300 or below 1e-300 are refused.

Frequently asked questions

How do I calculate log base 2 of a number?

Choose The logarithm, set the base to 2 and type the number. log₂ 8 = 3 because 2³ = 8, and log₂ 50 = 5.643856. The page also shows ln and log₁₀ of the same number.

What is the difference between log and ln?

log usually means base 10 and ln means base e, about 2.718282. This page labels each one, writing log₁₀ and ln, so nothing is left to guess. ln(100) = 4.60517 and log₁₀(100) = 2.

Why is the log of a negative number undefined?

Because no power of a positive base is negative or zero. 2 raised to anything is above 0, so there is no y with 2^y = −8. The page shows a message under the x box when x is 0 or less.

How do I solve 2^x = 50?

Take the logarithm base 2 of both sides: x = log₂ 50 = ln 50 ÷ ln 2 = 3.912023 ÷ 0.693147 = 5.643856. Choose The logarithm, base 2, number 50.

What is the antilog of 3?

In base 10 it is 10³ = 1000, and in base e it is e³ = 20.085537. Choose x from b^y, set the base and type 3. The antilog is simply the base raised to the power.

Are my numbers stored or sent anywhere?

No. The numbers are processed in your browser and are not uploaded. They are not stored on your device either, and reloading the page puts the log base 2 of 64 example back.