Linear Inequality Solver

    Solve one-variable linear inequalities with steps, sign-flip rule, interval notation, and a number line.

    Supports parentheses, numeric fractions, and four inequality signs. The variable degree must be 1 or lower.
    Quick input
    Sign:
    Inequality solution
    x < 5
    x ∈ (−∞; 5)
    Number line solution
    x < 5
    −∞
    +∞
    x < 5
    -2
    -1
    1
    2
    3
    4
    6
    7
    Legend
    Solution interval
    All x values satisfying the inequality, extending to -infinity.
    Closed boundary (<=, >=)
    The boundary is included in the solution.
    Open boundary (<, >)
    The boundary is not included in the solution.
    Excluded value x != ...
    There are no excluded denominator values.
    zero / ticks· click a point for details
    What the solution shows
    After moving terms, there is one boundary on the number line: 5. The solution lies to the left of this boundary.
    The boundary is excluded because the inequality is strict.

    A linear inequality contains one variable only to the first power. It is solved like a linear equation, except that dividing by a negative number reverses the sign. Variable denominators require interval analysis.

    How to solve linear inequalities

    A linear inequality has one variable only to the first power. The solver expands parentheses, moves terms, divides by the coefficient of x, and shows whether the inequality sign must flip. The answer is shown as an inequality, interval notation, and a number line.

    x is the unknown; the symbol can be <, <=, >, or >=.

    A is the coefficient of x after moving all terms to one side.

    The direction depends on the sign of A.

    1. Expand parentheses and combine like terms
    2. Move variable terms and constants
    3. Divide by the coefficient of x
    4. Flip the inequality sign when dividing by a negative number
    5. Write the answer in interval notation and on a number line

    The sign-flip rule

    Flip the inequality sign
    When both sides are multiplied or divided by a negative number, the inequality sign reverses. Multiplying or dividing by an expression with x needs interval analysis because its sign can change.
    OperationInequality sign
    Add or subtract a numberDoes not change
    Multiply or divide by a positive numberDoes not change
    Multiply or divide by a negative numberFlips
    Multiply or divide by zeroNot allowed

    Interval notation and number line

    The number line shows the boundary value, ray direction, and whether the boundary is included. Strict inequalities use an open point; non-strict inequalities use a closed point.

    Answer typeIntervalPoint
    Strict sign and ray leftBoundary excludedOpen circle
    Non-strict sign and ray leftBoundary includedClosed circle
    Strict sign and ray rightBoundary excludedOpen circle
    Non-strict sign and ray rightBoundary includedClosed circle

    Special cases and limits

    If the variable cancels out and the remaining numeric statement is true, every real number is a solution. If the remaining statement is false, there is no solution.

    Not a general inequality solver
    This tool solves linear inequalities only. Quadratic, rational, absolute-value, logarithmic, exponential, and system inequalities need other methods.

    Frequently Asked Questions

    Sources and References

    Calculations are based on the listed reference sources. Links open in a new tab.

    Updated:

    Related Tools