Interval Notation Calculator

This interval notation calculator converts both ways: enter an inequality such as −2 < x ≤ 5 or x < −1 or x ≥ 3, or an interval such as (−∞, 4] ∪ (6, ∞), and get the interval notation, the inequality, set-builder notation, the type of interval and its length.

Source: Wikipedia, Interval (mathematics): open (a, b), closed [a, b], half-open (0, 1] = 0 < x ≤ 1 and [0, 1) = 0 ≤ x < 1, unbounded intervals with ±∞, reversed brackets ]a, b[ per ISO 31-11 (read 15.10.2026). Updated: .

Use <, <=, >, >= (or ≤ ≥), “or” / “and”, brackets ( ) [ ] and ∞ or inf. Examples: x >= 3, 0 < x < 1, (-inf, 2] U [5, 7).
My ToolboxYour inputs are saved in this browser only.

Result

Interval notation
(−2, 5]
All notations
NotationResult
Interval notation(−2, 5]
With reversed brackets (ISO 31-11)]−2, 5]
Inequality−2 < x ≤ 5
Set-builder notation{x ∈ ℝ | −2 < x ≤ 5}
Typehalf-open interval
Length7
Calculated exactly from your bounds: overlapping or touching parts of a union are merged, “and” takes the intersection. ∞ is never included, so it always gets a round bracket.

How it is calculated

Interval notation writes a set of numbers with its two bounds. A square bracket [ ] means the bound is included (≤, ≥), a round bracket ( ) means it is not (<, >). So −2 < x ≤ 5 is written (−2, 5].

Examples

InequalityInterval notation
−2 < x ≤ 5(−2, 5]
x ≥ 3[3, ∞)
x < 1(−∞, 1)
x < −1 or x ≥ 3(−∞, −1) ∪ [3, ∞)

Rules

To solve an inequality first, use the inequality solver; to see the interval on a graph, try the graphing calculator.

Length and type

[0, 1) is half-open with length 1; [3, 3] is a single point with length 0; any interval with ∞ is unbounded. For unions the lengths of the separate pieces add up.

Frequently asked questions

How do you write an inequality in interval notation?

Write the smaller bound first, then the larger one. Use [ ] for ≤ or ≥ and ( ) for < or >. Example: −2 < x ≤ 5 becomes (−2, 5].

How is x ≥ 3 written in interval notation?

[3, ∞). The 3 is included, infinity never is.

What does the U mean in interval notation?

It is the union sign ∪ and stands for “or”: (−∞, −1) ∪ [3, ∞) means x < −1 or x ≥ 3.

What is the difference between ( and [ ?

A round bracket excludes the bound, a square bracket includes it. (0, 1] contains 1 but not 0.

How do you write all real numbers in interval notation?

(−∞, ∞), also written ℝ.

Sources and legal basis

As of: · Editorial policy

Related tools