This number line plotter draws points, intervals and inequalities on a number line. Type something like x > -2 or [1, 4) and get a clean picture with open and closed circles, which you can download as SVG or PNG.
What the number line plotter understands
| You type | Meaning | Drawn as |
|---|---|---|
| 3 | The single value 3 | A filled circle |
| x > -2 | All numbers greater than −2 | An open circle and an arrow to the right |
| -2 < x <= 5 | Greater than −2 and at most 5 | An open circle, a filled circle and a bar |
| [1, 4) | 1 included, 4 left out | Filled circle, open circle and a bar |
| x < -3 or x >= 5 | Two separate parts | Two shapes on the same row |
Each line you enter becomes its own row above the axis, in its own colour, so you can compare several sets at once, for example the solutions of two inequalities.
Interval notation in short
A square bracket includes an endpoint and a round bracket leaves it out. So [0, 1] has both ends, (0, 1) has neither, and (0, 1] and [0, 1) include only one. [2] A closed interval always has at least one point, while (a, a) is empty and [a, a] is the single point a. [2] Infinity is written next to a round bracket, as in (0, ∞), because it is not a number you can reach. [2] You can type inf, infinity or ∞, and the minus sign can be a hyphen or the true minus sign.
How the picture is drawn
A number line is usually horizontal and graduated like a ruler, with evenly spaced marks and an arrow showing the direction in which numbers increase. [1] The tool chooses a range that holds every finite endpoint, picks a round step of 1, 2 or 5 times a power of ten, and draws about eight tick marks. Closed intervals and rays include their endpoints; open ones do not. [1] Showing included and excluded endpoints with filled and open circles is a common textbook convention that we follow here; it is our own working rather than a rule from the sources.
How to plot an inequality
- Write the inequality with x on one side, as in x >= 1 or 5 > x. The tool reads the sign in either order.
- For a range, chain two signs: -2 < x <= 5.
- For two separate parts, write both and join them with "or".
- Press Plot and check the table: it shows the same set in interval notation, which is a handy way to check your answer.
Downloading and using the image
The SVG is a vector picture with a white background that scales to any size, so it suits worksheets, slides and printed handouts. The PNG is made at twice the screen size for sharper printing. The image contains only the line, the circles and the labels; nothing you typed is written into the file except as numbers.
Limits
- Up to 12 entries are plotted at once.
- Only one variable is understood, and "not equal" (x != 3) is drawn as two open rays.
- Fractions such as 1/2 are accepted, but not roots or expressions such as 2x + 1 > 5. Solve for x first.
- The union of overlapping intervals is not merged; each piece is drawn as typed.
- The set of integers is not drawn as dots; the tool draws continuous intervals of real numbers.
Worked examples
Entering x > -2 draws an open circle at −2 and an arrow to the right, and the table gives (−2, ∞). Entering -3 <= x < 1 draws a filled circle at −3, an open circle at 1 and a bar between them, which is [−3, 1) in interval notation. Entering x < -1 or x >= 4 gives two shapes on the same row: an arrow to the left ending in an open circle at −1, and a filled circle at 4 with an arrow to the right, written (−∞, −1) ∪ [4, ∞).
To compare two inequalities, put each on its own line. The rows line up above the same axis, so the overlap of two solution sets is easy to see, and dotted guides run from each endpoint down to the axis to show exactly where it falls.
Using the plotter for homework and teaching
Students can check an answer by typing the inequality and comparing the picture with their own drawing. Teachers can create worksheet graphics in seconds and export them as SVG for slides or as PNG for documents. When a result looks wrong, read the interval notation in the table: it is the quickest way to spot a flipped sign or a swapped bracket.
Common mistakes
- Using a round bracket for a closed end. Use a square bracket when the endpoint is included.
- Putting a comma inside a union of intervals; separate them with "or" or ∪ instead.
- Reversing an inequality when the variable is on the right: 5 > x means x is less than 5.
- Forgetting that infinity always gets a round bracket and an open circle.
The picture is drawn in your browser, and nothing you type is stored or sent anywhere.
What next
Use this often? Add Number Line to your Home screen.
Frequently asked questions
What can the number line plotter draw?
Single points, intervals in bracket notation such as [1, 4) or (-inf, 2], inequalities such as x greater than -2, or a range such as -2 less than x, and unions joined with "or" or the union sign.
What do open and closed circles mean?
A filled (closed) circle means the endpoint is included, as with a square bracket or a less-than-or-equal sign. An open circle means it is left out, as with a round bracket or a strict inequality.
How do I plot an inequality with infinity?
Write it as an inequality, such as x > 3, or as an interval with inf, for example (3, inf). The picture shows an open circle at the finite end and an arrow.
Can I download the number line?
Yes. Use Download SVG for a scalable vector picture or Download PNG for an image at twice the screen size.
Can I plot expressions such as 2x + 1 > 5?
Not directly. Solve for x first, then enter x > 2. Only inequalities in a single variable on one side are read.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.