Interval Notation Calculator

Convert inequalities to interval notation and back, see set-builder form and a number line, and find unions, intersections and complements of intervals.

Interval Notation Calculator

Convert between interval notation, inequality notation, and set-builder notation. Perform operations on intervals including union, intersection, and complement. Visualize intervals on a number line.

Calculator Mode

Input Interval

Format: Use ( or [ for left bracket, ) or ] for right bracket. Use ∞ or inf for infinity. Examples: (1, 5), [-2, 3], (-∞, 0), [0, ∞)

Display Options

Interval Notation Calculator: Convert Between Inequalities and Number Lines

Interval notation exists for speed: a compact string like [2, 5) replaces 2 ≤ x < 5, and when you write domain after domain in precalculus or calculus, that brevity saves time and reduces errors. The interval notation calculator automates the conversion between inequality, interval, and set-builder notation, then draws the result on a number line so you can see exactly which numbers are included. It handles unions, intersections, complements, and differences of intervals, and it solves linear inequalities typed in standard form. The key rule that trips up most users is the one about parentheses versus brackets at infinity, covered below.

  • Parenthesis ( ): Endpoint is NOT included; corresponds to strict inequality < or >.
  • Bracket [ ]: Endpoint IS included; corresponds to non-strict inequality ≤ or ≥.
  • Infinity: Always uses a parenthesis because infinity is a concept, not a reachable number.
  • Union Symbol ∪: Combines two or more separate intervals into one set. Means 'or'.
  • Empty Set ∅: No real numbers satisfy the condition. Written as ∅ or {}.

How to Use Each Mode

Select a mode from the dropdown at the top of the calculator: Convert Notation, Interval Operations, or Solve Inequality. Each mode expects a different input format and returns results in three notations plus a number line.

Convert Notation

Choose the input type: interval notation (e.g., (2, 5]), inequality (e.g., 2 < x ≤ 5), or manual entry (enter left endpoint, right endpoint, and bracket types). The calculator outputs the equivalent inequality, set-builder notation, and the interval itself. If the input is a single interval, it also shows the length, midpoint, and whether it is bounded. Use this mode when you have an answer in one notation and need it in another for a homework assignment or textbook problem.

Interval Operations

Enter two intervals, A and B, and select an operation: Union (A ∪ B), Intersection (A ∩ B), Complement (A'), or Difference (A, B). The calculator parses each interval string, performs the set operation, and returns the result as a single interval or a union of intervals. This is useful when combining solution sets from compound inequalities like x < -1 or x ≥ 3.

Solve Inequality

Type a linear inequality in the form ax + b ? c (using <, ≤, >, ≥) or a compound inequality like -1 ≤ 3x - 2 ≤ 7. The calculator solves for x and expresses the solution set in interval, inequality, and set-builder notation. It also draws the solution on the number line. This mode does not support absolute-value, quadratic, or rational inequalities; for those, you must convert the result manually or use a dedicated solver.

Parentheses vs Brackets: The One Rule to Remember

A parenthesis ( or ) means the endpoint is not included in the set; a bracket [ or ] means the endpoint is included. Parentheses correspond to strict inequalities (< or >); brackets correspond to non-strict inequalities (≤ or ≥).

Infinity is the exception. Because ∞ and -∞ are not numbers you can reach, they are always paired with a parenthesis. Writing [5, ∞] is incorrect; the correct form is [5, ∞). The same logic applies to negative infinity: (-∞, 2) is correct, [-∞, 2) is not.

OpenStax College Algebra 2e, sections 1.1 and 2.7, covers these rules in the context of linear and absolute value inequalities. The calculator enforces them: if you type a bracket with infinity, it returns an error message.

Worked Conversions: Inequality to Interval Notation

Converting an inequality into interval notation follows a three-step process: identify the lower and upper bounds, check whether each bound is included, then write the interval with the correct brackets. Here are two examples that cover the common patterns.

Example 1: -3 ≤ x < 7

The lower bound is -3, and the inequality uses ≤, so the lower endpoint is included: use a left bracket [. The upper bound is 7, and the inequality uses <, so the upper endpoint is excluded: use a right parenthesis ). The interval is [-3, 7). The calculator also produces the set-builder notation { x ∈ ℝ | -3 ≤ x < 7 }.

Example 2: x > 2

This inequality has no upper bound, it extends to positive infinity. The lower bound is 2, excluded because the inequality uses >, so the left symbol is a parenthesis. The right bound is ∞, which always takes a parenthesis. The interval is (2, ∞). The set-builder notation is { x ∈ ℝ | x > 2 }.

Compound 'Or' Inequalities

When the solution set is two separate regions, you need the union symbol. For x < -1 or x ≥ 3, the intervals are (-∞, -1) and [3, ∞), combined as (-∞, -1) ∪ [3, ∞). The calculator handles this automatically: if you type the inequality x < -1 or x ≥ 3 into the inequality input, it returns the union. If you type the union directly into the interval input, it parses the two pieces separately and shows the combined result.

Reading the Number Line

The number line visualization is the most direct way to check your work. The calculator draws a horizontal line, shades the region that belongs to the interval, and marks each endpoint with either a filled circle (●) for closed (included) or an open circle (○) for open (excluded). An arrow extending left or right from the shaded region indicates that the interval continues without bound in that direction.

When the result is a union of two disjoint intervals, the calculator shades each region separately, with an unshaded gap between them. For example, the union (-∞, 2) ∪ (5, ∞) shows shading from the left edge to 2 (open circle at 2), a gap from 2 to 5, then shading from 5 (open circle at 5) to the right edge. If the intervals overlap, the calculator merges them into a single shaded region before drawing.

The legend at the bottom of the calculator display reminds you of the circle conventions. Always compare the number line to the inequality you typed: if the inequality says x ≤ 3, the number line should show a filled circle at 3 and shading to the left. If you see an open circle where you expected a closed one, check the inequality sign. The calculator is showing you exactly what you typed.

Interval ↔ Inequality ↔ Number Line: the 9 Basic Cases
IntervalInequalityNumber Line Description
(a, b)a < x < bOpen circles at a and b; shading between them
[a, b]a ≤ x ≤ bFilled circles at a and b; shading between them
(a, b]a < x ≤ bOpen circle at a; filled circle at b; shading between
[a, b)a ≤ x < bFilled circle at a; open circle at b; shading between
(a, ∞)x > aOpen circle at a; shading and arrow to the right
[a, ∞)x ≥ aFilled circle at a; shading and arrow to the right
(-∞, b)x < bOpen circle at b; shading and arrow to the left
(-∞, b]x ≤ bFilled circle at b; shading and arrow to the left
(-∞, ∞)x ∈ ℝEntire line shaded with arrows at both ends

Common Pitfalls and How the Calculator Catches Them

The most frequent error is using a bracket with infinity. The calculator blocks this at parse time: if you type [5, ∞], it returns an error saying "Infinity cannot be included (use open bracket)." The same applies to negative infinity. If you see this error, change the bracket next to infinity to a parenthesis.

The second most common mistake is writing the endpoints in the wrong order. Interval notation always goes from smallest to largest number on the number line. If you type (7, 2), the calculator rejects it with "the left endpoint (7) is greater than the right endpoint (2)." Reverse the numbers so the left endpoint is smaller.

A third error is forgetting the union symbol between disjoint intervals. If you type (-∞, 2)(3, ∞) without the ∪, the calculator cannot parse it. Add the union: (-∞, 2) ∪ (3, ∞). The calculator accepts both the ∪ symbol and the capital letter U as an alternative.

Finally, some users write [ ] or ( ) to mean an empty set. Those are not standard symbols. The correct notation for the empty set is ∅ or { }. If the calculator returns ∅, it means no real numbers satisfy your input, not that you made a syntax error.

Common Questions

How do I write 'all real numbers' in interval notation?

The interval notation for the set of all real numbers is (-∞, ∞). This is an unbounded interval that extends infinitely in both directions. It is equivalent to writing ℝ or { x | x ∈ ℝ }. Because both endpoints are infinity, both use parentheses.

What does the empty set (∅) mean in the calculator output?

The empty set means that no real number satisfies the condition you entered. For example, if you try to find the intersection of (2, 5) and (7, 10), the calculator returns ∅ because no number is in both intervals. It does not mean your input was wrong, it means the set has no elements.

Why does infinity always use a parenthesis and never a bracket?

Infinity is not a number that can be reached or included in a set. A bracket would imply that the interval includes infinity as an endpoint, which is impossible. The parenthesis indicates that the interval extends without bound but never actually includes infinity itself.

How do I represent a single point, like x = 5, in interval notation?

A single point is written as a closed interval [5, 5], called a singleton. The left and right endpoints are the same number, and both brackets are closed because the point is included. The inequality form is x = 5, and the set-builder notation is { x ∈ ℝ | x = 5 }.

Can I use the calculator to convert set-builder notation to interval notation?

Yes. In Convert Notation mode, select Inequality as the input type and type the inequality part of the set-builder notation (the condition after the vertical bar). For example, for { x ∈ ℝ | x > 3 }, type x > 3. The calculator returns the interval (3, ∞) and draws the number line.

Guides on this site