Logarithm Explorer

Watch how changing the base reshapes the curve, compare it live against ln(x) and log₁₀(x), and see why logarithms turn multiplication into addition.

Loading interactive simulation...

Lesson

The theory — Logarithm Explorer

A logarithm is an exponent. log_b(x) is the power you have to raise b to in order to get x — so log_b(x) = y and by = x are one statement read in two directions.

What each symbol means

b
the base — the number being raised to a power. Any positive value except 1: raising 1 to a power only ever gives 1, so it could never reach a different x.
x
the argument — the value you are trying to reach. It has to be positive, because no real power of a positive base ever lands on zero or below it.
y
the answer, which is the exponent itself. This one is unrestricted. It is exactly 0 when x is 1 whatever the base, and for a base above 1 it is negative below x = 1 and any size above it. Below base 1 the two halves swap, which is the halfBase case.

Where the formula comes from

  1. Start from the definition. If log_b(x) = y, then by = x.
  2. Take the natural logarithm of both sides — whatever you do to one side you do to the other: ln(by) = ln(x).
  3. The power rule pulls the exponent out in front, ln(by) = y·ln(b), which leaves y·ln(b) = ln(x).
  4. Divide by ln(b): y = ln(x) / ln(b). That is the change-of-base rule, and it is the line printed in the panel above — at base 2 with x = 2 it reads 0.69 / 0.69 = 1.

How to read what you see

Three curves are drawn: your curve for the base you picked, plus ln(x) and log₁₀(x) as fixed references you can measure against. All three pass through the small dot at (1, 0), because any base raised to the power 0 gives 1. The larger dot sits where the argument equals the base, at (b, 1), so it slides along the curve as you drag the base. Hovering anywhere on the graph reports all three logarithms at that exact x.

Assumes
b > 0, b ≠ 1, and x > 0. These are not bookkeeping conventions — they are exactly the conditions under which "b to what power gives x?" has one real answer.
Breaks when
Base 1 is the interesting failure, and step 4 shows why: the derivation divides by ln(b), and ln(1) = 0, so the value is undefined rather than merely large. You cannot sit there — type 1 into the base and it is replaced by 0.99, where the change-of-base line divides by a value near −0.01 and the answer leaps to −68.97 for the same x = 2. Below 1 that divisor stays negative and the whole curve turns over: still a logarithm, now decreasing.

why logarithms are everywhere 🖖

Logarithms turn multiplication into addition — that's the whole trick, and it's why they show up everywhere humans need to compress huge ranges into something readable. The pH scale is -log₁₀[H⁺]: each whole step is a 10× change in acidity. Decibels are 10·log₁₀(power ratio): a quiet room and a jet engine differ by roughly a trillion in raw power, but only by about 120 dB. The Richter/moment magnitude scale works the same way — a magnitude 7 earthquake releases about 32 times more energy than a magnitude 6, not 7/6 times more. Before calculators, engineers carried slide rules that turned this addition trick into a physical ruler: sliding two logarithmically-marked scales let you multiply two numbers just by adding lengths. And in information theory, the number of bits needed to represent something is literally log₂ of the number of possibilities — every doubling of choices costs exactly one more bit.

every base is the same curve 🖖

Slide the base and the graphs seem to change shape — but they do not. Change of base gives log_b(x) = ln(x) / ln(b), so each curve is just ln(x) multiplied by a fixed number. The slider only stretches one universal curve vertically. Push the base below 1 and that factor turns negative, flipping the curve upside down; set it exactly to 1 and everything collapses, since ln(1) = 0 means dividing by zero.

LOGARITHMS — WHICH BASE YOU ARE IN, AND HOW TO MOVE BETWEEN THEM

Which Logarithm Case Are You In?

A logarithm asks one question — what power of b gives x? — but the base changes what the answer is for. Base e turns up wherever something grows at a rate proportional to itself; base 10 counts orders of magnitude; a base below 1 flips the whole curve; and any base at all can be converted into any other with one division. The last case is the one that surprises people: as the base approaches 1 the logarithm blows up.

Natural log — base e, the one calculus prefers ln x = loge x
Common log — base 10, counting orders of magnitude log10 x
Base below 1 — the curve turns over 0 < b < 1
Change of base — every logarithm is every other one, rescaled logb x = ln x / ln b
Base just above 1 — the logarithm explodes b → 1 ⇒ ln b → 0

01

Natural log — base e, the one calculus prefers

What you know: The base is e ≈ 2.718. Written ln x, this is the logarithm that appears whenever a rate of change is proportional to the current amount.

Base: ln x = loge x

Worked example: ln 2 = 0.693, because e^0.693 = 2 — and that 0.693 is why "doubling time = ln 2 / growth rate"

Open this case: natural log
Natural log — base e, the one calculus prefers. The natural log: slope exactly 1/x, and the area under the reciprocal curve. The base is e ≈ 2.718. Written ln x, this is the logarithm that appears whenever a rate of change is proportional to the current amount.
The natural log: slope exactly 1/x, and the area under the reciprocal curve.

02

Common log — base 10, counting orders of magnitude

What you know: The base is 10. Each step of 1 in the answer means the input was multiplied by ten.

Base: log10 x

Worked example: log₁₀ 100 = 2, log₁₀ 1000 = 3 — a tenfold jump in x adds exactly 1

Open this case: common log
Common log — base 10, counting orders of magnitude. Every tenfold increase in x moves the same distance up the curve. The base is 10. Each step of 1 in the answer means the input was multiplied by ten.
Every tenfold increase in x moves the same distance up the curve.

03

Base below 1 — the curve turns over

What you know: 0 < b < 1. Raising a fraction to higher powers makes it smaller, so the logarithm decreases instead of increasing and goes negative for x > 1.

Base: 0 < b < 1

Worked example: log₀.₅ 4 = −2, because 0.5⁻² = 4 — the same size as log₂ 4 = 2, with the sign flipped

Open this case: base < 1
Base below 1 — the curve turns over. With a base under 1 the curve falls: larger x gives a more negative logarithm. 0 < b < 1. Raising a fraction to higher powers makes it smaller, so the logarithm decreases instead of increasing and goes negative for x > 1.
With a base under 1 the curve falls: larger x gives a more negative logarithm.

04

Change of base — every logarithm is every other one, rescaled

What you know: You need a base your calculator does not have. Divide two logarithms in any base you do have: log x in base b = ln x / ln b.

Base: logb x = ln x / ln b

Worked example: log₄ 16 = ln 16 / ln 4 = 2.7726 / 1.3863 = 2, and the same division works with log₁₀ instead of ln

Open this case: change of base
Change of base — every logarithm is every other one, rescaled. One curve, rescaled: dividing by ln b converts any base into any other. You need a base your calculator does not have. Divide two logarithms in any base you do have: log x in base b = ln x / ln b.
One curve, rescaled: dividing by ln b converts any base into any other.

05

Base just above 1 — the logarithm explodes

What you know: b is close to 1, so ln b is close to zero. Since log x in base b = ln x / ln b, dividing by that tiny number makes the output enormous.

Base: b → 1 ⇒ ln b → 0

Worked example: log₁.₀₅ 50 = ln 50 / ln 1.05 = 3.912 / 0.04879 = 80.2 — it takes 80 steps of 5% growth to multiply by 50

Open this case: near b = 1
Base just above 1 — the logarithm explodes. As the base approaches 1 the curve steepens without limit; at exactly 1 it does not exist. b is close to 1, so ln b is close to zero. Since log x in base b = ln x / ln b, dividing by that tiny number makes the output enormous.
As the base approaches 1 the curve steepens without limit; at exactly 1 it does not exist.

Practice

Check yourself

Predict the answer first, then use the controls above to find out. Reveal only after you have committed to a guess — that is what makes it practice.

  1. Set the base to 0.5 and leave x at 2. Before you look — will the answer be positive or negative, and roughly how big?

    Show answer
    Negative, and small: log₀.₅(2) = −1 exactly. Change of base makes it ln(2)/ln(0.5), and ln(0.5) is negative, so the whole curve flips. It is exactly −1 because 0.5 raised to the power −1 is 2 — halving once, backwards.
  2. The larger dot always sits at (b, 1). Drag the base from 2 up to 9 and predict what the dot does — and why the answer is 1 the whole way.

    Show answer
    It slides right along the curve, staying at height 1. log_b(b) = 1 for every base, because “what power of b gives b?” is always 1. The dot moves horizontally because its x-coordinate is the base you are dragging.
  3. Type 1 into the base. Predict what happens before pressing anything — does the curve go vertical, flat, or something else?

    Show answer
    None of those: the page refuses the value and substitutes 0.99. Step 4 of the derivation divides by ln(b), and ln(1) = 0, so base 1 is undefined rather than steep. At 0.99 the change-of-base line divides by a value near −0.01 and reads −68.97, a huge negative number, which is what “approaching undefined from one side” looks like.

Problem solved in full

  1. The reason 2¹⁰ = 1024 and 10³ = 1000 are close 5 steps

    2¹⁰ = 1024 and 10³ = 1000, and they are close for a reason this panel is already printing. Find the reason, and then find how fast the coincidence decays.

    1. Change of base turns any logarithm into a ratio of two others. The tool shows ln(2) = 0.693147 and log₁₀(2) = 0.30103, and log₂(10) is the reciprocal of the second: 3.32193.

    2. So ten doublings, expressed in powers of ten, is 10 × 0.30103.

    3. The exponent is 3.0103 rather than 3. That 0.0103 is the entire discrepancy, and raised as a power of ten it is 1.024.

    4. The gap compounds, because the excess multiplies rather than adding. A kibibyte is 2.4% over a thousand, a mebibyte 4.9% over a million, and a gibibyte 7.4% over a billion.

    5. The same 0.30103 is why a doubling of power is called 3 dB. The exact figure is 3.0103 dB, and the round number is a convenience with an error of one part in three hundred.

    Answer

    The tool prints ln(2) = 0.693147 and log₁₀(2) = 0.30103. The second is worth memorising outright, because it converts between the two bases everyone actually uses: bits and decimal digits. A number needs about 3.32 bits per decimal digit, a 2048-bit key is about 617 decimal digits, and any doubling process crosses a factor of a thousand every ten steps. Steps 4 and 5 are the warning attached: 2¹⁰ ≈ 10³ is an approximation that gets worse every time it is applied, which is why disk manufacturers and operating systems have disagreed about the size of a terabyte for thirty years — by 10%, and growing.

Learning path

Orders of magnitude

Leads to Scale of the universe the fact that a logarithm is an exponent, and change of base.

References (5)

Example problems

  • natural log - Natural logarithm case: ln(2) ≈ 0.693.
  • common log - Common log case: log10(100) = 2.
  • base < 1 - Base below 1 flips the curve: log0.5(4) = -2.
  • change of base - Change-of-base check: log4(16) = 2.
  • near b = 1 - Base just above 1: the curve plunges near-vertical since dividing by ln(1.05) ≈ 0.049 blows up the result.