Logarithm Calculator

log_b(x) for any base — exact when the argument is a power of the base, otherwise a decimal approximation, with every step shown.
Computed
The result and the full working are shown below.
Resultexact

3

numeric ≈ 3

The argument is a rational power of the base, so the result is exact.

Same argument, other bases

ln(8)

≈ 2.079441542

log₁₀(8)

≈ 0.903089987

log₂(8)

≈ 3

Graph
(8, 3)2468123 0
y=log⁡2(x)y = \log_{2}(x) The answer point Guide lines to the axes

Step-by-step solution

  1. 1

    The question

    Find y = log_2(8): the exponent y such that 2 raised to y gives 8.

    log⁡2(8)=y  ⟺  2 y=8\log_{2}\left(8\right) = y \iff 2^{\,y} = 8
  2. 2

    Write both numbers as products of prime powers

    Prime factorizations: 2 = 2 and 8 = 2^3. The exponent vectors are proportional, so the argument is a rational power of the base and the logarithm is exact.

    2=2,8=232 = 2, \qquad 8 = 2^{3}
  3. 3

    Match the exponents

    Both sides are powers of the same prime, so the exponents must be equal.

    y=3y = 3
  4. 4

    Solve for y

    Dividing both sides by the exponent of the base gives y = 3.

    y=3y = 3
  5. 5

    Check

    Raising the base to this power returns the argument: 2^3 = 8.

    23=82^{3} = 8
  6. 6

    Decimal form

    As a decimal, 3 ≈ 3.

    3≈33 \approx 3
  7. 7

    Result

    log_2(8) = 3 — exact, because 8 is a rational power of 2.

    log⁡2(8)=3\log_{2}\left(8\right) = 3

About logarithms

log_b(x) is the exponent you raise b to in order to get x — the inverse of exponentiation. log_2(8) = 3 because 2³ = 8.

The logarithm laws turn products into sums, quotients into differences and powers into multiples, which is why they simplify calculations and appear in exponential growth, decibels and the Richter scale.

When base and argument are powers of the same number the answer is an exact rational — log_8(32) = 5/3 — and this calculator returns it as a fraction instead of the decimal 1.666666…