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: 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 . 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 or the intersection , merging overlapping pieces automatically.
For every result you get the interval notation, the equivalent inequality, the set-builder notation , 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 , 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
- Choose how to start: Bounds, Text or Two intervals.
- Bounds: type and , leaving a field blank for or , and mark each end as included or excluded.
- Text: type an interval or an inequality. Use
inffor ∞,<=and>=for ≤ and ≥, andororUto join pieces. - Two intervals: type A and B and pick union or intersection.
- Read the interval notation at the top, then the inequality, set-builder form, type and length.
The formula
The four bounded intervals with endpoints are
| Interval | Inequality | Name |
|---|---|---|
| closed | ||
| open | ||
| half-open | ||
| half-open |
and the unbounded ones are , , , and .
Set-builder notation: .
Length: a bounded interval has length , whether or not its ends are included; an unbounded interval has infinite length.
Union and intersection: when or ; when and . 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. included and 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, 8): the pieces overlap, so they merge into one interval of length 7.
Intersection. = (3, 5], the numbers in both, i.e. 3 < x ≤ 5.
A gap. x < 0 or x >= 4 gives (−∞, 0) ∪ [4, ∞), and is ∅: the only shared candidate, 2, is excluded from both.
Brackets or parentheses? Common mistakes
- Infinity always gets a parenthesis. is wrong because no real number equals ∞.
- Write the smaller number first. is not a valid interval; the set is .
- "Or" means union, "and" means intersection. or is , two pieces. and is the single interval .
- A single number is written or , never , which is empty.
- Reversed inequalities such as are the same set as , so .
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: is the same set as , and is . 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
- OpenStax, College Algebra 2e, §2.7 Linear Inequalities and Absolute Value Inequalities (interval and set-builder notation)
- Weisstein, E. W., Interval — Wolfram MathWorld
Last updated: