TTKTheTextKit

Logarithm Calculator

Enter a base and a number to get the logarithm, shown together with the common (base 10), binary (base 2) and natural (base e) logarithms and the change of base working. Switch to the antilogarithm tab to raise a base to a power. You can type values such as 1/8, 2^10, e or pi. Everything runs in your browser.

log base 2 of 1000
9.96578428466
Because 2 raised to 9.96578428466 is 1000
Common log (base 10)
3
Binary log (base 2)
9.96578428466
Natural log (base e)
6.90775527898

Change of base: log(1000) / log(2) = 3 / 0.301029995664 = 9.96578428466

The whole part of 1000 has 4 digits: floor of its common log, plus 1.

The logarithm of x to the base b is the power you raise b to in order to get x, so log base 2 of 8 is 3 because 2 cubed is 8. The common logarithm uses base 10, the binary logarithm base 2, and the natural logarithm base e (about 2.71828). The change of base rule, log base b of x = log(x) / log(b), lets you find any logarithm with the ones on a calculator. The number must be positive, and the base must be positive and not 1. You can type values such as 1/8, 2^10, e or pi. Everything runs in your browser.

Related Tools

[5 suggestions]

About the Logarithm Calculator

The logarithm of x to the base b, written log base b of x, is the power to which b must be raised to get x. Since 2 to the power 3 is 8, log base 2 of 8 is 3. Exact answers are shown exactly: log base 5 of 125 is 3, not 3.0000000000000004. The common logarithm has base 10, the binary logarithm has base 2, and the natural logarithm, written ln, has base e, which is about 2.71828. The change of base rule says log base b of x equals log(x) divided by log(b) for any other base, which is how you find a logarithm to an unusual base on a calculator: log base 3 of 5 is about 1.4650. The main rules are that the log of a product is the sum of the logs, the log of a quotient is the difference, and the log of a power brings the exponent to the front. The argument must be positive, because no real power of a positive base gives zero or a negative number, and the base must be positive and not 1, because 1 to any power is 1. The antilogarithm undoes a logarithm: it is the base raised to the power. The number of digits in a whole number is the floor of its common logarithm plus 1, so 1000 has 4 digits. Logarithms turn multiplication into addition and are used for decibels, pH, the Richter scale, compound growth and the running time of algorithms.

What is a logarithm?▾

The logarithm of x to the base b is the power you raise b to in order to get x. log base 2 of 8 is 3 because 2 x 2 x 2 = 8.

What is the difference between log, ln and log2?▾

log usually means base 10, ln means base e (about 2.71828), and log2 means base 2. Some programming languages and textbooks use log for the natural logarithm, so check which one is meant.

How do I calculate a logarithm with any base?▾

Use the change of base rule: log base b of x = log(x) / log(b), with the same kind of log (base 10 or base e) on top and bottom. For log base 3 of 5, that is log(5) / log(3), about 1.465.

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

A positive base raised to any real power is always positive, so no power gives 0 or a negative number. The logarithm of 0 does not exist, and the log of a negative is not a real number.

How do I find the number of digits in a number?▾

Take the common logarithm, round it down and add 1. For 123456, log10 is about 5.09, so floor 5 plus 1 gives 6 digits.

Is my data uploaded?▾

No. The calculation runs in your browser and nothing you enter is sent anywhere.