CalcDuck

Log Calculator

Log Calculator

Which logarithm?
Result
6.643856
Property check (b^(log_b x) = x)
2^6.643856 ≈ 100 (target: 100)

A logarithm answers the question, what power do I raise the base to, in order to get this number? Log base 2 of 8 equals 3, because 2 raised to the 3rd power (2^3) equals 8. The natural log uses base e, and the common log uses base 10, so log base 10 of 1,000 equals 3, because 10^3 = 1,000.

Tip: “Copy with settings” shares a link that opens this calculator with your numbers already filled in.

How this calculator works

A logarithm is the inverse of an exponent: it tells you what power a base must be raised to in order to produce a given number. This calculator supports a logarithm in any base you choose, the natural log (base e, written ln), and the common log (base 10, written log or log10).

Every logarithm can be computed from natural logs using the change-of-base formula, which is exactly how this calculator handles an arbitrary base b. The result is also checked against the defining property of logarithms, that raising the base back to the computed log returns the original number.

The formulas

Change of base: log_b(x) = ln(x) ÷ ln(b) = log10(x) ÷ log10(b)Natural log: ln(x) = log_e(x), where e ≈ 2.71828Common log: log10(x) = log_10(x)Defining property: b^(log_b x) = x

Logarithms are only defined for x > 0. The base b must also be positive and cannot equal 1, since 1 raised to any power is always 1 and could never uniquely produce a different x.

Worked example: log base 2 of 8

  1. Ask what power 2 must be raised to, to reach 8: 2^3 = 8, so log base 2 of 8 = 3.
  2. Check with the change-of-base formula: log_2(8) = ln(8) ÷ ln(2) ≈ 2.0794 ÷ 0.6931 ≈ 3.
  3. Verify the defining property: 2^3 = 8, which matches the original input exactly.

Frequently asked questions

What is the difference between log and ln?

"log" without a written base usually means the common log, base 10; "ln" always means the natural log, base e (≈ 2.71828). This calculator lets you pick either one directly, or enter any other base.

Why must x be greater than 0?

No real power of a positive base can ever produce a zero or negative result, since a positive base raised to any real exponent stays positive. Logarithms of zero or negative numbers are undefined for real numbers.

Why can't the base be 1?

1 raised to any power always equals 1, so log base 1 could never uniquely identify a different value of x. The base must also be positive for the same reason a negative base would produce inconsistent, non-monotonic results.

How does the change-of-base formula work?

Any logarithm can be rewritten as a ratio of natural logs: log_b(x) = ln(x) ÷ ln(b). This is how calculators and spreadsheets compute a logarithm in an arbitrary base, since most only have a built-in natural log or common log function.

What is log base b of 1?

Always 0, for any valid base b, since any base raised to the power 0 equals 1. This calculator returns 0 whenever x = 1, regardless of which base is selected.

Sources

Related calculators