Log Calculator
Ask “what power of this base gives my number?” in base 10, e, 2, or a custom base — pH, decibels-adjacent homework, and binary length, not a log of a negative.
How to use
- Pick common log (10), natural log (e), binary log (2), or a custom base.
- Enter a positive number. Zero and negatives are rejected.
- Read the exponent. log₁₀(1000) is 3; log₂(8) is 3; ln(e) is 1.
- Check with the exponent calculator: base^result should return the number.
How it works
A logarithm is an exponent. log₁₀(1000) = 3 because 10³ = 1000. ln(e) = 1 because e¹ = e. log₂(8) = 3 because 2³ = 8. Custom bases use the change-of-base formula ln(x)/ln(b).
The argument must be positive. There is no real log of 0 or of −5. Base 1 is undefined (1 to any power is 1, never 7). Bases must be positive and not 1.
Common log shows up in pH and in “orders of magnitude.” A jump from 10^2 to 10^5 is 3 common-log units. Natural log shows up in continuous growth. Binary log is “how many bits”: log₂(256) = 8.
This is not the scientific calculator’s full expression parser, and it is not a decibel tool (those mix a 10 or 20 factor with a ratio). Inverse work is exponentiation, not another log.
log₁₀(1) = 0 for any valid base: the power that returns 1 is 0. log_b(b) = 1. Those two identities are the usual sanity check after a custom-base entry. A pH of 3 is not log₁₀(3); it is −log₁₀ of the hydrogen-ion activity, which this page does not compute.
Formula
log_b(x) = ln(x) / ln(b) log₁₀(1000) = 3 ln(e) = 1 log₂(8) = 3
Worked examples
Common log
log₁₀(1000) → 3
Binary log
log₂(8) → 3
Common logs that should come out clean
| Expression | Value |
|---|---|
| log₁₀(1) | 0 |
| log₁₀(10) | 1 |
| log₁₀(1000) | 3 |
| ln(e) | 1 |
| log₂(8) | 3 |
| log₂(256) | 8 |
Useful notes
- log on the scientific calculator is also base 10; ln is natural.
- Argument > 0; base > 0 and ≠ 1.
- Undo with the exponent calculator.
FAQ
- What is the difference between log and ln?
On this page, common log is base 10 and ln is base e ≈ 2.71828. Both are logarithms; only the base changes.
- How do I change the base of a logarithm?
Divide natural logs: log_b(x) = ln(x) / ln(b). That is what the custom-base mode does.
- Why is log(0) rejected?
There is no real power of a positive base that equals 0. The real logarithm is only defined for positive numbers.
- What is log₂(256)?
8, because 2^8 = 256.
- How do I get log base 5 of 125?
Choose custom base 5 and enter 125, or compute ln(125)/ln(5). The result is 3.
Related tools
Exponent Calculator
Raise a base to a power, including negative and fractional exponents, with overflow rejected.
Root Calculator
Find the nth root of a number, including odd roots of negatives such as the cube root of −8.
Scientific Calculator
Evaluate expressions with powers, roots, logs, factorials and trigonometry in degrees or radians.
See all Math tools.