Math calculator

Interval Notation Calculator

Four ways of writing one set, converting in every direction — with the brackets and the picture guaranteed to agree.

Convert between the four forms

Type any one of them — the other three follow.

Use <= and >= for ≤ and ≥, “or” or U for a union, and inf for infinity.

read as an inequality

(2, 5]

every number between 2 and 5, including 5 but not 2

Interval notation

(2, 5]

1 piece

Inequality

2 < x ≤ 5

the same set, written with symbols

Set-builder

{x ∈ ℝ | 2 < x ≤ 5}

the same set, written as a condition

Total length

3

bounded on both ends

On a number line

25

A filled circle means the endpoint is included — that is ≤ or ≥, and a square bracket. A hollow one means it is not.

The four forms are the same set written four ways. The number line above is drawn from the same interval list that produced the notation, so the picture and the brackets cannot disagree.

What this tool shows

Type any one of the four forms and get the other three — with the number line drawn from the same set that produced the brackets.

  • Inequality, interval, set-builder and number line, converting in every direction
  • Absolute-value conditions, inside and outside
  • Unions written with ∪, U, or the word "or"
  • The empty set and the whole line reported as the real answers they are
All four forms, both directions Exact rational endpoints Unions and absolute values Free, no signup

Free, no signup — exact endpoints, and the picture matches the brackets.

Updated 6 September 2026 · Works in any browser, no installation

Interval notation writes a set by its endpoints, with a square bracket for an endpoint that is included and a round one for an endpoint that is not. 2 < x ≤ 5 becomes (2, 5]every number between 2 and 5, including 5 but not 2

At a glance

Formula shown
[a, b] includes both endpoints, (a, b) includes neither, and \u221e always takes a round bracket because it is not a number.
Scenario support
Linear and absolute-value conditions in one variable, single or compound.
Educational estimate
Planning support from the values you enter — not professional advice.

Infinity never gets a square bracket

[3, ∞] is wrong. Not stylistically — mathematically. A square bracket says the endpoint is a member of the set, and ∞ is not a number, so no set has it as a member.

x > 3 is (3, ∞): square on the finite side if the inequality is not strict, round on the infinite side always. The two ends of an interval are decided by different considerations, and only one of them is about the inequality symbol.

The same applies at the left: (−∞, 5] is correct and [−∞, 5] is not. This tool will not print the wrong one, which is a small thing until you are checking your own work against it.

“Or” and “and” describe different sets

x < −1 or x ≥ 4 is (−∞, −1) ∪ [4, ∞) — two separate pieces, joined by ∪, and a number qualifies by satisfying either one.

x < 1 and x > 5 is . Nothing is both less than 1 and greater than 5, so the set is empty. That is a correct answer, not a failure to solve.

The error worth naming is writing an “or” condition as a chained inequality. 5 < x < 1 is not a way of writing “x < 1 or x > 5” — a chain always means “and”, and that particular chain describes the empty set. The two conditions genuinely cannot be written as one chain, which is exactly why the ∪ notation exists.

Absolute value is a distance, and the direction flips

|x − a| < b says “x is within b of a”. That is one interval, centred on a, and it is why the answer to |x| < 3 is (−3, 3) — everything within 3 of zero.

Flip the inequality and you get the outside instead. |x - 2| >= 5 says “x is at least 5 away from 2”, which is (−∞, −3] ∪ [7, ∞): two rays going in opposite directions, joined by a union.

So the direction of the inequality decides whether the answer is one interval or two, and reading |x − a| as a distance makes that automatic rather than a rule to remember. The commonest slip is keeping a single interval when the sign flips, which produces an answer with no solutions in it at all.

Which bracket, and which circle

The correspondence is exact, and it is worth stating once:

  • < or > — the endpoint is excluded, so a round bracket and a hollow circle.
  • ≤ or ≥ — the endpoint is included, so a square bracket and a filled circle.
  • ±∞ — always a round bracket, and an arrow rather than a circle.

2 < x ≤ 5 has one of each: (2, 5], hollow at 2 and filled at 5. The number line above the answer is drawn from the same interval list that produced those brackets, so a mismatch between them is impossible here.

Ordering matters too. The smaller endpoint goes first, and an interval written the wrong way round — [5, 2] — is empty rather than backwards. Reversing it is not a notation preference; it changes what the expression means.

Set-builder notation, and what the bar means

{x ∈ ℝ | 2 < x ≤ 5} reads “the set of real x such that 2 < x ≤ 5”. The vertical bar is “such that”, and a colon is used identically by many texts.

Set-builder is more general than interval notation because the condition can be anything, not just a range — {x ∈ ℝ | x² < 4} is perfectly well-formed. Interval notation only describes unions of intervals, which is most of what comes up and not all of it.

Which is why interval notation is the preferred answer when it applies: it is shorter, it makes the endpoints obvious, and unions are visible at a glance. x < 2 or x > 2 is a case where both are natural — (−∞, 2) ∪ (2, ∞) in one and {x ∈ ℝ | x < 2 or x > 2} in the other.

When the answer is nothing, or everything

Two answers surprise people, and both are correct as written. The empty set, ∅, when no number satisfies the condition — and (−∞, ∞), when every number does.

x < 1 and x > 5 gives the first. Two conditions that cannot both hold produce an empty overlap, and ∅ is the right way to write that. Leaving the answer blank, or writing “no solution” where a set was asked for, is a different and less precise thing.

The second turns up with conditions like |x| ≥ 0, which every real number satisfies because an absolute value is never negative. (−∞, ∞) is the whole line, and it is worth recognising as an answer rather than as a sign of a mistake.

Sources and methodology

Interval and set-builder notation are conventions rather than results; the reference below is the standard statement of them.

Method. Every figure on this page comes from src/lib/interval-notation.ts, which holds a solution as a sorted list of disjoint intervals with exact rational endpoints. Unions, intersections and complements are computed on that representation rather than pattern-matched from the input, so touching intervals merge correctly ([1,2] ∪ (2,3] is [1,3]) and an empty result comes out empty. That engine is verified on every change against 49 hand-written assertions, including that every conversion round-trips — an interval parsed and re-rendered gives back the same set — and that the number-line marks always match the printed brackets. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

Graphing Quadratic InequalitiesSolve a quadratic inequality by sign chart rather than by four memorised cases, and shade the region for the two-variable form, with the repeated-root case where all four relations differ.
Union and IntersectionSix set operations on two or three sets at once, with the Venn regions, inclusion-exclusion checked against the real counts, and De Morgan verified on your own sets.
SubsetTest whether one set is a subset, a proper subset, equal or disjoint — and when the answer is no, name the exact element that breaks it.
Quadratic FormulaSolve any quadratic with exact roots — surds stay surds and a negative discriminant gives the complex pair — plus the vertex, the factored form and every step of the working.
System of EquationsSolve linear systems in up to six unknowns with exact fractions — row operations, the matrix form, Cramer’s rule, and the parametric family when there is no single answer.

More in Math, or browse all calculators.

Read the guide

Interval notation is how the answer to an inequality gets written down; solving the inequality comes first. The Graphing Quadratic Inequalities Calculator produces sets of exactly this shape by sign chart, and Which Method Should You Use to Solve a Quadratic? covers the solving step behind them.

Educational use disclaimer

This calculator converts between the standard ways of writing a solution set on the real line, for linear and absolute-value conditions in one variable. Endpoints are exact rationals rather than decimals. It is a notation tool: it does not solve equations, and a condition that needs solving first belongs on one of the solving pages.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (3 updates)

Published 6 September 2026

  1. Published the interval notation page: inequality, interval, set-builder and number-line forms converting in every direction.
  2. Holds solutions as a sorted list of disjoint intervals with exact rational endpoints, so unions, intersections and complements are computed rather than pattern-matched and an empty result comes out empty.
  3. Covers absolute-value inequalities, unions written with ∪ or the word or, and the and/or distinction that turns a compound inequality into an empty set.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.