Logarithm Calculator

Calculate a logarithm in any valid base with exact recognizable powers, clear domain checks, and step-by-step working.

Logarithm Calculator workspace

The argument must be positive. The base must be positive and cannot equal 1.

Try:
Logarithm result

Your result will appear here.

Logarithmic curvey = log base 2 of x
(1, 0)
Core concept

Understanding logarithm

A logarithm answers an exponent question. The statement log base b of x equals y means that raising b to y produces x. The base must be positive and different from 1, and the real-number argument must be positive.

Argument
The positive value inside the logarithm.
Base
The positive value, not equal to 1, raised to a power.
Exponent
The logarithm result that makes bʸ = x.
Change of base
A way to evaluate any valid base using a quotient of natural logs.

When it is useful

  • Find an unknown exponent.
  • Compare multiplicative scales.
  • Rewrite a logarithm in natural-log form.
  • Check exponential equations.
Formula

Formula and domain

log⁡b(x)=y  ⟺  by=x,log⁡b(x)=ln⁡(x)ln⁡(b)\log_b(x)=y\iff b^y=x,\qquad \log_b(x)=\frac{\ln(x)}{\ln(b)}
x
positive argument
b
positive base, b ≠ 1
y
the exponent and logarithm result

The change-of-base quotient converts a general logarithm into natural logarithms while preserving its value.

Domain note: Real inputs require x > 0, b > 0, and b ≠ 1. Decimal outputs are rounded to 24 significant digits unless an exact small rational exponent is recognized.

Calculation steps

  1. 1

    Enter the positive argument and a valid base.

  2. 2

    Check x > 0, b > 0, and b ≠ 1.

  3. 3

    Apply ln(x) ÷ ln(b).

  4. 4

    Read the exact exponent when recognized or the labelled decimal approximation.

  5. 5

    Verify by raising the base to the displayed exponent.

Quick reference

Logarithm table

Exact landmarks and useful comparisons
ExpressionResultReason
log₂(8)32³ = 8
log₄(2)1/24¹ᐟ² = 2
log₁₀(0.01)−210⁻² = 0.01
log₀.₅(4)−20.5⁻² = 4
Worked examples

Examples with interpretation

Find log₂(64).

ln(64) ÷ ln(2)

6

The result is exact because 2⁶ = 64.

Find log₄(2).

ln(2) ÷ ln(4)

1/2

The exponent is one half because √4 = 2.

Find log₃(20).

ln(20) ÷ ln(3)

≈ 2.7268330278608417

The argument is not a simple rational power of 3, so the result is approximate.

Read the result

Rules and edge cases

A positive result means the required power lies above zero; a negative result means a reciprocal power is needed. A zero result occurs only when the argument is 1.

Inverse relationship

Logarithms undo exponentiation: log_b(bʸ) = y.

Base direction

Bases above 1 produce increasing log curves; bases between 0 and 1 produce decreasing curves.

Edge cases

  • log_b(1) is always 0 for every valid base.
  • Arguments at or below 0 have no real logarithm.
  • Base 1 is invalid because it cannot produce different positive values.
  • A base between 0 and 1 is valid and reverses the curve direction.

Common mistakes

  • Swapping the base and argument.
  • Entering base 1.
  • Treating a rounded decimal as an exact value.
  • Forgetting that a negative logarithm can still have a positive argument.

Frequently asked questions

What does a logarithm calculate?

It calculates the exponent needed to raise the chosen base to the argument.

Can the base be a decimal?

Yes. Any positive decimal except 1 is valid.

Why must the argument be positive?

No positive real base raised to a real exponent produces zero or a negative number.

Can a logarithm be negative?

Yes. For a base above 1, arguments between 0 and 1 have negative logarithms.

How is the answer checked?

The calculator raises the base to the calculated exponent and compares that inverse statement with the argument.

References & technical sources

Keep calculating

Related calculators