Whether you are measuring the strength of an earthquake on the Richter scale or the acidity of a solution with pH, logarithms let us work with quantities that grow exponentially. A logarithmic function is the inverse of an exponential function. An exponent tells you what a number becomes when you raise it to a power. A logarithm works backwards and tells you what that power was.
In this guide you will learn what a logarithm is, how common and natural logarithms work, and how to draw the graph of a logarithmic function from a table of values. Worked examples and practice questions follow. Logarithms are part of the AS and A level Maths course for all exam boards (AQA, Edexcel and OCR), and they are the key to solving equations where the unknown is in the power.
What Is a Logarithm? Definition and Notation
A logarithm answers one question: "To what power must I raise the base a to get x?"
The logarithmic function is written as:
This means exactly the same as the exponential form:
In this relationship:
- a is the base (a > 0 and a ≠ 1)
- x is the argument, or input (x > 0)
- y is the exponent, or output
We read logₐ(x) = y as "the logarithm of x to the base a is y".
For example, 9² = 81. In logarithmic form this is log₉(81) = 2: "the logarithm of 81 to the base 9 is 2".
You cannot take the logarithm of 0 or of a negative number. A positive base raised to any power always gives a positive answer, so no power can ever give 0 or a negative value.
Exponential form and logarithmic form
The table below writes four facts both ways. The base stays the same in both forms.
| Exponential form | Logarithmic form |
|---|---|
| 3³ = 27 | log₃(27) = 3 |
| 16² = 256 | log₁₆(256) = 2 |
| 12² = 144 | log₁₂(144) = 2 |
| 2⁵ = 32 | log₂(32) = 5 |
New to logs? Start with our introduction to logarithms, and revise exponential functions, because every logarithmic function is the inverse of one.
Common and Natural Logarithms
Two bases come up so often that they have their own notation and their own buttons on your calculator.
Common logarithms (base 10)
A common logarithm has base 10. It is usually written without the base:
So log(1000) = 3, because 10³ = 1000.
Natural logarithms (base e)
A natural logarithm has base e, Euler's number (e ≈ 2.718). It is written as:
Natural logs are used throughout A level calculus, and with exponential growth and decay. Because ln(x) and eˣ are inverses, they cancel each other out:
and
Graphing Logarithmic Functions With a Table of Values
The quickest way to draw a logarithmic graph is to start from the matching exponential function:
- Make a table of values for y = aˣ.
- Swap the x and y columns. This gives the table of values for y = logₐ(x).
- Plot the points and join them with a smooth curve.
Swapping x and y reflects the graph in the line y = x. That is why the graph of a logarithmic function is a mirror image of the exponential graph.

Graphing y = log₃(x), where the base is greater than 1
Draw the graph of y = 3ˣ and its inverse, y = log₃(x).
Step 1: Make a table of values for y = 3ˣ.
| x | y = 3ˣ |
|---|---|
| −2 | 1/9 |
| −1 | 1/3 |
| 0 | 1 |
| 1 | 3 |
| 2 | 9 |
Step 2: Plot these points to get the graph of the exponential function.

Step 3: Swap the columns to get the table for y = log₃(x).
| x | y = log₃(x) |
|---|---|
| 1/9 | −2 |
| 1/3 | −1 |
| 1 | 0 |
| 3 | 1 |
| 9 | 2 |
Step 4: Plot these points and join them with a smooth curve.

The curve passes through (1, 0). It gets closer and closer to the y-axis but never touches it. The base, 3, is greater than 1, so the graph is increasing.
Graphing y = log₁/₃(x), where the base is between 0 and 1
Now see what happens when the base is less than 1. Draw the graph of y = (1/3)ˣ and its inverse, y = log₁/₃(x).
Step 1: Make a table of values for y = (1/3)ˣ.
| x | y = (1/3)ˣ |
|---|---|
| −2 | 9 |
| −1 | 3 |
| 0 | 1 |
| 1 | 1/3 |
| 2 | 1/9 |
Step 2: Plot the exponential graph.

Step 3: Swap the columns to get the table for y = log₁/₃(x).
| x | y = log₁/₃(x) |
|---|---|
| 9 | −2 |
| 3 | −1 |
| 1 | 0 |
| 1/3 | 1 |
| 1/9 | 2 |
Step 4: Plot the logarithmic graph.

This curve also passes through (1, 0) and never crosses the y-axis. Because the base is between 0 and 1, the graph is decreasing. Whatever the base, the shape follows the same rules, which are listed in the next section.
Key Features of Logarithmic Graphs
Every graph of the form y = logₐ(x) has these features:
- Domain: x > 0. You cannot take the log of 0 or a negative number, so the graph only exists to the right of the y-axis.
- Range: all real numbers. The output can be any positive or negative value.
- Vertical asymptote: x = 0. The curve gets closer and closer to the y-axis but never touches or crosses it.
- x-intercept: (1, 0). The curve always passes through this point, because logₐ(1) = 0 for every base (a⁰ = 1).
- No y-intercept, because the curve never reaches x = 0.
- The curve also passes through (a, 1), because logₐ(a) = 1.
- If a > 1, the graph is increasing. Examples are log(x), ln(x) and log₃(x).
- If 0 < a < 1, the graph is decreasing. An example is log₁/₃(x).
- It is the reflection of y = aˣ in the line y = x.
Logarithmic Data Trends and Real-Life Uses
A logarithmic graph rises more and more slowly. To see this, look at how fast x has to grow to raise the common log by just 1:
| x | y = log₁₀(x) |
|---|---|
| 10 | 0 |
| 10 | 1 |
| 100 | 2 |
| 1000 | 3 |
| 10000 | 4 |
Every time x is multiplied by 10, y goes up by only 1. This is why logarithmic scales are used to measure things that cover a huge range of sizes:
- Earthquakes: on the Richter scale, each step of 1 means about 10 times the ground movement.
- pH: pH = −log₁₀[H⁺]. A solution at pH 3 is 10 times more acidic than one at pH 4.
- Sound: decibels use a log scale, so a rise of 10 dB means 10 times the sound intensity.
Worked Examples
In each example, write the logarithm in exponential form first, then find the missing power.
Evaluate a logarithm: log₁₄(196)
Let log₁₄(196) = x.
Step 1: Write this in exponential form: 14ˣ = 196.
Step 2: 14² = 196, so x = 2.
log₁₄(196) = 2
A logarithm with a negative answer: log₆(1/216)
Let log₆(1/216) = x.
Step 1: Write this in exponential form: 6ˣ = 1/216.
Step 2: 6³ = 216. The answer is a fraction, so the power must be negative: 6⁻³ = 1/6³ = 1/216.
log₆(1/216) = −3
A logarithm with a fractional base: log₂/₇(4/49)
Let log₂/₇(4/49) = x.
Step 1: Write this in exponential form: (2/7)ˣ = 4/49.
Step 2: (2/7)² = 2²/7² = 4/49, so x = 2.
log₂/₇(4/49) = 2
A fractional base with a cube: log₅/₃(125/27)
Let log₅/₃(125/27) = x.
Step 1: Write this in exponential form: (5/3)ˣ = 125/27.
Step 2: (5/3)³ = 5³/3³ = 125/27, so x = 3.
log₅/₃(125/27) = 3
Solving a logarithmic equation: 3 log₂(x) = 12
Step 1: Divide both sides by 3 so the log is on its own.
log₂(x) = 12/3 = 4
Step 2: Write this in exponential form.
x = 2⁴
Step 3: Work out the value.
x = 16
Find the value of x: log₃(x) = 4
Write this in exponential form: x = 3⁴. Work out the power of 3: x = 81.
Solve for y: 5ʸ = 125
Write this as a logarithm: y = log₅(125). 5³ = 125, so y = 3.
For harder equations, see our guide to logarithmic equations.
Summarise with AI:








As a university professor, I always send my students to your websites to study key ideas that you explain in simple terms. You certainly do competent work.