Interval Notation Calculator

This interval notation calculator converts an inequality such as −2 < x ≤ 4 into interval notation, turns an interval like (−∞, 3] ∪ [5, ∞) back into an inequality, and draws the set on a number line. It solves linear inequalities first, so you can type 2x + 1 > 5 directly.

Convert to or from interval notation

Enter an inequality (use <=, >= or ≤, ≥, and "or"/"and") or an interval (use U or ∪ and "inf" for ∞).

Examples: -2 < x <= 4, x < -1 or x >= 4, 2x + 1 > 5, [-3, 0) U (2, inf)

How to use the interval notation calculator

  1. Type an inequality such as -2 < x <= 4, or a linear inequality such as 3 - 2x >= 7 that still needs solving. Join two conditions with "and" or "or".
  2. Or type an interval such as [-3, 0) U (2, inf) to convert it back into inequality form.
  3. Prefer clicking? Switch to Build from endpoints, enter the two endpoints, and choose which ones are included.
  4. Press Convert with Steps to see the interval, the matching inequality, the reasoning, and a number line with open or filled endpoints.

How interval notation works

An interval is written as (left, right) with the smaller endpoint first. The symbol next to each endpoint tells you whether that endpoint belongs to the set: a square bracket [ ] means included (≤ or ≥), a parenthesis ( ) means excluded (< or >). Unbounded sides use −∞ or ∞, which always take a parenthesis. Separate pieces are joined with the union symbol ∪.

InequalityInterval notationNumber line
x > a(a, ∞)Open dot at a, shade right
x ≥ a[a, ∞)Filled dot at a, shade right
x < b(−∞, b)Open dot at b, shade left
x ≤ b(−∞, b]Filled dot at b, shade left
a < x ≤ b(a, b]Shade between, open at a, filled at b
x < a or x > b(−∞, a) ∪ (b, ∞)Two rays pointing outward
x ≠ a(−∞, a) ∪ (a, ∞)Whole line with a hole at a
all real numbers(−∞, ∞)Whole line shaded

Worked examples

Worked example 1: −2 < x ≤ 4

The smaller endpoint is −2 and it is excluded (strict <), so the interval starts with "(−2". The larger endpoint is 4 and it is included (≤), so it ends with "4]". Answer: (−2, 4].

Worked example 2: x ≥ 3

The set starts at 3, which is included, and continues forever to the right. The right side is ∞ and always takes a parenthesis. Answer: [3, ∞).

Worked example 3: 2x + 1 > 5

Solve first. Subtract 1 from both sides: 2x > 4. Divide by 2: x > 2. The endpoint 2 is excluded. Answer: (2, ∞). If you divide by a negative number while solving, reverse the sign before converting.

Worked example 4: x < −1 or x ≥ 4

"Or" produces two pieces. x < −1 is (−∞, −1) and x ≥ 4 is [4, ∞). Join them with a union, smaller piece first. Answer: (−∞, −1) ∪ [4, ∞).

Worked example 5: [−3, 0) ∪ (2, ∞) back to an inequality

Read each piece separately. [−3, 0) includes −3 but not 0, so −3 ≤ x < 0. (2, ∞) excludes 2, so x > 2. The union becomes "or". Answer: −3 ≤ x < 0 or x > 2.

Common mistakes to avoid

  • Putting a bracket next to infinity. [3, ∞] is wrong; infinity is never reached, so write [3, ∞).
  • Writing the endpoints in the wrong order. x < 5 is (−∞, 5), not (5, −∞). The left number must always be the smaller one.
  • Confusing the interval (2, 5) with the point (2, 5). In interval notation (2, 5) means every number strictly between 2 and 5, not a coordinate pair.
  • Using ∪ for "and". An "and" statement is the overlap of the conditions, which usually gives one interval. Only "or" statements need a union.
  • Forgetting to flip the sign first. −2x ≤ 6 gives x ≥ −3, so the answer is [−3, ∞), not (−∞, −3].

Frequently asked questions

What is interval notation?

Interval notation writes a set of real numbers using its two endpoints. Parentheses ( ) mean an endpoint is excluded and square brackets [ ] mean it is included, so [2, 5) means every number from 2 up to but not including 5, the same as 2 ≤ x < 5.

When do I use a parenthesis and when do I use a bracket?

Match the bracket to the inequality sign. Strict signs (< or >) use a parenthesis because the endpoint is not part of the set. Inclusive signs (≤ or ≥) use a square bracket because the endpoint is included. For example, x > −1 becomes (−1, ∞) and x ≥ −1 becomes [−1, ∞).

Why does infinity always get a parenthesis?

Infinity is not a real number, so the set can never actually reach or include it. That is why you write [3, ∞) and never [3, ∞]. The same rule applies to negative infinity: (−∞, 4], not [−∞, 4].

What does the ∪ symbol mean in interval notation?

The union symbol ∪ joins two or more separate intervals into one answer. It corresponds to the word "or". For example, x < −1 or x ≥ 4 is written (−∞, −1) ∪ [4, ∞).

How do you write all real numbers or no solution in interval notation?

All real numbers is written (−∞, ∞). An inequality with no solution has an empty solution set, written ∅ or { }. A single number such as x = 3 is not an interval; write it in set notation as {3}.

How do you write x ≠ a in interval notation?

Remove the single point a from the number line and join the two remaining pieces with a union. For example, x ≠ 7 becomes (−∞, 7) ∪ (7, ∞). Both parentheses around 7 are open because 7 is excluded.

Stuck on a word problem?

Snap a photo and get step-by-step help turning the words into an inequality and the inequality into an answer.

Snap a photo and get step-by-step help →

How interval notation works

Formula

x ≥ a becomes [a, ∞)

Square brackets include a finite endpoint; parentheses exclude an endpoint and are always used with infinity.

Worked example

−2 < x ≤ 4 becomes (−2, 4].

Common mistake

Never use a square bracket next to positive or negative infinity.