Linear inequality solver
Type 2x + 3 < 11 and get x < 4, also written as the interval (−∞, 4). When the coefficient of x is negative, the inequality sign is reversed for you and the step is flagged. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- A
- 2
- B
- 3
- C
- 11
- Op
- <
- Bound
- 4
- Solution op
- <
- Inequality
- 2x + 3 < 11
- Solution
- x < 4
This linear inequality solver isolates x from ax plus b compared with c using a strict or non-strict comparison operator, then reports the solution as an inequality string and as an open or closed interval on the real line. The classic rule students must not forget is that dividing or multiplying both sides by a negative coefficient reverses the inequality direction; this engine applies that flip automatically whenever a is negative and records flipped true so you can show the step in homework or demos. Positive a keeps the original operator, so 2x + 3 less than 11 becomes x less than 4 with interval open at four on the right, while negative a examples such as −2x + 3 less than 11 become x greater than −4 with interval open at −4 on the left. Zero a is rejected with invalid input because the statement no longer depends on x and is not a linear inequality in the unknown. Arithmetic is pure and deterministic: no network calls, no sampling, and no date-dependent paths.
How a, b, c, and op are read and why negative a flips the sign
Operators may be written as symbols less than, less than or equal, greater than, greater than or equal, or as the short codes lt, le, gt, and ge, including the unicode symbols for less-or-equal and greater-or-equal. After subtracting b, both sides are divided by a. When a is positive the inequality direction is unchanged.
When a is negative every comparison reverses: less becomes greater, less-or-equal becomes greater-or-equal, and so on. That reversal is exactly the rule taught in pre-algebra and algebra one, and the response sets flipped to true so UI layers can highlight the step. Zero a is not rewritten as a vacuous true or false statement; it is treated as a client error so caches, goldens, and grading pipelines stay deterministic.
Where linear inequality solves fit in study, code, and teaching
Students meet linear inequalities when graphing solution sets on a number line, when word problems ask for ranges of values that satisfy a budget or speed limit, and when later courses extend the idea to systems and absolute values. Teachers can pre-generate answer keys for positive and negative coefficients without trusting opaque calculator apps that forget to flip the sign or that print scientific notation instead of clean intervals.
Developers call the same contract from scripts to seed deterministic test vectors for inequality parsers, to validate form inputs that must stay below a threshold after an affine transform, or to power interactive homework that shows both the algebraic solution and the interval. Contest practice often needs a fast offline check that x greater than or equal to a computed bound matches a hand solution after dividing by a negative slope.
Product and operations analysts use one-sided constraints of the form ax plus b compared with c when translating linear cost models into feasible regions for a single decision variable.
What you can do with it
Homework and number-line checks
Solve ax + b ⊙ c for worksheets, verify flip-on-negative-a steps, and copy interval notation into answer keys.
Teaching demos and grading
Show flipped true when a is negative so learners see the rule; batch-check student answers against the same bound.
FAQ
What does the linear inequality solver cost?
It is free in your browser on this page.
How is the solution defined?
Isolate x from ax + b ⊙ c: subtract b, divide by a, flip ⊙ when a is negative, and report x ⊙' (c−b)/a with matching interval notation.
When is the inequality flipped?
Whenever a is negative. Dividing both sides by a negative number reverses the comparison; the response sets flipped to true.
How do I solve 2x + 3 < 11?
Subtract 3 from both sides and divide by 2: the result is x < 4. In interval notation that is (−∞, 4), open at 4 because the comparison is strict.
What happens if the coefficient of x is zero?
The solver does not accept it, because with a zero coefficient the statement no longer depends on x and is not a linear inequality in the unknown.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/algebra/inequality-solver \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"a":2,"b":3,"c":11,"op":"<"}'const res = await fetch("https://api.kit.forhosting.com/algebra/inequality-solver", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"a": 2,
"b": 3,
"c": 11,
"op": "<"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/inequality-solver",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"a": 2,
"b": 3,
"c": 11,
"op": "<"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/inequality-solver", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"a":2,"b":3,"c":11,"op":"<"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"a":2,"b":3,"c":11,"op":"<"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/inequality-solver", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"a": 2,
"b": 3,
"c": 11,
"op": "<"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.inequality_solver",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs_coeff | 1000000000000000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
What a linear inequality means and what the response contains
A linear inequality in one variable has the shape ax plus b compared with c, where the comparison is less than, less than or equal, greater than, or greater than or equal. Solving means rewriting the statement as a condition on x alone: either x is less than a bound, less than or equal to a bound, greater than a bound, or greater than or equal to a bound. The bound is always (c minus b) divided by a, provided a is non-zero. Interval notation packages the same answer for analysis courses and programming: open parentheses exclude the endpoint, square brackets include it, and infinity markers show rays that run without end. This calculator returns the normalized coefficients, the original operator, the numeric bound rounded to your precision, the solution operator after any flip, a boolean flipped flag, human-readable inequality and solution strings, the interval string, lower and upper endpoint fields with inclusive flags, the precision used, and a short formula reminder of the algebra. There is no approximate Monte Carlo sampling of the half-line and no symbolic CAS black box: the engine either isolates x with ordinary real arithmetic inside the supported coefficient range or rejects the input with invalid_input. Rejected cases include missing a, b, c, or op; non-finite numbers; magnitudes above the documented ceiling; unknown operator strings; and a equal to zero.
How a, b, c, and op are read and why negative a flips the sign
The preferred fields are a for the coefficient of x, b for the constant on the left, c for the right-hand side, and op for the comparison. Aliases such as A and coeff for a, B and left_const for b, C, rhs, and right for c, and operator, comparison, and sense for op are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the flip rule yourself.
Where linear inequality solves fit in study, code, and teaching
On this page the work runs entirely in your browser; through the API each successful solve costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with complete-the-square or polynomial tools when you need related algebra, with equation solvers when equality is enough, and with other math endpoints when you are building a small lab of free, deterministic algebra helpers.
Integration use cases
Deterministic test fixtures
Generate reproducible solution operators, bounds, and intervals for unit tests and CI without hand-maintaining tables.
Technical questions
What happens if a is zero?
a = 0 is rejected with invalid_input because the statement no longer depends on x and is not a linear inequality in the unknown.
Which operators are supported?
Strict and non-strict inequalities: <, <=, >, >=, plus aliases lt, le, gt, ge and the unicode ≤ and ≥ symbols.