Uni-Sine
MathematicsAlgebra

Inequality calculator

This inequality calculator solves linear, quadratic and rational inequalities, such as 4 − 2x ≥ 10 or x² − x − 12 > 0, and shows every step. It finds the values where the sign can change, tests each region in between, and gives the answer three ways: in plain form, in interval notation and in set notation, with the solution drawn on a number line.

Our tool is called the Inequality Solver. It opens on the rational inequality (x + 1)/(x − 2) ≥ 0, a type that trips up many students, because x = 2 has to be left out.

Try it

Inequality Solver

Solve inequalities and show the answer on a number line

Go to its page

How to use the inequality calculator

  1. Type the inequality in the Solve box. Type <= for ≤ and >= for ≥. For a power, type ^ and the number, then press the right arrow key to come back down. The / key builds a fraction.
  2. Read the answer, then the interval notation and set notation underneath.
  3. Follow the working. For a quadratic or a fraction, it factorises, lists the critical values, and tests a value in every region, marking each one keep or reject.
  4. Look at the visual: a sign chart for each factor and a number line with open and closed circles.

The Examples list loads a linear, a quadratic, one with surd roots, a rational and a cubic inequality. For practice, Practice and help sets random linear and quadratic inequalities with worked solutions. It solves one inequality at a time in one letter, with polynomials and fractions of them. It does not take absolute values or two inequality signs at once, but both are easy to split, as shown below.

Solving linear inequalities

Solve a linear inequality like an equation, with one extra rule: multiplying or dividing by a negative number flips the sign. Adding and subtracting never change it.

Example 1: dividing by a negative

Solve 4 − 2x ≥ 10. Take 4 from both sides to get −2x ≥ 6. Now divide by −2, which flips ≥ to ≤:

-2x \ge 6 \Rightarrow x \le -3

The answer is x ≤ −3, which is (−∞, −3] in interval notation: the square bracket means −3 is included. The calculator's working says "Dividing by a negative flips the sign" at that step. A quick check: x = −4 gives 4 + 8 = 12, which is at least 10, so it works.

Try one in the course, then press Mark to check it:

Solve a linear inequality; see the solution on a number line.

Press Mark to have your answer marked in the Algebra course.

Quadratic inequality calculator: the sign chart method

For a quadratic, find where it equals zero, then work out which regions keep the inequality true. The calculator does this with a sign chart: it tests one value in each region.

Example 2: greater than zero

Solve x² − x − 12 > 0. Factorise: (x + 3)(x − 4) > 0, so the critical values are x = −3 and x = 4. Test a value in each region:

RegionTest valueValue of (x + 3)(x − 4)Keep?
x < −3−48, positiveYes
−3 < x < 4−2−6, negativeNo
x > 458, positiveYes

The answer is x < −3 or x > 4, written (−∞, −3) ∪ (4, ∞). The ends are open because the inequality is strict: at −3 and 4 the expression equals 0, which is not greater than 0.

−8−6−4−20246810AB
x < −3 or x > 4: open circles, because −3 and 4 are not included

Here A is at −3 and B is at 4. Change the sign to x² − x − 12 ≤ 0 and the answer flips to the middle region with closed ends: −3 ≤ x ≤ 4. A sketch helps: the parabola is above the axis outside its roots and below it between them.

Rational inequalities: never multiply by the bottom

With x on the bottom of a fraction, you cannot multiply both sides by it, because you do not know whether it is positive or negative. The calculator leaves the inequality as one fraction and uses a sign chart instead. Values that make the bottom zero are always left out.

Example 3: a fraction

Solve (x − 4)/(x + 1) ≤ 0. The top is zero at x = 4 and the bottom is zero at x = −1. Testing the regions, the fraction is negative only between them. x = 4 is allowed, because it makes the fraction 0, which satisfies ≤ 0. x = −1 is not, because it makes the bottom zero:

-1 < x \le 4
−4−3−2−101234567AB
−1 < x ≤ 4: open at −1, which would make the bottom zero, and closed at 4

Here A is at −1 and B is at 4. In interval notation the answer is (−1, 4]. Type (x−4)/(x+1)<=0 to see the sign chart, and the step that says x can never equal −1.

Compound inequality calculator: split it in two

A compound inequality has two signs, such as −3 ≤ 2x + 1 < 9. The calculator takes one inequality at a time, so split it into two and solve each:

  • 2x + 1 ≥ −3 gives x ≥ −2.
  • 2x + 1 < 9 gives x < 4.

Both must be true, so the answer is −2 ≤ x < 4, or [−2, 4) in interval notation. By hand you can also do both at once, doing the same thing to all three parts: subtract 1 to get −4 ≤ 2x < 8, then divide by 2.

Absolute value inequalities split the same way. |x − 3| < 5 means x − 3 is between −5 and 5. Solve x − 3 > −5 and x − 3 < 5 separately to get x > −2 and x < 8, so −2 < x < 8.

Reading the answer: interval and set notation

The calculator gives each answer three ways, so you can copy whichever your course uses.

Plain formInterval notationSet notationOn a number line
x < 5(−∞, 5){x : x < 5}Open circle at 5, line to the left
x ≤ −3(−∞, −3]{x : x ≤ −3}Closed dot at −3, line to the left
−1 < x ≤ 4(−1, 4]{x : −1 < x ≤ 4}Open at −1, closed at 4
x < −3 or x > 4(−∞, −3) ∪ (4, ∞){x : x < −3 or x > 4}Two open circles, lines outwards

A round bracket or open circle means the end is not included, and a square bracket or closed dot means it is. ∞ always gets a round bracket. Our interval notation guide explains the notation in full.

All real numbers or no solution

Some inequalities are true for every x, or for none. x² + 1 > 0 is true everywhere, because a square is never negative, so the calculator says All real numbers, (−∞, ∞). x² + 4x + 4 < 0 is (x + 2)² < 0, which is never true, so it says No solution, written ∅.

Common mistakes

  • Forgetting to flip the sign. Multiplying or dividing by a negative reverses the inequality: −2x > 6 gives x < −3.
  • Square rooting a quadratic inequality. x² > 9 is not just x > 3. It is x < −3 or x > 3. Use a sign chart.
  • Multiplying through by a fraction's bottom. If it contains x, its sign is unknown. Keep one fraction and test regions.
  • Including a value that makes the bottom zero. It is never part of the answer, even with ≤ or ≥.
  • Mixing up open and closed circles. < and > are open. ≤ and ≥ are closed.
  • Writing the regions the wrong way round. x < −3 or x > 4 is not −3 > x > 4. Write two separate inequalities.

Practise inequalities in a short timed paper

Inequalities come up in Pre-Algebra & Algebra 1 and Geometry, Algebra 2 & SAT Math practice, and in GCSE Maths Higher in the UK. Each daily paper is a short timed paper of 8 questions worth 25 to 35 marks, and the papers mix topics. The Algebra course visualises inequalities on a number line before its practice questions, and our number line guide covers the basics.

Common questions

How do you solve an inequality?
Like an equation: do the same thing to both sides until x is on its own. The one difference is that multiplying or dividing by a negative number flips the inequality sign.
When do you flip the inequality sign?
When you multiply or divide both sides by a negative number. Swapping the two sides over also reverses it: 5 > x is the same as x < 5.
How do you solve a quadratic inequality?
Move everything to one side, factorise to find the critical values, then test a value in each region between them. Keep the regions where the inequality is true.
Can the calculator solve compound inequalities?
Not in one go. Split something like −3 ≤ 2x + 1 < 9 into 2x + 1 ≥ −3 and 2x + 1 < 9, solve each, and combine the answers: −2 ≤ x < 4.
What do open and closed circles mean on a number line?
An open circle means the number is not included, for < and >. A closed dot means it is included, for ≤ and ≥.
Why is a value that makes the denominator zero left out?
Dividing by zero is undefined, so the expression has no value there at all. It cannot satisfy any inequality, even one with ≤ or ≥.

Revision cards

Say the answer first, then flip the card to check it.

Where to go next

  • Solve it

    Inequality Solver

    Solve inequalities and show the answer on a number line

    Open the tool
  • Learn it

    Algebra

    Master equations, inequalities and the language of abstract mathematics

    Start the course
  • Test it

    Pre-Algebra & Algebra 1

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Maths · AlgebraSystem of equations calculator: 2 or 3 variables, with stepsFree system of equations calculator: solve 2 or 3 linear equations by elimination or substitution, or a line with a curve, with exact answers and a graph.