Find the logarithm of a number, to any base.
Uses the change-of-base formula to compute a logarithm at any base from natural logarithms.
Log: logᵦ(n) = ln(n) ÷ ln(b)
A logarithm calculator finds the power to which a base must be raised to give a number. log₂ 1024 = 10, because 2¹⁰ = 1024. You enter the number and any positive base other than 1, and it returns the logarithm using the change-of-base formula.
Logarithms turn multiplication into addition, which is why they appear in Class 11 mathematics, in chemistry through pH, in physics through the decibel scale, and in computer science through binary search and data sizes. Base 10 is the common logarithm and base 2 is used for bits and doubling. The calculator answers: how many times must I multiply the base by itself to reach this number?
1. Check that the number x is positive and the base b is positive and not equal to 1.
2. If you can spot it, write x as a power of b directly: if x = bʸ, then log_b x = y.
3. Otherwise use the change-of-base formula: log_b x = ln x ÷ ln b, or log₁₀ x ÷ log₁₀ b.
4. Use log tables or a calculator for ln or log₁₀ of each value.
5. Divide to get the answer.
6. Check by raising the base to your answer; it should give x.
The statement y = log_b x means exactly bʸ = x. So logarithms undo exponentials, just as division undoes multiplication. From the laws of exponents follow the laws of logarithms: log(xy) = log x + log y, log(x ÷ y) = log x − log y and log(xⁿ) = n log x. These rules are why log tables were once used to multiply large numbers by adding their logarithms, and why slide rules worked.
Suppose y = log_b x, so bʸ = x. Take the natural logarithm of both sides: y × ln b = ln x. Dividing gives y = ln x ÷ ln b. Any base can be used in place of e, as long as it is the same on top and bottom. This is how the calculator finds logarithms to any base using the single natural log function built into computers. It also shows why base 1 fails: ln 1 = 0, and division by zero is not allowed.
For any positive base other than 1, bʸ is always positive, so there is no real logarithm of zero or a negative number. For a base greater than 1, numbers above 1 have positive logarithms, numbers between 0 and 1 have negative logarithms, and log_b 1 = 0. For a base between 0 and 1, such as 0.5, these signs reverse. Keeping these facts in mind catches errors, such as a negative log for a number bigger than the base.
Nikhil, a first-year computer science student, wants to know how many times a list of 1024 sorted roll numbers can be halved, so he finds the logarithm of 1024 to base 2.
Ask: to what power must the base be raised to get the number?: 2^y = 1024
Change of base: divide two ordinary logs: y = log(1024) ÷ log(2) = 3.010299957 ÷ 0.3010299957
Answer: log_2(1024) = 10
Answer: log base 2 of 1024 10; Common log, log₁₀(x) 3.01029996; Natural log, ln(x) 6.93147181
Taking the logarithm of zero or a negative number.
Using base 1, which makes the logarithm undefined.
Writing log(x + y) = log x + log y; the rule applies to products, not sums.
Mixing up log (base 10) and ln (base e) in formulas.
Swapping number and base, which gives the reciprocal of the correct answer.
pH in chemistry, defined as −log₁₀ of the hydrogen ion concentration.
Decibel levels for sound and signal strength.
Counting bits needed to represent a number, or steps in binary search.
Solving for time in compound interest and growth problems.
The Richter scale and other logarithmic scales in geography and physics.
What does a logarithm actually tell you?
It answers the question: what power do you need to raise the base to, to get this number? log₁₀(1000) = 3, because 10³ = 1000.