ForHosting KIT · Math

Triangle inequality checker

Check in one step whether three lengths can close into a triangle: 3, 4 and 5 can, while 1, 2 and 3 cannot, because 1 plus 2 only equals 3. Each of the three comparisons is shown. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon

The triangle inequality is the fundamental geometric filter that decides whether three positive lengths can close into a plane triangle. Students meet it when they first draw sides, teachers mark it on quizzes, and engineering scripts use it before computing area, angles, or construction takeoffs. This triangle inequality checker accepts three finite non-negative side lengths a, b, and c, applies the strict conditions a plus b greater than c, a plus c greater than b, and b plus c greater than a, and returns a clear valid flag together with each pairwise comparison so you can see which inequality failed when the answer is false.

What the triangle inequality means and why strict inequality matters

In Euclidean geometry, three lengths a, b, and c form a non-degenerate triangle if and only if each length is strictly shorter than the sum of the other two: a plus b greater than c, a plus c greater than b, and b plus c greater than a. The inequality is geometric, not optional bookkeeping: if one side equals or exceeds the sum of the other two, the path cannot close with positive area—the figure collapses onto a line segment (degenerate) or cannot be assembled at all.

Classroom language often says each side must be less than the sum of the other two; contest problems and CAD preprocessors encode the same three comparisons. Search intent clusters around triangle inequality checker, do these three sides form a triangle, triangle inequality theorem calculator, and valid triangle from three side lengths. Degenerate cases such as one, two, three (where one plus two equals three) are reported as valid false under the strict form used for positive area.

Units are whatever you pass—metres, inches, or game units—as long as all three sides share the same unit; the engine does not convert units. Unlike area calculators that throw when sides fail the inequality, this product is built to answer the inequality question itself and to keep both true and false outcomes as successful, billable results.

Preflight gate before area, mesh, or construction takeoff

Reject or flag non-triangular edge triples before Heron, SSA, CAD layout, or game mesh code assumes a positive-area face.

LMS and contest auto-grading for SSS validity

Mark triangle-inequality items with a pure oracle that rejects negative sides and returns stable valid flags for both true and false cases.

What is the triangle inequality theorem?

Three lengths a, b, and c form a non-degenerate triangle if and only if a+b>c, a+c>b, and b+c>a. This checker evaluates those three strict comparisons and returns valid true only when all hold.

What happens if a side is negative?

Euclidean side lengths must be non-negative; failed validation is not billed.

Are degenerate triangles (a+b=c) considered valid?

When one side equals the sum of the other two, valid is false and the matching comparison flag is false.

Does this compute area or angles?

No. It only checks the triangle inequality and returns valid plus each pairwise comparison. Use a Heron or SAS/ASA tool for area and angles after confirming validity.

How do I know which side breaks the rule?

The result shows each of the three comparisons separately, so when the answer is no you can see which sum fails to exceed the third side. For 3, 4 and 5 all three comparisons pass.

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.

POSThttps://api.kit.forhosting.com/geom/triangle-inequality

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.

curl -X POST https://api.kit.forhosting.com/geom/triangle-inequality \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":3,"b":4,"c":5}'
{
  "a": 3,
  "b": 4,
  "c": 5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geom.triangle_inequality",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Negative lengths are rejected with invalid_input rather than silently treated as absolute values.

What the triangle inequality means and why strict inequality matters

Learners want a yes-or-no answer they can check against a textbook key; engineers want a boolean they can gate before Heron, SSA, or mesh generation. This endpoint returns valid as a boolean plus three named flags for each pairwise sum comparison, so a false result is never a black box: you see which condition failed.

Input contract, response shape, and how validation works

Each must be a finite number; numeric strings that parse cleanly are accepted so form posts and spreadsheet exports stay convenient. Zero is accepted on a side so algebraic edge cases remain well-defined; a triple containing zero almost always yields valid false under the strict inequality, which is the correct geometric answer rather than a thrown error. Missing fields, empty strings, Infinity, and NaN also fail before any comparison runs. Pair this checker with a Heron area calculator when you need area after confirming validity, or with a semiperimeter tool when you only need s equals a plus b plus c over two. POST a JSON body with three required fields: a, b, and c for the three side lengths. Aliases side_a, side1, side_b, side2, side_c, and side3 map to the same three inputs for classroom templates that already label sides that way. Negative values fail immediately with invalid_input naming the field, because a Euclidean side length cannot be less than zero—that is the hard error contract of this capability. Failed validation is not billed; only a successful item consumes the published base price of $0.002.

Practical uses, pricing, limits, and related geometry tools

Use the free browser tool when you want an immediate triangle inequality check while verifying homework, screening measured rod lengths before a layout, or confirming three game-collision edges before spawning a mesh. Limits are intentional: only three planar side lengths, no angles, no coordinates, no automatic area or angle computation, and no unit conversion tables. Each successful request is one billable item at $0.002; invalid input such as a negative side does not consume balance. If you need area from three sides after a strict inequality gate, choose a Heron area calculator; if you need semiperimeter alone without a validity boolean, choose the dedicated semiperimeter endpoint; if you need SAS or ASA solving with angles, use those specialized triangle solvers.

Homework and exam triangle inequality drills

Give students three side lengths; compare their yes-or-no answer and which pairwise sum failed against a deterministic API or free browser result.

What does the triangle inequality checker cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →