The interval notation calculator above translates between the two ways mathematics writes down a set of numbers: the inequality form you use while solving a problem, and the interval form you are usually asked to give as the final answer. It works in both directions, and it handles the parts that trip people up — compound inequalities with the variable in the middle, unions of two disjoint pieces joined by the word or, and unbounded sets that run off to infinity in one or both directions.
Arb Digital builds these free maths tools the way we build client dashboards: the conversion alone is not the point, understanding why each bracket is the shape it is matters more. So alongside the converted answer you get the matching form in the other notation, a count of how many separate pieces the set breaks into, its total length, and a working line that explains each bracket choice using the numbers you actually typed.
What This Interval Notation Calculator Does
Choose a direction, type your expression, and press Convert. In inequality mode the tool accepts simple statements such as x > 3, compound statements with the variable trapped in the middle such as −2 ≤ x < 5, and unions written with the word or. In interval mode it accepts single intervals such as [2, 7) and unions joined with U or the union symbol, with inf, infinity or the infinity symbol accepted for an unbounded end.
Whichever direction you choose, the tool returns both forms, so you can check one against the other. It also normalises the result: overlapping or touching pieces are merged, the pieces are sorted left to right, and an impossible statement such as 5 < x < 2 is reported as the empty set rather than printed back at you. The grid shows the total length of the set, infinite whenever any piece is unbounded, and the count of pieces after merging — a quick way to confirm a union really was disjoint.
How to Use It
- Pick your direction in the first field. The example in the expression box changes to match, so you always have a valid template in front of you.
- Type your expression. Use <= and >= for the inclusive signs, and the word or between pieces of a union. Both −2 ≤ x < 5 and its reversed form 5 > x ≥ −2 are accepted.
- Set the variable letter if you are working in something other than x, so the inequality output reads correctly.
- Press Convert. The interval form, the inequality form, the piece count and the total length update together.
- Read the working line to see why each bracket came out square or round, and to catch any piece that was merged or discarded.
The Rule: Square Brackets Include, Round Brackets Exclude
Interval notation is a shorthand for a set of real numbers described by its two endpoints, and the only decision to make at each end is whether that endpoint belongs to the set. A square bracket means included, and it pairs with the inclusive inequality signs ≤ and ≥. A round bracket, properly called a parenthesis, means excluded, and it pairs with the strict signs < and >.
So x ≥ 4 becomes [4, ∞) and x > 4 becomes (4, ∞). The compound statement −2 ≤ x < 5 becomes [−2, 5), square on the left because −2 is allowed and round on the right because 5 is not. The two brackets are decided independently, and half-open intervals of that mixed shape are the most common kind in practice, which is why [0, 1) turns up so often in probability and computing. The formal definitions of open, closed and half-open intervals are set out in the Wolfram MathWorld entry on intervals.
Why Infinity Always Gets a Round Bracket
This is the rule that gets marked wrong most often, and the reason is worth understanding rather than memorising. A square bracket asserts that the endpoint is a member of the set. Infinity is not a real number, so it cannot be a member of any set of real numbers, and writing [3, ∞] claims something false: that there exists a largest real number and it is in your set. There is no such number. Every real number, however large, has a larger one after it.
The bracket next to ∞ is therefore always round, and the same applies to −∞ on the left: (−∞, 7] is correct and [−∞, 7] is not. Note that the bracket at the other end is unaffected and still follows the ordinary rule, so (−∞, 7] is square on the right because 7 genuinely is included. Infinity here is a statement about the set being unbounded, not a value the set reaches. The MathWorld entry on infinity covers the distinction between infinity as a limiting concept and the extended real line where symbols for infinity are adjoined deliberately.
The set of all real numbers is written (−∞, ∞), round at both ends for exactly this reason. If you ever see it written with square brackets, the author is either working on the extended real line, where those two symbols have been added as genuine points, or has made a mistake. In an algebra or calculus course, it is a mistake.
Compound Inequalities: The and Case and the or Case
A compound inequality joins two conditions, and which word joins them changes the answer completely. An and statement requires both conditions at once, so the answer is the overlap of the two, and when the overlap is a single stretch of the number line it is written as one interval. This is what the middle-variable form −2 ≤ x < 5 means: it is shorthand for x ≥ −2 and x < 5, and it produces [−2, 5).
An or statement is satisfied by anything meeting either condition, so the answer is the union of the two, written with the ∪ symbol between them. The solution of x < −1 or x > 4 is (−∞, −1) ∪ (4, ∞), two separate pieces with a gap between them that no single interval can express. That gap is the entire reason the union symbol exists.
Two traps live here. The first is writing an or answer as a middle-variable inequality: 4 < x < −1 is not a rewriting of the union above, it is satisfied by nothing at all, because no number is both greater than 4 and less than −1. That middle form is only legal when the left number is smaller than the right. The second trap is failing to notice that an or can cover the whole line: x < 5 or x > 1 is true for every real number. The calculator merges overlapping pieces automatically, so it collapses that to (−∞, ∞) and tells you it did.
A Fully Worked Example You Can Check
Take the default input, −2 ≤ x < 5 or x > 9.
Piece one. The compound −2 ≤ x < 5 has the variable in the middle, so both conditions apply together. The left endpoint −2 uses ≤, which is inclusive, so its bracket is square. The right endpoint 5 uses <, which is strict, so its bracket is round. That gives [−2, 5).
Piece two. The simple statement x > 9 is unbounded above. The lower endpoint 9 uses >, which is strict, so its bracket is round, and the upper end runs to infinity, which is always round. That gives (9, ∞).
Combine. The word or makes this a union, and the two pieces do not overlap or touch — the first ends at 5 and the second starts at 9, leaving the numbers from 5 to 9 outside the set. So no merging happens and the final answer is [−2, 5) ∪ (9, ∞). In set-builder form that is the set of all real x such that −2 ≤ x < 5 or x > 9. The total length is infinite because the second piece is unbounded, and the piece count is two.
Endpoints That Touch: When Two Pieces Become One
Adjacent pieces need care, because whether they merge depends on the brackets and not just the numbers. The union [1, 3) ∪ [3, 6] merges cleanly into [1, 6], because 3 is excluded from the first piece but included in the second, so every number from 1 to 6 is covered.
Change one bracket and the answer changes. The union [1, 3) ∪ (3, 6] does not merge, because the single number 3 is excluded from both pieces and therefore is not in the set. The union has to stay written as two pieces, and it describes the interval from 1 to 6 with a single point punched out of the middle. That set turns up constantly when you find the domain of a rational function: the denominator vanishes at one value, so that one value is removed and the domain becomes a union of two pieces around it.
The reverse case is the degenerate interval [4, 4], which contains exactly one number and is perfectly valid, while (4, 4) is the empty set. Any interval written with its endpoints in the wrong order is empty too, and the calculator discards those rather than displaying a backwards interval.
Interval Notation Beyond Solving Inequalities
The notation earns its keep well past the algebra chapter it is introduced in. Domain and range are almost always stated as intervals: the domain of the square root function is [0, ∞), square on the left because the square root of zero is defined, and the range of the sine function is [−1, 1], square at both ends because both values are actually attained. Getting those brackets right is the difference between a correct answer and a nearly correct one, and it is the same judgement the square root calculator forces when you ask it for the root of zero versus a negative number.
In calculus, the distinction between open and closed drives the theorems themselves. The extreme value theorem guarantees a maximum and a minimum on a closed bounded interval [a, b], and quietly fails on the open interval (a, b), where a function can climb forever towards an endpoint it never reaches. Statistics uses the same brackets for the class boundaries of a grouped frequency table, where a value landing exactly on a boundary must fall in one class and only one — which is why those classes are written half-open, and why the mean, median and mode calculator needs unambiguous class edges to bin data correctly.
Reading an Interval Back as an Inequality
Going the other way is mechanical once the bracket rule is internalised. Each interval becomes a statement about the variable: the left bracket gives the lower bound using ≥ if square and > if round, and the right bracket gives the upper bound with ≤ if square and < if round. An infinite end contributes nothing, because there is no bound to state.
So [−3, 8) becomes −3 ≤ x < 8, written as a single compound statement because both bounds are finite. (−∞, 2] becomes x ≤ 2 alone, since the left end imposes no restriction. And [0, 4) ∪ (6, ∞) becomes 0 ≤ x < 4 or x > 6, with the word or restored between the pieces. Reverse conversion is a useful habit even when you are not asked for it: converting your interval answer back into an inequality and checking it against the original problem catches bracket errors immediately, in the same way that substituting a root back catches sign errors when you use the quadratic equation solver.
Arb Digital builds fast, dependency-free interactive tools that rank — the same approach behind every free calculator on this site. Browse the library or tell us what you need built.
Browse Free Tools Talk To UsCommon Mistakes to Avoid
- Putting a square bracket next to infinity. [3, ∞] is always wrong. Infinity is not a real number, so it can never be an included endpoint.
- Writing a union as a middle-variable inequality. The solution x < −1 or x > 4 cannot be compressed into 4 < x < −1, which describes nothing at all.
- Reversing the endpoints. Intervals are always written smallest first. (7, 2) is not the numbers between 2 and 7; it is empty.
- Matching the bracket to the wrong sign. Strict signs take round brackets and inclusive signs take square ones, and each end is decided separately.
- Forgetting to remove a punctured point. If a value is excluded from the middle of a range, the answer is a union of two pieces, not one interval.
Related Free Tools From Arb Digital
Interval notation is usually the final step after solving something else, so pair this tool with the quadratic equation solver for the boundary points of a quadratic inequality, the absolute value equation calculator when the bounds come from a distance condition, and the discriminant calculator to check whether real boundary points exist at all. For endpoints that come out as awkward fractions, the fraction calculator keeps them exact, and the scientific calculator handles any arithmetic in between. The full free online tools hub lists everything else we have built.
Frequently Asked Questions
A square bracket means the endpoint is included in the set and matches the signs less than or equal to and greater than or equal to. A round bracket means the endpoint is excluded and matches the strict less than and greater than signs.
Because infinity is not a real number, so it cannot be a member of a set of real numbers. A square bracket would claim the set contains a largest element, and no such element exists.
If the two parts are joined by and, take the overlap and write it as a single interval. If they are joined by or, write each part as its own interval and join them with the union symbol.
It joins two or more separate intervals into one set, meaning a number qualifies if it lies in any of them. It is needed whenever the solution has a gap that no single interval can describe.
No. Intervals are always written with the smaller number first. An interval whose left endpoint is larger than its right endpoint contains no numbers and is the empty set.
Write it as negative infinity to positive infinity with round brackets at both ends. Both brackets are round because neither infinity symbol is a real number that the set can contain.
Only if at least one of them includes that endpoint. If both brackets at the shared point are round, that single value belongs to neither piece, so the union stays written as two separate intervals.
This calculator is provided for study and reference. Check the converted result against your original problem before relying on it, particularly the bracket at each endpoint.