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.
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]Scientific Notation Converter
Convert a number to scientific, engineering, E and standard notation, round to significant figures and see the SI prefix, with every digit kept exact.
Student ToolsCompound Interest Calculator
See how a starting amount and monthly deposits grow with compound interest, year by year, with the effective annual rate.
Math & MoneyCAGR Calculator
Find the compound annual growth rate between two values, the value after growing at a rate, or the time to reach a target, with the doubling time and rule of 72.
Math & MoneyQuadratic Equation Solver
Solve ax^2 + bx + c = 0 for real or complex roots, with the discriminant, exact form, vertex and factored form.
Math & MoneyArithmetic and Geometric Sequence Calculator
Find the nth term and the sum of an arithmetic or geometric sequence, the sum to infinity, the position of a value, or identify a list of numbers.
Student ToolsAbout 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.