Skip to content
UnitFormula

A logarithm answers "what power must the base be raised to, to get this number?" Written log_base(x), it is the inverse of exponentiation: if base^y = x then log_base(x) = y. For example, log base 10 of 1000 is 3, because 10³ = 1000. Any base can be used, and it's computed as ln(x) ÷ ln(base).

Logarithm Calculator — log of a number to any base

Log base 10 of 1,000.

Logarithm3

Quick examples

How it's calculated

  1. log_base(x) = ln(x) ÷ ln(base)logbx=lnxlnb\log_{b} x = \frac{\ln x}{\ln b}
    x
    = 1,000
    b
    = 10
    3
Logarithm3

How it works

A logarithm is the inverse of raising to a power. Where an exponent asks "what is base^y?", a logarithm asks the reverse — "what exponent y turns the base into x?":

log_base(x) = y means base^y = x

So log₁₀(1000) = 3 because 10³ = 1000. You can compute a logarithm to any base from the natural log: log_base(x) = ln(x) ÷ ln(base). Three bases are especially common: base 10 (the common log), base 2 (used in computing), and base e ≈ 2.718 (the natural log, ln).

Worked example

Find log base 10 of 1000. Ask what power of 10 gives 1000 — since 10³ = 1000, the answer is 3. In base 2, log₂(8) = 3 because 2³ = 8. And log₁₀(100) = 2, since 10² = 100. A logarithm of 1 is always 0 (any base to the power 0 is 1), and the log of the base itself is 1.

Frequently asked questions

How do I calculate a logarithm?

Ask what exponent turns the base into the number. For log₂(16), what power of 2 is 16? That's 4, since 2⁴ = 16. For numbers that aren't exact powers, use log_base(x) = ln(x) ÷ ln(base) — the calculator does this to give a decimal.

What are common, natural, and binary logs?

They're logarithms to particular bases. The **common log** (log or log₁₀) uses base 10; the **natural log** (ln) uses base e ≈ 2.718; and the **binary log** (log₂) uses base 2. Set the base here to 10, e's value, or 2 to get each. They differ only by a constant scaling factor.

Why must the number be positive?

Because a positive base raised to any real power is always positive — it can never produce zero or a negative. So there's no exponent that gives log of 0 or a negative number, and the logarithm is undefined there. The calculator leaves those inputs blank.

Why can't the base be 1 (or negative)?

Because 1 to any power is always 1, so log base 1 could never reach any other number — it's undefined. A base of 0 or a negative number doesn't give a well-behaved logarithm either. Bases must be positive and not equal to 1.

How are logarithms and exponents related?

They're exact inverses: log_base(base^y) = y and base^(log_base(x)) = x. This is why they undo each other — a logarithm "unwinds" a power. Whenever you know a power and want the exponent, you take a log.

Why are logarithms useful?

They turn multiplication into addition and compress huge ranges into manageable numbers, which is why scales like decibels (sound), pH (acidity) and the Richter scale (earthquakes) are logarithmic. They also describe anything where each step multiplies rather than adds — like compound growth or halving times.

How we know this is right

Last reviewed
Aug 5, 2026
Precision
Rounded to 6 decimal places.
Read our methodology

Sources