Inequality Solver with Interval Notation and Number Line

Solve a linear inequality by comparing ax + b with cx + d. Exact calculations run locally in your browser, and your values are not sent anywhere.

Get the isolated inequality, exact boundary, interval and set-builder notation, sign-reversal steps, and an accessible number-line graph.

Enter a linear inequality

3x + 7 < 22

Use integers, finite decimals, or fractions such as -3/4. Enter 0 for a missing term.

Try an example

Solution and number line

Solved inequality
x < 5
Interval notation
(−∞, 5)
Set-builder notation{x ∈ ℝ | x < 5}
Boundary5 (excluded)
Check

Advertisement

Step-by-step solution

The algebra steps will appear here.

Advertisement

How to solve a linear inequality

Collect the variable terms on one side and constants on the other. For ax + b ? cx + d:

(a − c)x ? d − b

1. Combine like terms

Subtract cx from both sides, then subtract b from both sides. These addition and subtraction steps do not change the inequality direction.

2. Divide carefully

Divide by a−c. If that value is negative, reverse < with >, or with .

3. Choose the endpoint

Strict < and > use an open circle and parenthesis. Inclusive and use a closed circle and bracket at a finite endpoint.

4. Check cancellation

If a−c=0, the variable cancels. A true constant comparison gives all real numbers; a false one gives the empty set.

Worked inequality examples

Strict upper bound

3x+7<22 becomes 3x<15, then x<5. Interval: (−∞,5).

Negative coefficient

−2x+5≥13 becomes −2x≥8. Dividing by −2 reverses the sign: x≤−4, or (−∞,−4].

Variables on both sides

5x−1>2x+8 becomes 3x>9, so x>3. Interval: (3,∞).

Variables cancel

2x+3<2x+8 reduces to 3<8, which is always true. The solution is all real numbers: (−∞,∞).

Calculation method, privacy, and limits

Integers, fractions, and finite decimals are converted to reduced fractions and processed with BigInt arithmetic. Boundaries and comparisons are exact; decimal approximations are shown only when they add useful context.

Each numeric part is limited to 30 digits to keep browser calculations responsive. Scientific notation and repeating-decimal notation are not accepted; enter an exact fraction instead. All solving happens in your browser, and the calculator does not transmit or store inequality inputs. Last reviewed: 4 August 2026.

Inequality solver FAQs

When do I reverse an inequality sign?

Reverse it when you multiply or divide both sides by a negative number. For example, dividing −2x>6 by −2 gives x<−3.

How do I write an inequality in interval notation?

Use parentheses for excluded endpoints and brackets for included finite endpoints. Infinity always takes a parenthesis, so x≥4 is [4,∞).

What do open and closed circles mean?

An open circle excludes the boundary for < or >. A closed circle includes it for or .

Can the answer be all real numbers or no solution?

Yes. When the x terms cancel, test the remaining constants. A true comparison applies to every real x; a false comparison applies to none.

Can I enter fractions and decimals?

Yes. Use integers, finite decimals, or fractions such as -3/4. Exact fractions are reduced automatically.

Is this inequality solver private?

Yes. It solves locally in your browser and does not send or store the values you enter.

Explore more tools