What a logarithm is
The logarithm is the inverse of raising to a power. For a base b that is positive and not 1, and a positive number x, y = log_b(x) means exactly the same as b^y = x. The first form is the logarithm form, the second the exponential form. So log₂(32) = 5 because 2⁵ = 32, and log₁₀(0.001) = −3 because 10⁻³ = 0.001.
Two bases have their own names. The common logarithm log(x) uses base 10, and the natural logarithm ln(x) uses base e ≈ 2.718281828. Any other positive number except 1 can be a base too, like 2, 5 or 1/2.
The change of base formula
Most calculators only have keys for ln and log. Any other base follows from either one:
Worked example: log₅(7) = ln 7 ÷ ln 5 ≈ 1.945910149 ÷ 1.609437912 ≈ 1.20906195512. With common logs the numbers change but the answer does not: 0.84509804 ÷ 0.6989700043 ≈ 1.20906195512. Check it: 5 to the power 1.20906195512 is 7. The scientific calculator gives the same values from its ln and log keys; this page adds the steps and exact answers.
Exact logarithms
When x is a power of the base, the answer is a whole number or a fraction, and the calculator finds it exactly instead of rounding. The trick is to write both numbers as powers of one common base. For log₄(8): 4 = 2² and 8 = 2³, so 4^y = 8 becomes 2^(2y) = 2³. Then 2y = 3 and y = 3/2. The same way, log₈(1/4) = −2/3, because 8 = 2³ and 1/4 = 2⁻². Fractional bases work too: log_0.5(8) = −3.
Logarithm rules
These rules hold for every allowed base b and positive x and y:
| Rule | Formula | Example |
|---|---|---|
| Product | log_b(xy) = log_b(x) + log_b(y) | log₂(32) = log₂(4) + log₂(8) = 2 + 3 |
| Quotient | log_b(x/y) = log_b(x) − log_b(y) | log₁₀(1000/10) = 3 − 1 = 2 |
| Power | log_b(xʳ) = r × log_b(x) | log₃(9⁴) = 4 × 2 = 8 |
| Log of 1 | log_b(1) = 0 | ln(1) = 0 |
| Log of the base | log_b(b) = 1 | log₇(7) = 1 |
| Inverse | log_b(bˣ) = x and b^(log_b x) = x | ln(e⁵) = 5 |
| Change of base | log_b(x) = log_a(x) ÷ log_a(b) | log₄(8) = log₂ 8 ÷ log₂ 4 = 3/2 |
There is no rule that splits the logarithm of a sum or a difference: log(x + y) is not log(x) + log(y).
Common values
The same numbers in the three common bases, from the calculator itself:
| x | ln(x) | log₁₀(x) | log₂(x) |
|---|---|---|---|
| 2 | 0.693147 | 0.30103 | 1 |
| 10 | 2.30259 | 1 | 3.32193 |
| 100 | 4.60517 | 2 | 6.64386 |
| 1000 | 6.90776 | 3 | 9.96578 |
| 0.5 | −0.693147 | −0.30103 | −1 |
Antilog and finding the base
The equation b^y = x has three numbers, and you can solve for any of them. The logarithm finds y. The antilog finds x = b^y, for example 10^2.5 ≈ 316.227766. Finding the base means taking a root: b^4 = 81 gives b = 81^(1/4) = 3. Very large results, like 2^2000, are shown in scientific notation instead of overflowing; use the scientific notation converter to rewrite them.
How to use the logarithm calculator
- 1Choose Logarithm to find log_b(x), Antilog to find b^y, or Base to find b from x and y.
- 2Type the base, or tap e, 10 or 2. Numbers can be decimals, fractions like 1/4, powers like 2^20 or E notation like 1e-9.
- 3Read the result: exact when x is a power of the base, otherwise to 12 significant digits. Below it you get ln, log₁₀ and log₂ of x and the change of base in steps.
- 4Press Copy result to copy the answer with the steps, or Copy link to share it.
Sources
- Logarithm functions, Paul’s Online Notes, Lamar University: definition, common and natural logarithm, properties, change of base
- §4.2 Logarithms, NIST Digital Library of Mathematical Functions: log_a z = ln z ÷ ln a (4.2.8) and log_a z = log_b z ÷ log_b a (4.2.9)
Frequently asked questions
What is a logarithm?
The logarithm answers the question “to what power must I raise the base to get this number?” log₂(8) = 3 because 2³ = 8, and log₁₀(0.01) = −2 because 10⁻² = 0.01. In general y = log_b(x) means exactly the same as b^y = x.
What is the difference between log and ln?
ln is the natural logarithm, with base e ≈ 2.718281828. log without a base usually means the common logarithm, base 10. They differ only by a constant factor: ln(x) = log₁₀(x) × ln(10) ≈ 2.302585 × log₁₀(x).
How do I find a log with any base on a regular calculator?
Use the change of base formula: log_b(x) = ln(x) ÷ ln(b), or the same with log₁₀. For log₅(7), divide ln 7 ≈ 1.945910 by ln 5 ≈ 1.609438 to get about 1.209062. The calculator shows this division in its steps for every base.
Why is the log of 0 or a negative number undefined?
A positive base raised to any real power is always positive, so no power can give 0 or a negative number. That is why the logarithm is only defined for x > 0. As x gets closer to 0, the logarithm (for a base above 1) heads toward minus infinity without reaching a value.
What is an antilog?
The antilog undoes the logarithm: the antilog of y in base b is b^y. The antilog of 2.5 in base 10 is 10^2.5 ≈ 316.227766. In base e it is the exponential function, e^y.
Why can the base not be 1?
Every power of 1 is 1, so 1^y = 5 has no solution and 1^y = 1 has every number as a solution. Neither gives a single answer, so 1 is not allowed as a base. The base must also be positive.
Why do some answers come out as fractions?
When x is a power of the base, the logarithm is a rational number and the calculator gives it exactly. log₄(8) is 3/2 because both are powers of 2: 4 = 2² and 8 = 2³. Other results, like log₂(10), are irrational, and the calculator shows 12 significant digits.