Number lines for inequalities, fractions and points
The Number Line Generator draws a horizontal number line over the range you type, with a tick at every step and numbers under them. Type an inequality to graph it with open and closed circles and a thick line, or type numbers to mark as points, lettered for students to identify, or a sequence like aₙ = 1/n.
Teachers use it for graphing inequalities and compound inequalities, placing integers, fractions and decimals, and questions on reading a point’s value. Type the range in fractions or π and the numbers follow, so a line counting by 1/4 is numbered in fractions.
What you can set
- Equations to graph, one per row: an inequality or equation in one letter, like −2 < x ≤ 5, x < −1 or x ≥ 3, or x = 2, a list of points, lettered points like P(0.35), or a sequence
- Each row’s color, whether values are written above the line, and for points a dot or cross and how their labels show
- The range (From, To and Count by), typed as whole numbers, decimals, fractions or multiples of π
- How often the ticks are numbered: every tick, every 2nd, 4th, 5th or 10th, or not at all
- For a sequence, which terms are shown, n from one whole number to another
- Small, medium or large labels
Copying, printing and sharing
Copy the figure straight into a test, worksheet or slide, or download it as a PNG or SVG. Printing the page prints
just the figure. Share link copies the page’s address with your settings in it, so anyone who opens it sees this
exact figure, and presets save settings you use often in your browser. It’s free, with no sign-up.
Frequently asked questions
How do I graph an inequality on a number line?
Type it in an Equations row, like x ≥ −2 (type >= for ≥). The generator draws a closed circle where the number is included and an open circle where it isn’t, with a thick line over every number that makes it true.
Can it graph compound inequalities?
Yes. Type an “and” inequality as −3 < x ≤ 4, or with the word and, and an “or” inequality with the word or, like x < −1 or x ≥ 3. You can also type x ≠ 2, all real numbers or no solution.
Can I make a fraction number line?
Yes. Type the step as a fraction, like 1/4, and the ticks are numbered as fractions. To have students name the fractions, set Numbers to number fewer ticks, such as every 4th, so only the whole numbers are written.
How do I mark points for students to identify?
Type the points with a letter before each, like P(3/4), Q(3/2). They’re drawn as dots with only their letters, since writing the value would give the answer away. A point typed without a letter that doesn’t sit on a numbered tick has its value written above it, unless you turn Values off in the row’s style.
Why is the graph in two colors?
Each row has its own color, set from the button before it. Rows of the same color join into one graph; rows of different colors are drawn separately, so you can show two inequalities on one line.
← All math figures