Functions & Graphs

Graphing Exponential and Logarithmic Functions

Short answer: y = 2^x is defined for every x, always positive, passes through (0, 1) and approaches the asymptote y = 0 on the left. y = log₁₀ x is defined only for x > 0, passes through (1, 0) and approaches the asymptote x = 0. On this site log means base 10 and ln means base e.

Two separate graphs: y = 2^x passing through (0, 1) and y = log₁₀ x passing through (1, 0).

Exponential and logarithmic functions are inverses of each other. Their graphs mirror each other in the line y = x, and their key features swap: what is a horizontal asymptote for one is a vertical asymptote for the other.

y = 2^x

Type 2^x.

  • Anchor point: 2⁰ = 1, so the graph passes through (0, 1).
  • Another easy point: 2¹ = 2, so (1, 2). Each step right doubles y: (2, 4), (3, 8).
  • Left side: 2⁻¹ = 0.5, 2⁻² = 0.25… The values halve and approach 0 but never reach it. The line y = 0 is a horizontal asymptote.
  • Domain: all real x. Range: y > 0.

y = log₁₀ x

On this site type log(x) (or log10(x)).

  • Anchor point: log₁₀ 1 = 0, so the graph passes through (1, 0).
  • Another easy point: log₁₀ 10 = 1, so (10, 1). log₁₀ 100 = 2.
  • Near zero: log₁₀ 0.1 = −1, log₁₀ 0.01 = −2. As x approaches 0 the values fall without limit. The line x = 0 is a vertical asymptote.
  • Domain: x > 0. Range: all real y.

For x ≤ 0 there is no real logarithm. The calculator leaves that region empty and Evaluate reports “log is only defined for values greater than 0”.

Comparison table and graph of y = 2^x and y = log₁₀ x showing domains, ranges, anchor points (0, 1) and (1, 0), and asymptotes.
Side-by-side features of y = 2^x and y = log₁₀ x. The anchor point and asymptote of one swap coordinates in the other.

Plot y = 2^x and y = log₁₀ x together →

Comparison

Exponential and logarithmic features
Featurey = 2^xy = log₁₀ x
Domainall real xx > 0
Rangey > 0all real y
Anchor point(0, 1)(1, 0)
Asymptotey = 0 (horizontal)x = 0 (vertical)
Directionincreasingincreasing

log versus ln

Calculators and courses use two common logarithms:

  • log or log₁₀ — base 10. log(100) = 2 because 10² = 100.
  • ln — base e ≈ 2.718 (the natural logarithm). ln(e) = 1.

On our calculators, log(x) is always base 10 and ln(x) is always base e. Some textbooks and software use “log” to mean the natural log, so check the convention in your course. To use another base, apply the change-of-base rule: log₂ x = log(x) ÷ log(2). Try log(x)/log(2) — it passes through (1, 0), (2, 1) and (8, 3).

The inverse relationship

y = 10^x and y = log₁₀ x are exact inverses: plot 10^x, log(x) and x together and the two curves mirror each other in the line y = x. The point (0, 1) on one corresponds to (1, 0) on the other.

See 10^x and log x reflected in y = x →

Growth and decay

Changing the base changes the steepness:

  • bases greater than 1 (2, e, 10) give growth — the graph rises left to right;
  • bases between 0 and 1 give decay — for example y = 0.5^x falls, passing through (0, 1) and (1, 0.5).

Every graph of the form y = b^x (with b > 0, b ≠ 1) passes through (0, 1), because b⁰ = 1. Transformations move that anchor: y = 2^x − 3 passes through (0, −2) and has asymptote y = −3.

Compare 2^x, 0.5^x and 2^x − 3 →

Reading a log graph

On y = log₁₀ x, each step of 1 upwards needs ten times the x value: (1, 0), (10, 1), (100, 2). That is why logarithmic scales are used for quantities that span many orders of magnitude.

Checking values

Use Evaluate f(x): 2^x at x = 3 gives 8; log(x) at x = 1000 gives 3; ln(x) at x = 1 gives 0. Where the log is undefined (x ≤ 0), the calculator says so rather than returning a number.

Common mistakes

Watch for these
  • Expecting 2^x to reach 0. It never does.
  • Plotting log x for negative x. There is no real value.
  • Mixing up log and ln.
  • Typing 2^x+1 when you mean 2^(x+1). Powers bind tighter than +, so 2^x+1 is (2^x) + 1.

Common questions

Why do exponential graphs leave the window so fast?

Exponential growth is rapid: 2¹⁰ = 1024. Use a tall y-range or a narrower x-range.

Can I type e^x?

Yes: e^x or exp(x). Both give the natural exponential.

How this guide was made: drafted with AI assistance under the site’s editorial policy. Worked examples and plotted figures are computed by the same maths engine as our calculators and checked by automated tests. Found an error? Report a correction.

The two branches of y = 1/x with dashed asymptotes along x = 0 and y = 0.
Functions & Graphs

Rational Graphs and Asymptotes Explained

y = 1/x has two branches, an excluded value at x = 0 and two asymptotes. See valid points, the gap, and the plotting error to avoid.

Updated 3 min read