Inequality Calculator
Use this inequality calculator to solve for x, convert the answer into interval notation, and see the result on a clear SVG number line. The page supports standard one-variable linear inequalities and a practical compound mode, so you can handle classroom algebra, homework checks, and sign-flip cases without bouncing between multiple tools.
All calculations use standard published formulas. Results are for informational use only.
Collect the x-terms together, collect the constants together, and watch for the sign flip if the coefficient of x becomes negative.
Results are shown in plain-text inequality form, interval notation, and on a number line so you can move between algebra notation and visual interpretation without extra conversion steps.
After collecting like terms, the inequality becomes 3x < 12 and then solves to x < 4. The coefficient of x stayed positive after simplification, so the inequality sign did not change.
Number line and interval notation
How to read the visual
- Open circles show endpoints that are not included.
- Closed circles show endpoints that are included.
- Highlighted rays extend forever in one direction.
- The interval notation below the result is the compact written version of the same set.
Interval notation: (-∞, 4)
Step-by-step solution
Start by moving the x-terms together and the constants together.
Combining the x-terms on one side creates a standard one-variable inequality.
Because the coefficient was positive, the inequality sign stays the same.
How to use this calculator
- Choose single mode for one comparison sign or compound mode for a bounded expression.
- Enter the coefficients, constants, and operators so the preview matches your problem exactly.
- Press Calculate to solve for x and review the final solution set, interval notation, and number-line graph.
- Open the step-by-step panel to see where terms were moved and whether the inequality sign had to flip.
Worked examples
Example 1: Single inequality
Subtract 6 from both sides to get 3x < 12, then divide by 3. The inequality sign stays the same because the coefficient is positive.
Example 2: Sign flip case
Subtract 5 to get -2x >= -4. Dividing by -2 flips the sign, which is the step most students miss.
Example 3: Compound inequality
Subtract 3 from every part, then divide every part by 2. The overlap becomes the final interval.
What is an inequality?
An inequality compares expressions without claiming they are exactly equal. When you see symbols like <, <=, >, or >=, you are not hunting for one single number in the same way you often do with an equation. Instead, you are looking for a set of values that makes the comparison true. That is why a strong inequality calculator should always return a solution set, not just one isolated value.
This matters in algebra because inequalities describe ranges: values greater than a threshold, values below a limit, or values trapped between two bounds. A graph on a number line makes that idea much easier to see. Instead of memorizing abstract rules, you can connect the symbolic result to a visual interval with open and closed endpoints.
How to use the inequality calculator
Use single mode when you want to solve one linear inequality such as 3x + 6 < 18 or 2x - 5 >= x + 7. Enter the coefficients and constants so the calculator can collect like terms automatically, solve for x, and display the final set on the number line. This mode is best when the problem has one comparison sign and one variable.
Use compound mode when the variable expression is trapped between two bounds, such as 1 < 2x + 3 <= 9. The calculator solves the lower comparison and the upper comparison separately, then intersects the results. That overlap is the real answer. This is an important distinction because many students solve each side correctly but forget that the final result must satisfy both conditions at the same time.
Rules for solving inequalities
Most of the algebra rules from equations still apply. You can add the same number to both sides, subtract the same number from both sides, multiply both sides by the same positive number, and divide both sides by the same positive number without changing the direction of the inequality. Those moves preserve which values keep the statement true.
The big difference is the sign-flip rule. If you multiply or divide by a negative number, the inequality direction must reverse. For example, if -2x > 8, dividing by -2 gives x < -4, not x > -4. That single rule explains a huge share of classroom mistakes, so this page explicitly calls it out whenever it happens in the calculation flow.
Compound inequalities and interval notation
Compound inequalities are really two inequalities connected together. In a statement like 1 < 2x + 3 <= 9, the middle expression must be greater than 1 and also less than or equal to 9. After solving each side, you take the overlap. If the two solution sets do not overlap, the compound inequality has no solution.
Interval notation is a clean way to write that overlap. Parentheses mean an endpoint is not included. Square brackets mean the endpoint is included. So (-1, 3] means values greater than -1 and up to 3, including 3 itself. Once you pair interval notation with a number-line visual, the result becomes much easier to remember and much easier to explain in class or tutoring sessions.
Understanding the result
If the answer is x > 4, the number line will show an open circle at 4 and a highlighted ray extending to the right. If the answer is x <= 2, the graph will show a closed circle at 2 and the highlight will move left. If the solution is a bounded interval, both endpoints appear, and the highlight only fills the segment between them.
No-solution and all-real-number cases deserve special attention too. A no-solution result means there is no part of the number line that satisfies the inequality. An all-real-number result means the comparison is always true, so the entire line is highlighted. Those special cases are not errors. They are real algebra outcomes that tell you something important about the structure of the problem.
Common mistakes
Forgetting to flip the sign
If you divide or multiply by a negative number and keep the inequality sign the same, the entire answer becomes wrong. This is the single biggest inequality error.
Writing the bound correctly but graphing it incorrectly
Students often compute the right number but use a closed circle when the inequality is strict, or an open circle when the endpoint should be included.
For compound inequalities, forgetting the overlap rule
The final solution is the intersection of both comparisons. Solving each side separately is only part of the job. The overlap is what counts.
Frequently Asked Questions
What is an inequality?
An inequality compares two expressions without saying they are exactly equal. Instead of =, it uses symbols such as <, <=, >, or >= to describe a range of values that make the statement true.
Why does the inequality sign flip sometimes?
The sign flips when you multiply or divide both sides by a negative number. This is one of the most important inequality rules, and it is the reason sign-flip mistakes are so common in algebra classes.
What is interval notation?
Interval notation is a compact way to write the full solution set. Parentheses show endpoints that are not included, while square brackets show endpoints that are included.
Can this calculator solve compound inequalities?
Yes. The page includes a compound mode for expressions such as 1 < 2x + 3 <= 9. It solves both sides, intersects the solution sets, and then shows the answer in plain language, interval notation, and on a number line.
What does no solution mean for an inequality?
No solution means there is no real number that makes the inequality true. This can happen when the variable terms cancel and the remaining comparison is false, or when two compound conditions never overlap.
What do open and closed circles mean on the number line?
An open circle means the endpoint is not included in the solution set. A closed circle means the endpoint is included. This matches the difference between strict symbols (< or >) and inclusive symbols (<= or >=).