Skip to content

Interval Notation Calculator: Inequality ↔ Interval

Turn an inequality into interval notation and back, with set-builder form, length, union and intersection.

Your details

Start from

Leave blank for −∞ (no lower limit).

Lower end

Leave blank for +∞ (no upper limit).

Upper end

Results update as you type

Interval notation

[−2, 5)

Inequality
−2 ≤ x < 5
Set-builder notation
{x ∈ ℝ | −2 ≤ x < 5}
Type of set
Half-open (half-closed) and bounded
Total length
7

Step-by-step solution
  1. Bracket [ ] = endpoint included (≤, ≥); parenthesis ( ) = endpoint excluded (<, >).

Interval notation is the compact way to write a set of real numbers between two endpoints. A square bracket means the endpoint belongs to the set and a parenthesis means it does not: [2,5)[2, 5) is every number from 2 up to, but not including, 5. Infinity is never a number you can reach, so it always takes a parenthesis, as in (−∞,3](-\infty, 3]. Solutions of linear and compound inequalities, domains and ranges of functions, and confidence intervals are all written this way.

This interval notation calculator works in three directions. With Bounds, enter a lower and upper limit (leave one blank for infinity) and choose whether each end is included. With Text, type an interval such as [2, 5) or an inequality such as -2 <= x < 5 or x < 0 or x >= 4; the calculator reads it and rewrites it in every other form. With Two intervals, it finds the union A∪BA \cup B or the intersection A∩BA \cap B, merging overlapping pieces automatically.

For every result you get the interval notation, the equivalent inequality, the set-builder notation {x∈R∣…}\{x \in \mathbb{R} \mid \ldots\}, the type of interval (closed, open, half-open, unbounded, single point or empty) and its total length. French-style notation with outward brackets, such as ]2;5]]2 ; 5], is also understood and is used on the French version of this page. To solve an inequality first, use the inequality solver.

How to use this calculator

  1. Choose how to start: Bounds, Text or Two intervals.
  2. Bounds: type aa and bb, leaving a field blank for −∞-\infty or +∞+\infty, and mark each end as included or excluded.
  3. Text: type an interval or an inequality. Use inf for ∞, <= and >= for ≤ and ≥, and or or U to join pieces.
  4. Two intervals: type A and B and pick union or intersection.
  5. Read the interval notation at the top, then the inequality, set-builder form, type and length.

The formula

The four bounded intervals with endpoints a<ba < b are

Interval Inequality Name
[a,b][a, b] a≤x≤ba \le x \le b closed
(a,b)(a, b) a<x<ba < x < b open
[a,b)[a, b) a≤x<ba \le x < b half-open
(a,b](a, b] a<x≤ba < x \le b half-open

and the unbounded ones are [a,∞)⇔x≥a[a, \infty) \Leftrightarrow x \ge a, (a,∞)⇔x>a(a, \infty) \Leftrightarrow x > a, (−∞,b]⇔x≤b(-\infty, b] \Leftrightarrow x \le b, (−∞,b)⇔x<b(-\infty, b) \Leftrightarrow x < b and (−∞,∞)=R(-\infty, \infty) = \mathbb{R}.

Set-builder notation: [a,b)={x∈R∣a≤x<b}[a, b) = \{x \in \mathbb{R} \mid a \le x < b\}.

Length: a bounded interval has length b−ab - a, whether or not its ends are included; an unbounded interval has infinite length.

Union and intersection: x∈A∪Bx \in A \cup B when x∈Ax \in A or x∈Bx \in B; x∈A∩Bx \in A \cap B when x∈Ax \in A and x∈Bx \in B. For two intervals, the intersection runs from the larger lower bound to the smaller upper bound, and is empty if those cross.

Worked example

From bounds. a=−2a = -2 included and b=5b = 5 excluded give [−2, 5), the inequality −2 ≤ x < 5, set-builder {x ∈ ℝ | −2 ≤ x < 5} and length 7.

From an inequality. x > 1.5 becomes (1.5, ∞) (unbounded, open (an open ray)).

Back to an inequality. (-inf, 3] reads as x ≤ 3, with infinite length.

Union. [1,5]∪(3,8)[1, 5] \cup (3, 8) = [1, 8): the pieces overlap, so they merge into one interval of length 7.

Intersection. [1,5]∩(3,8)[1, 5] \cap (3, 8) = (3, 5], the numbers in both, i.e. 3 < x ≤ 5.

A gap. x < 0 or x >= 4 gives (−∞, 0) ∪ [4, ∞), and (−∞,2)∩(2,∞)(-\infty, 2) \cap (2, \infty) is ∅: the only shared candidate, 2, is excluded from both.

Brackets or parentheses? Common mistakes

  • Infinity always gets a parenthesis. [3,∞][3, \infty] is wrong because no real number equals ∞.
  • Write the smaller number first. (5,2)(5, 2) is not a valid interval; the set 2<x<52 < x < 5 is (2,5)(2, 5).
  • "Or" means union, "and" means intersection. x<−1x < -1 or x>1x > 1 is (−∞,−1)∪(1,∞)(-\infty, -1) \cup (1, \infty), two pieces. x>−1x > -1 and x<1x < 1 is the single interval (−1,1)(-1, 1).
  • A single number is written {3}\{3\} or [3,3][3, 3], never (3,3)(3, 3), which is empty.
  • Reversed inequalities such as 5>x≥25 > x \ge 2 are the same set as 2≤x<52 \le x < 5, so [2,5)[2, 5).

On a number line, an included endpoint is drawn as a filled dot and an excluded one as an open circle; the greater than / less than tool helps compare endpoints.

French and international notation

In France and many French-speaking countries, an excluded endpoint is shown by a bracket turned outward instead of a parenthesis, and a semicolon separates the bounds because the comma is the decimal mark: [2;5[[2 ; 5[ is the same set as [2,5)[2, 5), and ]−∞;3]]-\infty ; 3] is (−∞,3](-\infty, 3]. The calculator accepts both styles in the text fields, whichever page language you use.

Frequently asked questions

How do you write x ≥ 3 in interval notation?

x ≥ 3 includes 3 and goes on forever to the right, so it is [3, ∞). The bracket shows that 3 is included, and the parenthesis next to ∞ shows that infinity is not a number in the set.

What is the difference between ( ) and [ ] in interval notation?

A square bracket means the endpoint is part of the set (≤ or ≥); a parenthesis means it is excluded (< or >). (2, 5] contains 5 but not 2.

How do I write "x < −1 or x > 1" as an interval?

An "or" between two inequalities is a union: (−∞, −1) ∪ (1, ∞). Type it in Text mode exactly as written, using or between the pieces.

What is set-builder notation?

It describes a set by the property its elements share: {x ∈ ℝ | 2 ≤ x < 5} reads "all real x such that x is at least 2 and less than 5". It is equivalent to the interval [2, 5).

Can the intersection of two intervals be empty?

Yes, when they do not overlap. (−∞, 2) ∩ (2, ∞) = ∅ because 2 is excluded from both. [1, 2] ∩ [2, 3] = {2}, a single point, because both include 2.

Sources

Last updated:

More Math calculators

People also use