MathMarch 28, 2026

Logarithms Explained: log, ln, and log₂ with Examples (2026)

By The hakaru Team·Last updated March 2026

Quick Answer

  • *A logarithm is the inverse of exponentiation: log₁₀(1000) = 3 because 10³ = 1000.
  • *log = log base 10 (common log). ln = natural log (base e ≈ 2.718). log₂ = log base 2 (used in computing).
  • *The Richter scale, decibel scale, and pH scale are all logarithmic — each unit represents a 10× change.
  • *Four key rules: product, quotient, power, and change of base — all reduce complex calculations to simpler addition and subtraction.

What Is a Logarithm?

A logarithm answers a simple question: to what power must you raise a base to get a specific number?Formally, if bˣ = x, then logᵇ(x) = y.

Think of it as the inverse of exponentiation. Exponentiation asks “what do I get when I raise this base to that power?” A logarithm asks the reverse — “what power produces this result?”

Logarithms were invented by John Napier in 1614. Before calculators, they reduced multiplication to addition, enabling navigational and astronomical calculations that were simply not feasible otherwise — a transformation the Mathematical Association of America describes as one of the most important computational advances in history.

A Simple Example

We know that 10 × 10 × 10 = 1000, or equivalently 10³ = 1000. The logarithm restates this fact from the other direction:

log₁₀(1000) = 3

Read aloud: “the log base 10 of 1000 is 3.” You raised 10 to the power 3 to get 1000.

The Three Types of Logarithms You Need to Know

log₁₀ — The Common Logarithm

When you see “log” without any base specified, it almost always means log base 10. This is the common logarithm, used across science, engineering, acoustics, and chemistry.

Its defining property: every time you multiply a number by 10, the log increases by exactly 1. log₁₀(10) = 1. log₁₀(100) = 2. log₁₀(1,000,000) = 6. This makes it perfect for representing quantities that span many orders of magnitude — like earthquake energy or sound intensity.

xlog₁₀(x)
0.001−3
0.01−2
0.1−1
10
101
1002
1,0003
10,0004
1,000,0006
1,000,000,0009

ln — The Natural Logarithm

The natural logarithm uses the base e, where e ≈ 2.71828. The constant ewas discovered by Jacob Bernoulli in 1683 while studying continuous compounding. It appears throughout calculus, physics, biology, and finance — anywhere growth or decay happens continuously rather than in discrete steps.

Worked examples:

  • ln(1) = 0 — because e⁰ = 1
  • ln(e) = 1 — because e¹ = e
  • ln(e²) = 2
  • ln(7.389) ≈ 2 — because e² ≈ 7.389

In finance, the continuous compounding formula is A = Peʳᵗ. The “rt” exponent comes directly from the natural log relationship. If you want to know how long money takes to double at a continuous rate r, the answer is ln(2) / r ≈ 0.693 / r.

log₂ — The Binary Logarithm

Log base 2 is the foundation of computer science. Computers operate in binary — every bit doubles the number of states. So log₂ tells you how many bits you need to represent a number.

Worked examples:

  • log₂(2) = 1 — 1 bit holds 2 states
  • log₂(8) = 3 — 3 bits hold 8 states (2³)
  • log₂(1024) = 10 — 10 bits hold 1,024 states
  • log₂(1,048,576) = 20 — 20 bits hold about 1 million states

In algorithm analysis, log₂ measures how many times you can halve a dataset before reducing it to a single element — which is why binary search on a sorted list of one million items takes at most 20 steps.

The Four Logarithm Rules

These four rules hold for any valid base b. They are what made logarithms so powerful before calculators existed — multiplication becomes addition, division becomes subtraction, and exponentiation becomes multiplication.

1. Product Rule

log(a × b) = log(a) + log(b)

Example: log₁₀(100 × 1000) = log₁₀(100) + log₁₀(1000) = 2 + 3 = 5. Check: 10⁵ = 100,000 = 100 × 1000. ✓

2. Quotient Rule

log(a / b) = log(a) − log(b)

Example: log₁₀(10000 / 100) = log₁₀(10000) − log₁₀(100) = 4 − 2 = 2. Check: 10² = 100 = 10000 / 100. ✓

3. Power Rule

log(aⁿ) = n × log(a)

Example: log₁₀(1000²) = 2 × log₁₀(1000) = 2 × 3 = 6. Check: 1000² = 1,000,000 = 10⁶. ✓

4. Change of Base

logᵇ(x) = log(x) / log(b)

This is how you compute any logarithm using a calculator that only has log₁₀ or ln. To find log₂(32):

log₂(32) = log₁₀(32) / log₁₀(2) = 1.505 / 0.301 = 5. Check: 2⁵ = 32. ✓

You can use ln in the numerator and denominator instead — the base cancels. log₂(32) = ln(32) / ln(2) = 3.466 / 0.693 = 5. Same answer.

Real-World Applications

The Richter Scale

The Richter scale measures earthquake magnitude logarithmically. Each whole-number step represents a 10× increase in wave amplitude and roughly 32× more energy released. A magnitude 7.0 earthquake releases about 32 times more energy than a 6.0 earthquake, and about 1,000 times more than a 5.0 earthquake — according to the USGS.

This is why a 9.0 earthquake (like the 2011 Tōhoku earthquake) is not just “twice as bad” as a 4.5 — it releases roughly 32⁴·⁵ ≈ 1,000,000 times more energy.

Decibels and Sound

The decibel scale for sound intensity is defined as: dB = 10 × log₁₀(I / I₀), where I₀ is the threshold of human hearing. Each 10 dB increase represents a 10× increase in intensity, per the CDC and NIOSH.

  • Normal conversation: ~60 dB (10⁶ times the threshold)
  • Rock concert: ~110 dB (10₁¹ times the threshold)

The difference between 60 dB and 110 dB is 50 dB — meaning a rock concert is 10⁵ = 100,000 times more intense than a quiet conversation. Your ears would never guess that from the numbers alone. That is precisely why logarithmic scales exist: to compress enormous ranges into human-readable numbers.

pH and Acidity

pH is defined as −log₁₀[H⁺], the negative base-10 logarithm of hydrogen ion concentration, per NIST. The negative sign flips the scale so that more acidic solutions (higher H⁺ concentration) have lower pH values.

Because pH is a base-10 log scale, each unit represents a 10× change in acidity. pH 4 is 10 times more acidic than pH 5, and 100 times more acidic than pH 6. Black coffee (pH ≈ 5) is about 10× more acidic than pure water (pH = 7).

Compound Growth and Finance

Continuous compound growth uses the natural log. The time to double at a continuous interest rate r is exactly ln(2) / r ≈ 0.693 / r. At 7% continuous growth, money doubles in roughly 0.693 / 0.07 ≈ 9.9 years.

The more familiar Rule of 72 (divide 72 by the annual rate) is an approximation of this exact logarithmic relationship. The precision version is: doubling time = ln(2) / ln(1 + r).

Information Theory

Claude Shannon’s definition of information uses log₂: the number of bits needed to represent one outcome from n equally likely possibilities is log₂(n). A fair coin flip carries log₂(2) = 1 bit of information. A fair die roll carries log₂(6) ≈ 2.58 bits.

Worked Examples

Example 1: Solving for an Exponent

Problem: 2ˣ = 64. What is x?

Take log₂ of both sides: x = log₂(64) = log(64) / log(2) = 1.806 / 0.301 = 6. Check: 2⁶ = 64. ✓

Example 2: Decibel Comparison

A lawnmower produces 90 dB. A whisper produces 30 dB. How many times more intense is the lawnmower?

Difference = 90 − 30 = 60 dB. Intensity ratio = 10⁶ = 1,000,000 times. The lawnmower is one million times more intense than a whisper.

Example 3: Continuous Compounding

You invest $5,000 at 5% continuous interest. How long until it reaches $10,000?

10000 = 5000 × e⁰·⁰⁵ᵗ. Divide both sides by 5000: 2 = e⁰·⁰⁵ᵗ. Take ln: ln(2) = 0.05t. t = ln(2) / 0.05 = 0.6931 / 0.05 ≈ 13.86 years.

Example 4: Using the Product Rule

Simplify log₁₀(4) + log₁₀(25).

= log₁₀(4 × 25) = log₁₀(100) = 2.

Calculate any logarithm instantly

Use our free Logarithm Calculator →

Need related math tools? Try our Scientific Calculator or Significant Figures Calculator

Frequently Asked Questions

What is a logarithm?

A logarithm answers the question: to what power must you raise a base to get a given number? For example, log base 10 of 1000 = 3, because 10³ = 1000. Logarithms are the inverse operation of exponentiation, turning multiplication problems into addition problems.

What is the difference between log and ln?

“log” without a base almost always means log base 10 — the common logarithm. “ln” means the natural logarithm, using base e ≈ 2.71828. Both are valid logarithms with the same rules; they just use different bases. Log base 10 is convenient for decimal arithmetic and practical science. The natural log appears in calculus and anywhere continuous growth is modeled.

What is log₁₀(100)?

log₁₀(100) = 2, because 10² = 100. You need to raise 10 to the power of 2 to reach 100. Similarly, log₁₀(1000) = 3, log₁₀(10) = 1, and log₁₀(1) = 0.

How do logarithms apply to the Richter scale?

The Richter scale is logarithmic. Each whole-number step up the scale represents a 10× increase in seismic wave amplitude and roughly 32× more energy released. So a magnitude 8 earthquake isn’t just twice as powerful as a magnitude 4 — it releases about 32⁴ ≈ 1,000,000 times more energy, according to the USGS. The logarithmic scale makes it possible to represent both tiny tremors and catastrophic quakes on the same compact scale.

What are the logarithm rules?

There are four rules you need:

  • Product rule: log(a × b) = log(a) + log(b)
  • Quotient rule: log(a / b) = log(a) − log(b)
  • Power rule: log(aⁿ) = n × log(a)
  • Change of base: logᵇ(x) = log(x) / log(b)

These rules hold for any valid base. They were the primary tool for complex arithmetic before electronic calculators existed.

What does log base 2 mean?

Log base 2 (log₂) asks: to what power must you raise 2 to get a given number? log₂(8) = 3 because 2³ = 8. It’s fundamental to computer science because computers operate in binary. The number of bits needed to represent n distinct states is log₂(n). That is why a 32-bit system can address 2³² = 4,294,967,296 memory locations, and why binary search through 1 million sorted records takes at most log₂(1,000,000) ≈ 20 comparisons.