Math
Graphing Inequalities on a Number Line Calculator
Type an inequality such as x > 2 or -3 ≤ x < 5 and the calculator draws it on a number line with the right dots: open for < and >, closed for ≤ and ≥.
For compound inequalities, enter two conditions and choose AND (shade only the overlap) or OR (shade everything in either); each part is drawn on its own line, then combined. The solution is also written in interval and set-builder notation.
Use <, <=, >, >=, or != (also ≤, ≥, ≠). Double inequalities like -3 <= x < 5 are fine.
Try an example
Result
Solution
—
- Interval notation
- —
- Set-builder notation
- —
- Endpoints and dots
- —
- How to draw it
- —
- Number of shaded pieces
- —
Student quick launch
Grade planning, algebra checks, and formulas students reach for most.
Study path
Use this calculator with
Follow these when you want the formula behind the answer, a short lesson, or nearby tools in the same topic.
What the number line inequality calculator solves
A number line graph shows every value that satisfies an inequality. The boundary point gets a dot: open (hollow) when the boundary is not a solution (< or >), closed (filled) when it is (≤ or ≥). The shading extends over every solution, with an arrow when it continues forever.
Compound inequalities
| Joiner | Meaning | Graph | Interval notation |
|---|---|---|---|
| and | both conditions must hold | shade only where the two graphs overlap | one interval, or ∅ if no overlap |
| or | at least one condition holds | shade everything in either graph | union with ∪, or one merged interval |
Reading the dots and brackets
| Symbol | Dot | Bracket |
|---|---|---|
| < or > | open (hollow) | ( or ) |
| ≤ or ≥ | closed (filled) | [ or ] |
| ∞ or -∞ | arrow | always ( or ) |
How to use it
- Choose one inequality, or two joined by AND or OR.
- Type the inequality with the variable on either side, or as a double inequality like -3 <= x < 5.
- Read the number line, the Writing a range with brackets and parentheses, where brackets include the endpoint., and the endpoint list. Open the steps to see how the compound inequality was combined.
How to read the answer
The shaded part of the number line is the solution set. The endpoint list says which boundary points are included. In interval notation, ∪ joins separate pieces; ∅ means nothing is shaded; (-∞, ∞) means the whole line.
Common mistakes and edge cases
- Using a closed dot for < or >. Only ≤ and ≥ include the endpoint.
- Shading the wrong direction when the variable is on the right: 3 > x means x < 3.
- Treating 'and' like 'or'. x < 1 and x > 4 has no solution; x < 1 or x > 4 has two rays.
- Writing a double inequality with the signs pointing different ways, such as 2 < x > 5, which is not allowed.
Worked examples
Double inequality
-3 ≤ x < 5 → [-3, 5)
Solution
-3 ≤ x < 5
Single ray
x > 2 → (2, ∞) with an open dot at 2
Solution
x > 2
AND with overlap
x ≥ -1 and x < 4 → [-1, 4)
Solution
-1 ≤ x < 4
AND with no overlap
x < 1 and x > 4 → no solution
Solution
no solution
OR with two rays
x < 1 or x > 4 → (-∞, 1) ∪ (4, ∞)
Solution
x < 1 or x > 4
OR that covers everything
x ≤ 3 or x > 0 → all real numbers
Solution
x is any real number
Not equal
x ≠ 1 → everything except one point
Solution
x < 1 or x > 1
Bad chain
2 < x > 5 is rejected
Solution
—
Frequently asked questions
When do I use an open dot versus a closed dot?+
Open (hollow) for strict inequalities < and >, because the endpoint itself is not a solution. Closed (filled) for ≤ and ≥, because the endpoint is included.
How do I graph a compound 'and' inequality?+
Graph each inequality separately, then shade only where both graphs overlap. If they do not overlap, the solution is empty.
How do I graph a compound 'or' inequality?+
Graph each inequality and shade everything that appears in either one. The pieces may stay separate (two rays) or merge into one region.
What is the difference between -3 < x < 5 and x < -3 or x > 5?+
The first is an 'and' (x is between -3 and 5); the second is an 'or' (x is outside that range). Their graphs are complementary apart from the endpoints.
How do I write the graph in interval notation?+
Read left to right: use ( for open dots and [ for closed dots, list the endpoints, and join separate pieces with ∪. Infinity always gets a round bracket.
Can the variable be on the right side?+
Yes. 3 > x means the same as x < 3; the calculator flips it for you.
About this calculator
- Written by
- mathcheck editorial team
- Last reviewed
- September 4, 2026
Method
- Uses the values entered by the user and stable formulas documented on the page.
References
- OpenStax, Elementary Algebra 2e, Section 2.7 “Solve Linear Inequalities” — Graphing inequalities on the number line and interval notation.
- OpenStax, Intermediate Algebra 2e, Section 2.6 “Solve Compound Inequalities”
Related calculators
Interval Notation Calculator
Convert between inequalities, interval notation, set-builder notation, and a number-line description. Handles compound and/or inequalities, unions, infinity, and ≠.
Absolute Value Inequalities Calculator
Solve |ax + b| <, ≤, >, or ≥ c: rewrites it as a compound and/or inequality, solves exactly with fractions, gives interval and set-builder notation, draws the number line with open or closed dots, and catches no-solution and all-real-numbers cases.
Absolute Value Equation Calculator
Solve |ax + b| = c and |ax + b| = |cx + d| with both cases shown, exact fraction answers, checks by substitution, and clear no-solution and all-real-numbers cases.
Greater Than or Less Than Calculator
Compare numbers of any form (integers, decimals, fractions, mixed numbers, percents, scientific notation) exactly: shows which is greater with the correct symbol, orders up to six numbers from least to greatest, and reveals the common denominator or decimal form used to decide.
System of Equations Calculator
Solve a 2x2 linear system with elimination/determinant steps for x and y.
Complex Number Calculator
Add, subtract, multiply, divide, and raise complex numbers to powers exactly. Shows the modulus, argument in degrees and radians (with exact π fractions), conjugate, polar and exponential forms, De Moivre's theorem, and the point on the complex plane.
Last updated: September 4, 2026