How to use the Log Calculator (Logarithm)
- Enter the number (x) you want the logarithm of.
- Enter the base (b), such as 10, 2 or 2.71828 for natural logs.
- Read log base b of x, plus ln, log10 and log2.
- To check an answer, raise the base to the result and see that you get x back.
Formula used
log_b(x) = ln(x) ÷ ln(b). If log_b(x) = y then bʸ = x. The number must be above zero and the base above zero and not equal to 1.
Worked example
Here is the Log Calculator (Logarithm) worked through with the example values shown above, so you can check each step by hand.
| Inputs | |
|---|---|
| Number (x) | 1,000 |
| Base (b) | 10 |
| Result | |
| log base b of x | 3 |
| log₁₀(x) | 3 |
| ln(x), natural log | 6.9077553 |
| log₂(x) | 9.9657843 |
What a logarithm means
log_b(x) = y means b^y = x. For x = 1000 and base 10 the answer is 3 because 10^3 = 1000. For x = 8 and base 2 the answer is 3, because 2^3 = 8. For x = 1 the answer is always 0, whatever the base, because any base to the power 0 is 1.
Logarithms of numbers between 0 and 1 are negative: log10(0.01) = -2. Logarithms of zero and of negative numbers do not exist in the real numbers, so the calculator asks for a positive number.
Common, natural and binary logs
Log base 10 is the common logarithm: log10(1000) = 3. The natural logarithm uses base e (about 2.71828) and is written ln: ln(1000) = 6.9078. The binary logarithm uses base 2: log2(1000) = 9.9658, which tells you roughly how many bits are needed to count to 1000.
Calculators often label log as base 10 and ln as base e, while many programming languages use log for the natural logarithm. If a result looks wrong, check which one your tool means.
Change of base and the main rules
Any logarithm can be written with another base using log_b(x) = ln(x) ÷ ln(b). That is how this calculator works for bases other than 10, 2 and e. For example log base 5 of 125 is 3.
The key rules are: log(xy) = log x + log y, log(x ÷ y) = log x − log y and log(x^k) = k × log x. They turn multiplication into addition, which is why logarithms were once used for hand calculation and slide rules.
Where logarithms are used
Many scales are logarithmic. The pH of a solution is −log10 of its hydrogen ion concentration, so each pH step is a factor of 10. Sound level in decibels is 10 × log10 of a power ratio. On the Richter-type earthquake scales, each whole number step is a tenfold increase in measured amplitude.
In finance and growth, logarithms answer "how long?" questions: the years for money to double at rate r is ln 2 ÷ ln(1 + r), which is the idea behind the rule of 72. Information theory and computing use log base 2 for bits.
Frequently asked questions
What is the log of 1000?
With base 10 it is 3, because 10 × 10 × 10 = 1000. With the natural base e it is about 6.9078.
What is the difference between log and ln?
log usually means base 10 and ln means base e, the natural logarithm. Some programming languages use log for base e.
Why is the log of a negative number undefined?
A positive base raised to any real power is always positive, so no power gives a negative number or zero.
How do I find a logarithm with a different base?
Divide the natural log of the number by the natural log of the base. The calculator does this when you enter a base.
What is the log of 1?
Zero, for every valid base.
Why can’t the base be 1?
1 raised to any power is still 1, so it can never reach other numbers and the logarithm is undefined.
This calculator gives estimates for information only. Actual figures from a bank, employer, tax authority or doctor may differ. It is not financial, tax, legal or medical advice.