How to use the logarithm calculator
- Type a positive number in Number x.
- Choose the Base: 10 (common log), e (natural log, ln), 2 (binary log) or Custom base.
- If you chose a custom base, type it in the Custom base box that appears.
- Read the Result. The lines below give ln x, log₁₀ x and log₂ x at the same time.
- Use the Check and change of base box to see the power check and the ln division the tool used.
What it does and when to use it
A logarithm is the inverse of a power. log_b(x) = y means b^y = x. For example, log₁₀(1000) = 3 because 10³ = 1000.
Logs appear in algebra when you solve equations like 2^x = 100, in science for pH, decibels and earthquake scales, and in computing, where log₂ tells you how many bits or halving steps are needed. If you want to write very large or small numbers as powers of ten, the scientific notation converter is a good partner tool.
How it works
For bases 10, e and 2 the tool calls the built-in functions log10, log and log2. For a custom base it uses the change of base formula:
log_b(x) = ln(x) ÷ ln(b)
The result is then checked: if it is extremely close to a whole number r and b^r gives x back, r is shown exactly.
Step by step for log₂(100):
- Take natural logs: ln(100) = 4.60517018599 and ln(2) = 0.69314718056.
- Divide: 4.60517018599 ÷ 0.69314718056 = 6.64385618977.
- Check: 2^6.64385618977 = 100.
So 2 must be raised to about 6.64 to give 100. This fits, because 2⁶ = 64 and 2⁷ = 128.
Worked examples
Common log. x = 1000, base 10: log₁₀(1,000) = 3.
Numbers below 1. x = 0.01, base 10: log₁₀(0.01) = -2, because 10⁻² = 0.01. Any number between 0 and 1 has a negative log when the base is above 1.
Custom base. x = 81 with base 3: log_3(81) = 4, since 3⁴ = 81.
A non-whole answer. x = 100, base 2: log₂(100) = 6.64385618977.
Useful log rules
| Rule | Example |
|---|---|
| log(a × b) = log a + log b | log₁₀(20) = log₁₀ 2 + log₁₀ 10 |
| log(a ÷ b) = log a − log b | log₁₀(0.5) = log₁₀ 1 − log₁₀ 2 |
| log(aⁿ) = n × log a | log₂(8²) = 2 × 3 = 6 |
| log_b(b) = 1, log_b(1) = 0 | ln(e) = 1 |
Limits and tips
- The result is a decimal approximation unless it is a whole number. For exact forms such as ½ log 3, work by hand with the rules above.
- To check an answer with a power, the scientific notation and rounding tools help you tidy long decimals.
- For growth problems such as “how many doublings?”, combine log₂ with the sequence calculator to see the terms.
- Calculations run in your browser.
Frequently asked questions
Why can't I take the log of 0 or a negative number?
What is the difference between log and ln?
Which bases are allowed?
Why do I see 3 and not 2.9999999999?
How accurate are the other answers?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.