Graphing Inequalities on a Number Line Calculator

Choose an inequality type and enter its boundary value(s) to get interval notation, set-builder notation, and step-by-step instructions for graphing it on a number line.

Quick Facts

Circle rule
< or > → open circle; ≤ or ≥ → closed circle
Open means the boundary is excluded; closed (filled) means it is included.
Shading direction
< or ≤ shades left; > or ≥ shades right
The arrow always points toward the values that satisfy the inequality.
Interval notation
( ) = excluded, [ ] = included
Infinity (∞ or -∞) always takes a parenthesis, never a bracket.

Your Results

Calculated
Inequality
-
Your inequality restated
Interval Notation
-
Standard bracket/parenthesis form
Set-Builder Notation
-
{x | condition}
Number Line Graph
-
How to draw it

Ready

Choose an inequality type and enter your boundary value(s), then press Calculate.

How Graphing Inequalities on a Number Line Works

A one-variable inequality (like x > 3 or -2 ≤ x < 5) does not have a single answer — it describes an entire range of numbers that make the statement true. Graphing that range on a number line is a two-part decision for each boundary: whether to draw an open circle (boundary excluded) or a closed circle (boundary included), and which direction to shade or draw an arrow. This calculator applies those rules to your inequality and also converts it into interval notation and set-builder notation, the two standard written forms used in algebra.

How the calculation works

Pick the inequality type that matches your problem, then enter the boundary value(s). For a single-sided inequality (x > a, x ≥ a, x < a, or x ≤ a), the calculator places one circle at a — open for a strict inequality (> or <), closed for ≥ or ≤ — and shades toward positive infinity for >/≥ or toward negative infinity for </≤. For a compound "and" inequality (a < x < b), it places a circle at each end and shades the segment between them. For a compound "or" inequality (x < a or x > b), it places a circle at each end and shades two rays pointing outward, away from each other. The tool also converts your inequality to interval notation, where parentheses ( ) mark excluded endpoints (matching open circles), square brackets [ ] mark included endpoints (matching closed circles), and infinity always takes a parenthesis since it is never actually reached.

Common mistakes

  • Flipping the inequality sign: if you multiply or divide both sides of an inequality by a negative number, the direction of the inequality must flip (e.g., -x > 3 becomes x < -3).
  • Mixing up open and closed circles: "at least" and "at most" (≥, ≤) include the boundary and need a closed circle; "more than" and "less than" (>, <) exclude it and need an open circle.
  • Wrong bracket in interval notation: a closed circle must pair with a square bracket [ or ], and an open circle must pair with a parenthesis ( or ) — never mix a bracket with infinity.
  • Compound "and" vs. "or" confusion: "and" inequalities graph as one connected segment between the boundaries; "or" inequalities graph as two separate rays pointing away from each other.

Real-world applications

  • Algebra and pre-algebra coursework use number-line graphs to visualize solution sets for linear inequalities and compound inequalities.
  • Word problems that describe a valid range (e.g., "you must be at least 18 and under 65") translate directly into compound inequalities and their number-line graphs.
  • Domain and range restrictions in functions (such as where a square root or rational expression is defined) are commonly expressed and graphed as inequalities.
  • Quality control and tolerance specifications in engineering describe acceptable ranges as inequalities, which are graphed the same way to visualize acceptable limits.

Frequently Asked Questions

What is the difference between an open circle and a closed circle on a number line?
An open circle marks a boundary value that is NOT included in the solution, used for strict inequalities (< or >). A closed (filled) circle marks a boundary value that IS included, used for ≤ or ≥. For example, x > 3 gets an open circle at 3, while x ≥ 3 gets a closed circle at 3.
How do I graph a compound inequality like -2 < x < 5?
Place a circle at each boundary (open for < or >, closed for ≤ or ≥), then shade the segment of the number line between them. -2 < x < 5 gets open circles at -2 and 5 with the region between shaded, written in interval notation as (-2, 5).
What does interval notation like (-2, ∞) mean?
Interval notation lists the lower and upper bounds of a solution set. A parenthesis ( or ) means that endpoint is excluded (matches an open circle); a bracket [ or ] means it is included (matches a closed circle). ∞ and -∞ always use parentheses because infinity is not a number that can be included. (-2, ∞) means all x greater than -2.
How do I graph an "or" inequality such as x < -2 or x > 5?
Draw a circle at each boundary (open or closed matching the symbol), then shade two rays pointing away from each other: left from the smaller boundary and right from the larger one. x < -2 or x > 5 is written in interval notation as (-∞, -2) ∪ (5, ∞), where ∪ means the union of the two disconnected pieces.