Inequality Calculator

Solve any linear inequality ax + b < c, or a compound inequality L < ax + b < U, with full step-by-step working, the solution set, and interval notation.

⚖️ Inequality Calculator

Solve a x + b (sign) c for x

x
+
=

Solve L (sign) a x + b (sign) U for x

x
+
Solution
Interval notation
Step-by-step working
Solution
Interval notation
Step-by-step working

⚖️ What is an Inequality?

An inequality is a mathematical statement that compares two expressions using one of the signs < (less than), ≤ (less than or equal to), > (greater than), or ≥ (greater than or equal to). Unlike an equation, which asserts that two expressions are exactly equal, an inequality describes a range of values. A linear inequality such as 2x + 3 > 7 has the variable raised only to the first power, and its solution is a set of numbers rather than a single answer.

Inequalities appear constantly in real problems. A budget rule might say total spending must stay below a limit, x ≤ 5000. A speed limit sets v ≤ 60. A manufacturing tolerance requires a part width to fall inside a band, 9.8 ≤ w ≤ 10.2, which is a compound inequality. In optimisation and economics, systems of inequalities define the feasible region where every constraint is satisfied at once. Learning to solve them cleanly is a core algebra skill.

Solving a linear inequality is almost the same as solving a linear equation: you isolate the variable using inverse operations. There is one crucial extra rule. When you multiply or divide both sides by a negative number, the direction of the inequality reverses. Forgetting this flip is the most common error students make, so this calculator applies it automatically and shows exactly where it happens in the working.

This tool solves two families of problems. Linear mode handles a single inequality of the form ax + b compared with c. Compound mode handles a double inequality of the form L < ax + b < U, where the expression is trapped between a lower and an upper bound. Each result is given as a solution set, in interval notation, and with a full step-by-step explanation.

📐 Formula

a x + b  (< ≤ > ≥)  c  →  x  (< ≤ > ≥)  (c − b) ÷ a
a = coefficient of x (the sign flips the inequality if a < 0)
b = constant added on the left
c = value on the right-hand side
Boundary: x = (c − b) ÷ a
Flip rule: if a < 0, reverse the inequality when dividing.
Compound: L < ax + b < U → (L − b)/a < x < (U − b)/a
Example: 2x + 3 > 7 → 2x > 4 → x > 2, interval (2, ∞).

📖 How to Use This Calculator

Steps

1
Choose a mode. Pick Linear Inequality for ax + b compared with c, or Compound Inequality for a range L < ax + b < U.
2
Enter the coefficients and sign. Type a, b, and c and pick the inequality sign. For compound mode, enter both bounds and both signs.
3
Read the solution. Click Calculate to see the solution set, interval notation, and every step, including a sign flip when a is negative.

💡 Example Calculations

Example 1 — Basic Linear Inequality

Solve 2x + 3 > 7

1
Subtract 3 from both sides: 2x > 4
2
Divide by 2 (positive, no flip): x > 2
Solution = x > 2, interval (2, ∞)
Try this example →

Example 2 — Sign Flip with a Negative Coefficient

Solve −3x + 5 ≤ 14

1
Subtract 5 from both sides: −3x ≤ 9
2
Divide by −3 and flip ≤ to ≥: x ≥ −3
Solution = x ≥ −3, interval [−3, ∞)
Try this example →

Example 3 — Compound Inequality

Solve 1 ≤ 2x + 3 < 9

1
Subtract 3 from all three parts: −2 ≤ 2x < 6
2
Divide all parts by 2: −1 ≤ x < 3
Solution = −1 ≤ x < 3, interval [−1, 3)
Try this example →

❓ Frequently Asked Questions

How do you solve a linear inequality?+
Isolate the variable just like an equation. For ax + b < c, subtract b to get ax < c − b, then divide by a. The one extra rule is that if a is negative, flip the inequality sign when dividing. For example, 2x + 3 > 7 gives 2x > 4, so x > 2.
When do you flip the inequality sign?+
You flip the sign whenever you multiply or divide both sides by a negative number. For example, −3x + 5 ≤ 14 becomes −3x ≤ 9, and dividing by −3 flips ≤ to ≥, giving x ≥ −3. Adding, subtracting, or dividing by a positive number never changes the direction.
What is interval notation?+
Interval notation describes a solution set with brackets. A round bracket ( or ) excludes the endpoint (strict < or >); a square bracket [ or ] includes it (≤ or ≥). Infinity always takes a round bracket. So x > 2 is (2, ∞), x ≤ 5 is (−∞, 5], and −1 ≤ x < 3 is [−1, 3).
What is a compound inequality?+
A compound inequality combines two inequalities, such as 1 ≤ 2x + 3 < 9. It means the expression is at least the lower bound and less than the upper bound at the same time. Solve it by applying each operation to all three parts: subtract 3 to get −2 ≤ 2x < 6, then divide by 2 to get −1 ≤ x < 3.
How is solving an inequality different from an equation?+
The algebra is nearly identical, but there are two differences. An inequality usually has infinitely many solutions (a range) rather than one value, and multiplying or dividing by a negative number reverses the sign, which never happens with equations. Otherwise the same inverse-operation steps apply.
What do 'no solution' and 'all real numbers' mean?+
These occur when a is zero, so the variable vanishes. If the remaining statement is true, such as 3 < 5, every x works and the answer is all real numbers, written (−∞, ∞). If it is false, such as 5 < 3, no x works and the answer is no solution, written with the empty-set symbol ∅.
Can inequalities have negative or fractional answers?+
Yes. The boundary value (c − b) / a can be any real number, including negatives and fractions. For example, 4x + 1 < 0 gives x < −0.25. The calculator reports the exact decimal boundary and the matching interval notation so you can read the endpoint at a glance.
How do you graph an inequality on a number line?+
Mark the boundary value, then use an open circle for a strict inequality (< or >) or a closed circle for an inclusive one (≤ or ≥). Shade the ray toward the solution: to the right for x greater than the boundary, to the left for x less than it. Compound solutions shade the segment between the two bounds.
Why must the lower bound stay below the upper bound?+
A compound inequality L < expression < U only makes sense when L ≤ U. If the lower bound were larger than the upper bound, no value could satisfy both parts at once and the region would be empty. The calculator checks this and asks you to correct the bounds before solving.
Can I solve an inequality with variables on both sides?+
Yes, but rearrange it into ax + b compared with c first. Move every x term to one side and every constant to the other. For example, 5x − 2 < 2x + 7 becomes 3x − 2 < 7, which is the standard form with a = 3, b = −2, and c = 7. Then enter those values and solve as a linear inequality.

How do you solve a linear inequality?

Solve it almost exactly like an equation: isolate the variable using inverse operations. For ax + b < c, subtract b from both sides to get ax < c − b, then divide by a. The one extra rule is that if a is negative, you must flip the inequality sign when you divide. For example, 2x + 3 > 7 gives 2x > 4, so x > 2.

When do you flip the inequality sign?

You flip the inequality sign whenever you multiply or divide both sides by a negative number. For example, −3x + 5 ≤ 14 becomes −3x ≤ 9, and dividing by −3 flips ≤ to ≥, giving x ≥ −3. Adding, subtracting, or dividing by a positive number never changes the direction of the inequality.

What is interval notation?

Interval notation describes a solution set using brackets. A round bracket ( or ) means the endpoint is excluded (strict < or >); a square bracket [ or ] means it is included (≤ or ≥). Infinity always uses a round bracket. So x > 2 is written (2, ∞), x ≤ 5 is (−∞, 5], and −1 ≤ x < 3 is [−1, 3).

What is a compound inequality?

A compound inequality combines two inequalities into one statement, such as 1 ≤ 2x + 3 < 9. It means the expression is simultaneously at least the lower bound and less than the upper bound. You solve it by performing each operation on all three parts at once: subtract 3 to get −2 ≤ 2x < 6, then divide by 2 to get −1 ≤ x < 3.

How is solving an inequality different from solving an equation?

The algebra is nearly identical, but there are two differences. First, an inequality usually has infinitely many solutions (a range) rather than one value. Second, multiplying or dividing by a negative number reverses the inequality sign, which never happens with equations. Otherwise the same inverse-operation steps apply.

What does 'no solution' or 'all real numbers' mean?

These occur when the coefficient a is zero, so the variable vanishes. If the remaining statement is true, such as 3 < 5, every value of x works and the answer is all real numbers, written (−∞, ∞). If it is false, such as 5 < 3, no value works and the answer is no solution, written with the empty-set symbol ∅.

Can inequalities have negative or fractional answers?

Yes. The boundary value (c − b) / a can be any real number, including negatives and fractions. For example, 4x + 1 < 0 gives x < −0.25. The calculator reports the exact decimal value and shows the same result in interval notation so you can read the boundary at a glance.

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

Draw a number line, mark the boundary value, and use an open circle for a strict inequality (< or >) or a closed circle for an inclusive one (≤ or ≥). Then shade the ray in the direction of the solution: to the right for x greater than the boundary, to the left for x less than it. Compound solutions shade the segment between the two bounds.

Why does the compound inequality need the lower bound below the upper bound?

A compound inequality of the form L < expression < U only makes sense when L is less than or equal to U. If the lower bound were larger than the upper bound, no value could satisfy both parts at once, so the region would be empty. The calculator checks this and asks you to correct the bounds.