By Tim King · Updated
Inequality Calculator
Interval Notation and Number Line for Linear and Compound Inequalities
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Inequality Calculator works
This inequality calculator solves linear inequalities such as 3x − 4 ≤ 11 and double inequalities such as −4 < 2x + 2 ≤ 10. It shows each step, flags the moment the sign flips, and gives the answer in interval notation with a number-line description and a value that checks it. Type ≤ and ≥ directly, or use <= and >=.
An inequality is solved like an equation: do the same thing to every side until the variable is on its own. The answer is a range of values rather than a single number, so it is written as an inequality, an interval or a shaded stretch of the number line.
How the inequality calculator works
The formula for a single inequality is to collect terms into ax < k, then divide by a, giving x < k ÷ a. One rule is different from equations: dividing or multiplying by a negative number reverses the sign, so < becomes > and ≤ becomes ≥. For a double inequality the same steps apply to all three parts at once.
First example. −3x + 7 ≤ 22. Subtract 7: −3x ≤ 15. Divide by −3 and flip: x ≥ −5, which is [−5, ∞) in interval notation.
Second example. −4 < 2x + 2 ≤ 10. Subtract 2 from all three parts: −6 < 2x ≤ 8. Divide by 2: −3 < x ≤ 4, or (−3, 4].
How many tickets at 12 each can you buy with 100 after a 7 booking fee? 12t + 7 ≤ 100 gives t ≤ 7.75, so 7 tickets.
Linear inequalities with their solution and interval notation
| Inequality | Solution | Interval |
|---|---|---|
| x + 5 < 12 | x < 7 | (−∞, 7) |
| 2x ≥ 9 | x ≥ 9/2 | [9/2, ∞) |
| 3x - 4 ≤ 11 | x ≤ 5 | (−∞, 5] |
| -2x > 8 | x < -4 | (−∞, -4) |
| -3x + 7 ≤ 22 | x ≥ -5 | [-5, ∞) |
| 5 - x < 2 | x > 3 | (3, ∞) |
| x/4 ≥ 3 | x ≥ 12 | [12, ∞) |
| -x/2 < 6 | x > -12 | (-12, ∞) |
| 4x + 1 > 2x + 9 | x > 4 | (4, ∞) |
| 7 - 3x ≥ x - 5 | x ≤ 3 | (−∞, 3] |
| 2(x - 3) < 10 | x < 8 | (−∞, 8) |
| 3(2x + 1) ≥ 4x - 7 | x ≥ -5 | [-5, ∞) |
| 0.5x + 2 ≤ 6 | x ≤ 8 | (−∞, 8] |
| 6x < 6x + 1 | Every real number | (−∞, ∞) |
| 2x + 3 > 2x + 5 | No solution | ∅ (empty set) |
| -4 < 2x + 2 ≤ 10 | -3 < x ≤ 4 | (-3, 4] |
| 1 ≤ x - 3 < 5 | 4 ≤ x < 8 | [4, 8) |
| -6 ≤ -3x ≤ 9 | -3 ≤ x ≤ 2 | [-3, 2] |
| 0 < 5x < 20 | 0 < x < 4 | (0, 4) |
| -1 ≤ (x + 1)/2 ≤ 3 | -3 ≤ x ≤ 5 | [-3, 5] |
| 10 > 4 - 2x > -2 | -3 < x < 3 | (-3, 3) |
| 3 < 2x - 1 < 3 | No solution | ∅ (empty set) |
Tips
- Brackets mean "not included". ( and ) go with < and >; [ and ] go with ≤ and ≥.
- Infinity always takes a round bracket. It is never reached, so it cannot be included.
- Test a value. Put a number from your answer back in; the calculator's Check line does this for you.
FAQ
Why does the inequality sign flip when you divide by a negative?
Multiplying by a negative reverses the order of numbers. 2 < 5 is true, but −2 < −5 is false; the correct statement is −2 > −5. The same thing happens to any inequality, so the sign must turn round whenever both sides are multiplied or divided by a negative number.
How do you write an inequality in interval notation?
Write the lowest and highest values in brackets. Use a square bracket when the end value is included (≤ or ≥) and a round one when it is not (< or >). x ≥ −5 becomes [−5, ∞), and −3 < x ≤ 4 becomes (−3, 4]. Infinity always gets a round bracket.
What is a compound inequality?
It joins two conditions on the same variable. The "and" kind, written −4 < 2x + 2 ≤ 10, means both must hold, so the answer is the stretch between two values. The calculator handles this three-part form, solving all parts together so the variable ends up alone in the middle.
What does it mean when an inequality has no solution?
The variable terms cancel and leave a false statement such as 3 > 5, or a double inequality squeezes down to nothing, as in 3 < 2x − 1 < 3. When the leftover statement is always true, such as 0 < 1, every real number is a solution and the whole number line is shaded.
See also: all Algebra and Geometry tools, Arithmetic, Number Theory, Statistics, Trigonometry and Calculus.
Related tools
Linear Equation Calculator
Solve one-variable linear equations with full working.
System Of Equations Calculator
Solve simultaneous equations with every elimination step.
Slope-Intercept Form Calculator
Slope, intercepts and every form of a line from two points.
Proportion Calculator
Find the missing number in a/b = c/d, with the cross multiplication shown.
Arc Length And Sector Area Calculator
Arc length, sector area, chord and segment from radius and angle.