Inequality Calculator — Solve & Graph on a Number Line (Free)

AlgebraFreeNo sign-up

An inequality calculator finds every value of x that makes an inequality true. For 2x + 3 ≤ 11, subtract 3 and divide by 2 to get x ≤ 4, which is (−∞, 4] in interval notation. For x² − x − 6 > 0, the critical points −2 and 3 split the number line, and the answer is x < −2 or x > 3.

Inequality calculator with steps
Reads asx2 − x − 6 > 0
Type <= for ≤ and >= for ≥. Use x^2 for x², |x – 2| for absolute value, and join parts with and / or. Three-part form works too: -3 < 2x + 1 <= 7.
Try:
Solution
Solving x2 − x − 6 > 0
x < −2 or x > 3
Interval notation(−∞, −2) ∪ (3, ∞)
Set-builder notation{x | x < −2 or x > 3}
Sign of x² − x − 6 and solution+−+−23
Filled dot = endpoint included, open dot = not included; + and − show the sign in each interval.

Sign chart

Interval Test x Value Sign In solution?
(−∞, −2) −3 6 + yes
(−2, 3) 1 −6 − no
(3, ∞) 4 6 + yes
−4−2241020
y = x² − x − 6 (left side − right side)solution: where y > 0
Show steps
  1. Move every term to one sidex2 − x − 6 > 0
  2. Factor(x + 2)(x − 3) > 0
  3. Find the critical points: solve x² − x − 6 = 0Quadratic formula for x² − x − 6 = 0: x = (−b ± √(b² − 4ac))/(2a) with a = 1, b = −1, c = −6. The discriminant is b² − 4ac = 25.
    √25 = 5, so x = −2 or x = 3.

    Zeros: x = −2, 3.
  4. Test one value in each intervalThe sign can only change at a critical point, so one test value per interval tells the sign of the whole interval (see the sign chart below).
  5. Choose the intervalsWe need the left side > 0, so keep the intervals marked +. The zeros are not included because the sign is strict.
  6. Answerx < −2 or x > 3. Interval notation: (−∞, −2) ∪ (3, ∞).

Related: compound inequality calculator · absolute value calculator · quadratic inequality calculator

Inequality Calculator — Solve & Graph on a Number Line (Free)
Embed this calculator on your site

Free to use on class pages, blogs and course pages. Copy the code below and paste it into your page:

How to use the inequality calculator

  1. Type the inequality, for example x^2 - 4x <= 5. Use <= for ≤, >= for ≥ and |x − 2| for absolute value.
  2. For a compound inequality, join the parts with and or or, or write a three-part inequality such as −3 < 2x + 1 ≤ 7.
  3. Prefer filling in boxes? Open the Linear form tab and enter a, b, the sign and c for ax + b ≤ c.
  4. Read the answer in inequality, interval and set-builder notation, with a number line and, where it applies, a sign chart.
  5. Open “Show steps” for the working, or type a value in “Check a value” to test it.

How to solve a linear inequality: the sign-flip rule

Solve a linear inequality the same way as an equation: collect the x-terms on one side and the numbers on the other. There is one extra rule. When you multiply or divide both sides by a negative number, reverse the inequality sign. Adding or subtracting never changes the sign, and neither does multiplying by a positive number.

Example 1. Solve 2x + 3 ≤ 11. Subtract 3: 2x ≤ 8. Divide by 2 (positive, so the sign stays): x ≤ 4. In interval notation that is (−∞, 4], with a closed dot at 4 on the number line.

Example 2. Solve −2x + 5 > 3x − 10. Subtract 3x from both sides: −5x + 5 > −10. Subtract 5: −5x > −15. Divide by −5 and flip the sign: x < 3.

Quadratic and polynomial inequalities: the sign chart method

A polynomial can change sign only where it equals zero. So the method is:

  1. Move every term to one side so the other side is 0.
  2. Find the critical points by solving the equation (factor it, or use the quadratic formula).
  3. The critical points split the number line into intervals. Test one value in each interval.
  4. Keep the intervals with the sign you need. Include the critical points only for ≤ or ≥.

Example 3. Solve x² − x − 6 > 0. Factor: (x + 2)(x − 3) > 0, so the critical points are −2 and 3.

Interval Test x x² − x − 6 Sign
(−∞, −2) −3 6 +
(−2, 3) 0 −6 −
(3, ∞) 4 6 +

We need a positive result, so the solution is x < −2 or x > 3, which is (−∞, −2) ∪ (3, ∞).

Irrational roots stay exact: x² − 2 ≥ 0 gives x ≤ −√2 or x ≥ √2.

Rational inequalities: never multiply by the denominator

Do not multiply both sides by a denominator that contains x: you do not know whether it is positive or negative, so you cannot tell whether to flip the sign. Instead, move everything to one side, write one fraction, and use a sign chart. The critical points are the zeros of the numerator and the zeros of the denominator. Zeros of the denominator are never part of the solution, because the fraction is undefined there.

Example 4. Solve (x + 2)/(x − 3) ≥ 0. The numerator is 0 at x = −2, and the denominator is 0 at x = 3. Test values: x = −3 gives 1/6 (positive), x = 0 gives −2/3 (negative) and x = 4 gives 6 (positive). The solution is x ≤ −2 or x > 3, or (−∞, −2] ∪ (3, ∞). The bracket at −2 is closed because the fraction equals 0 there. The parenthesis at 3 is open because the fraction is undefined there.

Absolute value inequalities

|u| is the distance from u to 0. That gives two patterns, for any positive number c:

  • |u| < c means −c < u < c (distance less than c: an AND, one piece).
  • |u| > c means u < −c or u > c (distance more than c: an OR, two pieces).

Example 5. |2x − 1| < 5 becomes −5 < 2x − 1 < 5. Add 1 to all three parts: −4 < 2x < 6. Divide by 2: −2 < x < 3. In contrast, |3 − x| ≥ 2 gives 3 − x ≤ −2 or 3 − x ≥ 2, so x ≥ 5 or x ≤ 1.

When c is negative, the answer comes straight from the fact that a distance is never negative: |x| < −3 has no solution, and |x| ≥ −3 is true for every x.

Compound inequalities: and vs or

With and, a value must satisfy both conditions, so you keep the overlap (the intersection). With or, a value needs only one, so you combine both sets (the union). A three-part inequality such as −3 < 2x + 1 ≤ 7 is an “and” inequality. Solve it by doing the same operation to all three parts: subtract 1 to get −4 < 2x ≤ 6, then divide by 2 to get −2 < x ≤ 3. For more practice with this type, use the compound inequality calculator.

Writing the answer: inequality, interval and set-builder notation

Inequality Interval notation Set-builder notation Number line
x ≤ 4 (−∞, 4] {x | x ≤ 4} closed dot at 4, arrow left
x > −1 (−1, ∞) {x | x > −1} open dot at −1, arrow right
−2 < x ≤ 3 (−2, 3] {x | −2 < x ≤ 3} open dot at −2, closed at 3
x < −2 or x > 3 (−∞, −2) ∪ (3, ∞) {x | x < −2 or x > 3} two rays, open dots
x ≠ 2 (−∞, 2) ∪ (2, ∞) {x | x ≠ 2} whole line, open dot at 2
every real number (−∞, ∞) {x | x ∈ ℝ} whole line
no solution ∅ ∅ nothing shaded

Square brackets and closed dots mean the endpoint is included (≤ or ≥). Parentheses and open dots mean it is not included (< or >).

Common mistakes with inequalities

Mistake Example Fix
Forgetting to flip the sign −3x < 12 written as x < −4 Dividing by −3 flips the sign: x > −4.
Multiplying by a denominator that has x in it 1/x ≤ 2 turned into 1 ≤ 2x Use a sign chart: x < 0 or x ≥ 1/2.
Solving the quadratic and stopping x² > 9 answered as x > 3 Test both sides: x < −3 or x > 3.
Using “and” for |u| > c |x| > 2 written as −2 > x > 2 Greater-than gives two pieces: x < −2 or x > 2.
Wrong bracket x ≥ 5 written as (5, ∞) Included endpoints get a square bracket: [5, ∞).

Homework-style examples: solve the inequality and graph the solution

Most homework asks you to “solve for x and graph the solution on the number line”. Each example gives the answer, the number line and a value to test.

Example 6. Solve −10 + 2x ≤ −18 and graph the solution. Add 10 to both sides: 2x ≤ −8. Divide by 2: x ≤ −4. Number line: closed dot at −4, shaded to the left. Interval notation: (−∞, −4].

Check: x = −5 gives −10 + 2(−5) = −20, and −20 ≤ −18 is true. x = 0 gives −10, and −10 ≤ −18 is false.

Example 7. Solve −1 < x/(−4). Multiply both sides by −4 and flip the sign: 4 > x, so x < 4. Number line: open dot at 4, shaded to the left. Interval notation: (−∞, 4).

Check: x = 0 gives 0, and −1 < 0 is true. x = 8 gives −2, and −1 < −2 is false.

Example 8. Solve 23 < 5x + 3 and 63 ≥ 5x + 3. First part: 20 < 5x, so x > 4. Second part: 60 ≥ 5x, so x ≤ 12. With “and”, keep the overlap: 4 < x ≤ 12. Number line: open dot at 4, closed dot at 12, shaded between. Interval notation: (4, 12].

Check: x = 10 gives 5x + 3 = 53, and both 23 < 53 and 63 ≥ 53 are true. x = 4 gives 23, and 23 < 23 is false, so 4 is left out.

Example 9. Solve 32 < −5x + 7 or −5x + 7 < −13. First part: subtract 7 to get 25 < −5x, then divide by −5 and flip: x < −5. Second part: −5x < −20, so x > 4. With “or”, keep both pieces: x < −5 or x > 4. Number line: open dots at −5 and 4, shaded outward. Interval notation: (−∞, −5) ∪ (4, ∞).

Check: x = −6 gives 37, and 32 < 37 is true. x = 5 gives −18, and −18 < −13 is true. x = 0 gives 7, which fits neither part.

Example 10. Solve ½(x + 2)² − 6 > 66. Add 6: ½(x + 2)² > 72. Multiply by 2: (x + 2)² > 144. A square is bigger than 144 when the base is above 12 or below −12: x + 2 > 12 or x + 2 < −12, so x > 10 or x < −14. Interval notation: (−∞, −14) ∪ (10, ∞).

Check: x = 11 gives ½(13)² − 6 = 78.5 > 66, true. x = 0 gives ½(2)² − 6 = −4, false.

Using the calculator for homework

Solve the problem by hand first, then enter it here and compare. If your answer is different, open the steps and find the first line where your work differs. That is usually where a sign flipped or an interval was dropped.

Work by hand when you are learning the method or on a test without calculators; use the tool to check and to explore how the answer changes.

Inequalities practice quiz: 10 questions

Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.

Question 1 of 10
1. Solve 3x − 7 < 8.

Found a mistake? Let us know!

2. Solve −4x ≥ 12.

Found a mistake? Let us know!

3. Which interval notation matches x ≥ −2?

Found a mistake? Let us know!

4. Solve x² − 9 < 0.

Found a mistake? Let us know!

5. Solve x² − 5x + 6 ≥ 0.

Found a mistake? Let us know!

6. Solve |x − 4| < 3.

Found a mistake? Let us know!

7. Solve |2x + 1| ≥ 5.

Found a mistake? Let us know!

8. Solve (x − 1)/(x + 2) > 0.

Found a mistake? Let us know!

9. Solve −1 ≤ 2x + 3 < 9.

Found a mistake? Let us know!

10. How many real numbers satisfy x² + 4 < 0?

Found a mistake? Let us know!

Frequently asked questions

When do you flip an inequality sign?

Flip it whenever you multiply or divide both sides by a negative number. For example, dividing −2x > 4 by −2 gives x < −2. Adding, subtracting, or multiplying by a positive number never flips the sign.

What is interval notation?

Interval notation writes a solution set by its endpoints. Parentheses exclude an endpoint, square brackets include it, and ∪ joins separate pieces. For example, x ≤ 4 becomes (−∞, 4], and x < −2 or x > 3 becomes (−∞, −2) ∪ (3, ∞).

What do open and closed circles mean on a number line?

An open circle marks an endpoint that is not included, which happens with < and >. A closed (filled) circle marks an endpoint that is included, which happens with ≤ and ≥.

How do you solve an inequality with x on both sides?

Move all x-terms to one side and all numbers to the other, then divide by the coefficient of x and flip the sign if it is negative. For −2x + 5 > 3x − 10, subtracting 3x and 5 gives −5x > −15, so x < 3.

How do you graph an inequality solution on a number line?

Solve for x first. Put a dot at the boundary number: open for < or >, closed for ≤ or ≥. Then shade toward the values that work. For −10 + 2x ≤ −18, the answer is x ≤ −4, so draw a closed dot at −4 and shade to the left.

Can an inequality have no solution?

Yes. x² + 1 < 0 has no solution, because x² + 1 is at least 1 for every x. |x| < −3 has none either, because a distance cannot be negative. In interval notation, no solution is written ∅.

Related calculators

More algebra calculators

Browse all 206 calculators

Related to This Article

What people say about "Inequality Calculator: Solve & Graph With Steps (Free)"?

No one replied yet.

Leave a Reply