What a logarithm is
A logarithm is the inverse of raising to a power. It asks: what exponent turns the base into x?
If logₐ(x) = y, then aʸ = x
So log₁₀(1000) = 3 because 10³ = 1000, and log₂(8) = 3 because 2³ = 8. The log of 1 is always 0, and the log of the base itself is always 1.
Change of base
To find a log in any base, divide natural logs (or common logs) of the number and the base:
logₐ(x) = ln(x) ÷ ln(a)
For log base 2 of 8: ln(8) ÷ ln(2) = 2.0794 ÷ 0.6931 = 3. This is exactly how the calculator computes a log in any base you enter.
log, ln, and log₂
- log — common logarithm, base 10, used in science and engineering.
- ln — natural logarithm, base e ≈ 2.71828, central to calculus and growth.
- log₂ — binary logarithm, base 2, common in computing and information theory.
Frequently asked questions
What is a logarithm?
A logarithm answers the question "what exponent turns the base into this number?" If logₐ(x) = y, then aʸ = x. For example, log₁₀(1000) = 3 because 10³ = 1000. Logarithms are the inverse of exponentiation.
What is the difference between log, ln, and log₂?
"log" usually means the common logarithm in base 10, "ln" is the natural logarithm in base e (≈ 2.71828), and log₂ is the binary logarithm in base 2 used in computing. They differ only in their base; this calculator shows all of them at once.
How do you calculate a logarithm in any base?
Use the change-of-base formula: logₐ(x) = ln(x) ÷ ln(a), or equally log(x) ÷ log(a) with any consistent base. To find log base 2 of 8, compute ln(8) ÷ ln(2) = 2.079 ÷ 0.693 = 3.
Why can't you take the log of zero or a negative number?
Because no exponent of a positive base produces zero or a negative result — the base raised to any power is always positive. So the logarithm is only defined for numbers greater than zero. log(0) tends toward negative infinity but is undefined.
What is log of 1?
The logarithm of 1 is 0 in every base, because any base raised to the power 0 equals 1. Likewise, the log of the base itself is always 1, since a¹ = a.
Disclaimer: The logarithm is defined only for numbers greater than zero, and the base must be positive and not equal to 1. Results are rounded for display and provided for educational purposes.