Skip to main content
Graphing Calculator
English

Learn · 4 min read

How to Graph Logarithmic Functions on a Graphing Calculator

The direct answer: type log(x)

To graph the natural logarithm, enter log(x) as a cartesian expression. One naming honesty up front: on this calculator, log means the natural logarithm (base e) — the function many textbooks write as ln. If you type ln(x), it works too, because ln is aliased to log. There is no separate natural-log button to hunt for.

The curve rises steeply just right of the y-axis, passes through (1, 0) — because log(1) = 0 in every base — then flattens as it climbs: log(e) = 1, log(e^2) = 2, each extra unit of height demanding a multiplicatively larger x. That relentless flattening is the signature shape of every logarithm.

log, log10, and ln — which is which

Three names, two functions on this calculator: log(x) and ln(x) are both the natural logarithm (base e, about 2.718), while log10(x) is the common logarithm (base 10). So log10(100) = 2 and log10(1000) = 3 — the common log counts digits, which is why scientists use it for pH, decibels, and earthquake magnitudes.

This naming differs from some textbooks and calculators where log means base 10 — a classic source of wrong answers. On our calculator, if you want base 10 you must type log10 explicitly. When in doubt, test: log(e) should equal 1, and log10(10) should equal 1. Both are true here.

The confusion is historical: on handheld calculators, the LOG button traditionally meant base 10 while LN meant base e, but in higher mathematics log alone almost always means the natural logarithm. Our calculator follows the mathematical convention. If you are working from a textbook that uses log for base 10, translate every one of its log(x) examples into log10(x) here — a one-word change that prevents an entire category of wrong answers.

Any other base via change of base

There is no log2 button, and none is needed: the change-of-base formula says log_b(x) = log(x)/log(b) for any base b. To graph log base 2, enter log(x)/log(2). To graph log base 5, enter log(x)/log(5). The formula works with our log because any logarithm base can play the role of the common base in the fraction.

Check it: log(8)/log(2) = 3, since 2^3 = 8. On the graph, log(x)/log(2) passes through (2, 1), (4, 2), and (8, 3) — each doubling of x adds exactly 1, which is precisely what base 2 means. Try the three expressions below together to see how the base controls the steepness.

Verify the formula numerically before trusting it: open the table of values for log(x)/log(2) at x = 2, 4, 8 and confirm the outputs 1, 2, 3. This two-second check catches the classic mistake of writing log(2)/log(x) — the fraction upside down — which would give reciprocals instead of logarithms.

The domain and the asymptote at x = 0

Logarithms are defined only for positive x — no power of e or 10 can produce zero or a negative number, so log(x) refuses every x ≤ 0. As x approaches 0 from the right, log(x) plunges toward negative infinity: the y-axis (x = 0) is a vertical asymptote, and the curve hugs it ever more tightly without ever touching it.

This makes logarithms the perfect companion to the asymptotes article: zoom in near x = 0 and watch the table of values output −2.3, −4.6, −6.9 at x = 0.1, 0.01, 0.001 — dropping by equal steps as x shrinks tenfold. Contrast this with 1/x, whose right-hand asymptote climbs to positive infinity; log(x) dives to negative infinity instead.

There is a subtlety worth noticing: near the asymptote the logarithm dives slowly compared with 1/x. At x = 0.001, 1/x has already reached 1000 while log(x) sits at only −6.9. The logarithm still blows up, but lazily — it is the slowest-growing unbounded function you will meet, which is exactly why log scales can compress enormous ranges onto one readable axis.

Comparing bases and meeting the inverse

Graph log(x), log10(x), and log(x)/log(2) together: all three pass through (1, 0) and share the asymptote x = 0, but the larger the base, the flatter the climb — base 10 rises slowest because each unit of y demands a tenfold x. For a base between 0 and 1 the graph flips: log(x)/log(0.5) decreases, because log(0.5) is negative.

That decreasing case deserves a concrete picture: log(x)/log(0.5) passes through (1, 0) like the others, but at x = 2 it reads −1 and at x = 4 it reads −2 — each doubling of x subtracts 1 instead of adding it. The curve is the mirror image of log(x)/log(2) across the x-axis, which makes sense: log(0.5) = −log(2), so dividing by it flips every sign. Bases below 1 are rare in practice, but recognizing the flip keeps the change-of-base formula feeling like one coherent idea.

Finally, note the partnership: log and exp are inverse functions — exp(log(x)) = x for x > 0 — and their graphs mirror each other across the line y = x. Graphing them together is the clearest way to see what an inverse function really is. Logarithms grow more slowly than any power of x, which is why log scales tame quantities that span many orders of magnitude.

The curves log(x), log10(x), and log(x)/log(2) together, all passing through (1, 0) with a vertical asymptote at x = 0
log(x), log10(x), and log(x)/log(2) plotted together. All three pass through (1, 0) and share the asymptote x = 0; larger bases climb more slowly.
The natural logarithm log(x) graphed alone, rising steeply near x = 0 and flattening as x grows
log(x) on its own — the natural logarithm. Notice the steep rise just right of the y-axis, the point (1, 0), and the relentless flattening as x grows.

Try it in the calculator

Type any of these into the graphing calculator to see the ideas above in action:

  • log(x)
  • log10(x)
  • log(x)/log(2)

Key takeaways

  • On this calculator log(x) is the natural logarithm (ln(x) is an alias); log10(x) is base 10 — never assume log means base 10.
  • Any base works via change of base: log_b(x) = log(x)/log(b), so log base 2 is log(x)/log(2).
  • Every logarithm passes through (1, 0), is defined only for x > 0, and has a vertical asymptote at x = 0.
  • Larger bases climb more slowly; bases between 0 and 1 make the graph decrease instead of increase.
  • log and exp are inverse functions: exp(log(x)) = x, and their graphs mirror across the line y = x.

Frequently asked questions

Is log(x) the natural log or base 10 on this calculator?

The natural log (base e). The name ln(x) works as an alias for the same function. For base 10, type log10(x) explicitly — unlike some textbooks, our log never means base 10.

How do I graph log base 2 (or any other base)?

Use the change-of-base formula: log_b(x) = log(x)/log(b). For base 2, enter log(x)/log(2); it passes through (2, 1), (4, 2), and (8, 3), since each doubling of x adds exactly 1.

Why does the graph stop at the y-axis?

The logarithm is defined only for x > 0 — no power of the base can produce zero or a negative number. The y-axis is a vertical asymptote: the curve dives toward negative infinity as x approaches 0 from the right.

Related pages