Logarithm Calculator
Calculate the logarithm of a number in any base, along with the natural log (ln), common log (log10) and binary log (log2).
Was this tool helpful?
Thanks for the feedback!
This calculator finds the logarithm of a positive number in any base you choose. It also shows the natural log (ln), the common log (log base 10) and the binary log (log base 2) of the same number, and checks the answer by raising the base to it. It is handy for school and college maths, chemistry pH problems, computer science and finance questions about growth.
What a logarithm means
A logarithm answers the question "what power do I raise the base to, to get this number?". Since 10³ = 1000, log base 10 of 1000 is 3. Since 2³ = 8, log base 2 of 8 is also 3. In general, if b raised to the power y equals x, then log base b of x equals y.
The fields
- Number: the value you want the logarithm of. It must be greater than zero.
- Base (blank = 10, or type e): leave it empty for the common log, type
efor the natural log, or enter any positive number other than 1, including decimals such as 1.08.
How the result is worked out
Computers calculate natural logs directly, so the tool uses the change of base rule:
log_b(x) = ln(x) ÷ ln(b)
The headline is shown to up to 8 decimal places. The ln, log₁₀ and log₂ rows are listed every time, whatever base you entered. The last row, labelled Check, raises your base to the result and should give back your original number, a quick way to confirm you typed what you meant.
Worked examples
| Number | Base | Result | Notes |
|---|---|---|---|
| 1000 | blank (10) | 3 | ln(1,000) is 6.90775528, log₂ is 9.96578428 |
| 1024 | 2 | 10 | 1024 bytes make one kibibyte, 2 to the power 10 |
| 50 | blank (10) | 1.69897 | between 1 and 2, since 50 is between 10 and 100 |
| 0.001 | blank (10) | -3 | numbers between 0 and 1 have negative logs |
| 100 | e | 4.60517019 | the natural log, same as the ln row |
| 1 | 7 | 0 | the log of 1 is 0 in every base |
A money example: how long to double an investment
If a deposit grows at 8% a year, compounded yearly, the number of years it takes to double is log base 1.08 of 2. Enter 2 as the number and 1.08 as the base. The tool gives 9.00646834, so about 9 years. The well-known "rule of 72" (72 ÷ 8 = 9) is a shortcut for this same calculation. Turning ₹1,00,000 into ₹2,00,000 at 8% a year therefore takes a little over 9 years. For full growth projections, the compound interest calculator shows the year-by-year balance.
Two rules worth remembering
The log of a product is the sum of the logs, and the log of a power is the power times the log: log(a × b) = log a + log b, and log(aⁿ) = n × log a. These rules are why logarithms were once used to turn long multiplication into addition. A handy side effect: the number of digits in a whole number is the whole part of its common log plus one. The tool gives log₁₀(50) as 1.69897, so 50 has 1 + 1 = 2 digits.
Where each base is used
- Base 10 (common log): the pH scale in chemistry (pH is minus the log of the hydrogen ion concentration), decibels in sound and counting the digits in a number in a number.
- Base e (natural log, e ≈ 2.71828): continuous growth and decay, calculus and most science formulas.
- Base 2 (binary log): computing, such as how many bits are needed to store a number of values, or how many steps a binary search takes.
Errors the tool reports
- Zero or a negative number gives "Logarithms are only defined for numbers above zero." No real power of a positive base can produce zero or a negative value.
- A base of 1, zero or a negative base gives "The base must be a positive number other than 1 (or "e")." Every power of 1 is 1, so it cannot reach any other number.
- Results are floating point, so a value like 3 may appear as 2.99999999 in rare cases. The check row helps you see that the answer is right.
For writing very large or tiny answers in powers of ten, try the scientific notation converter.
Frequently asked questions
What is the log of 1000 to base 10?
How do I calculate ln on this tool?
Why can I not take the log of zero or a negative number?
What is the change of base formula?
How many years does it take to double money at 8% interest?
Why is the log of a number between 0 and 1 negative?
Related guides
- Exponents and Logarithms: Rules Cheat Sheet with Worked Examples The laws of exponents and log rules on one page: product, quotient and power rules, negative and fractional powers, change of base and logs without a...
- Best Free Online Tools for Students in India (No Signup, 2026) Free browser tools for Indian students, sorted by task: essays, marks and CGPA, exam-form photos and PDFs, and study timers, with what each one can't...
- Age Limit for Exams: How to Calculate Your Age on the Cut-off Date Your age is checked on the cut-off date in the notice, not the day you apply. UPSC CSE 2026: 21–32 on 1 August 2026. How to check, relaxations, mistak...