Triangle Inequality Calculator - a + b > c, a + c > b, b + c > a

Use this triangle inequality calculator to enter three side lengths and see whether they form a real triangle, the longest side, the sum against that side, and the safety margin.

Updated: June 16, 2026 • Free Tool

Triangle Inequality Calculator

First side length. Use the same length unit for all three inputs.

Second side length. Use the same length unit for all three inputs.

Third side length. Use the same length unit for all three inputs.

Results

Verdict
Valid triangle
Reason All three sides form a real triangle.
Longest side 0units
Sum of the other two sides 0units
Margin against the rule 0units
Perimeter 0units

What Is Triangle Inequality Calculator?

A triangle inequality calculator checks whether three positive side lengths can close into a real triangle. Enter side a, side b, and side c, and the calculator applies the triangle inequality rule: a + b > c, a + c > b, and b + c > a. It returns a verdict, the longest side, the sum of the other two sides, the safety margin against the rule, and the perimeter when the three sides form a valid triangle.

  • Homework and worksheet checks: Confirm that three measured side lengths satisfy a + b > c before plugging them into Heron's formula or the law of cosines.
  • Carpentry and stair layouts: Verify that two cut pieces and a measured diagonal can close into a triangular brace or stair stringer before assembly.
  • Land surveying and plot boundaries: Sanity check three corner-to-corner measurements against the triangle rule before computing a plot area.
  • Navigation and bearing problems: Check that three legs of a course or three bearings close into a real triangle before calculating the bearing angle or interior angles.

The triangle inequality is the simplest rule that decides whether three lengths can form a triangle. If the rule fails, no other triangle math can rescue the result, so this check belongs at the front of every triangle problem.

Once the three sides have cleared this rule, the Triangle Area Calculator is the natural next step for a real area using Heron's formula or the base-height and SAS methods.

How Triangle Inequality Calculator Works

The calculator reads the three sides, identifies the longest, and compares the sum of the other two to that longest. If the sum is strictly greater, the three sides form a real triangle and the calculator reports a positive margin, the longest side, the sum against it, and the perimeter. If the sum is equal, the triangle is degenerate (flat) and the calculator rejects it. If the sum is less, the three sides cannot close at all and the calculator also rejects it.

a + b > c, a + c > b, b + c > a (equivalently: longest < (a + b + c) - longest)
  • a, b, c: the three positive side lengths, all in the same length unit
  • longest: the largest of a, b, and c; the whole rule reduces to checking that this value is strictly less than the sum of the other two
  • margin: sum of the two shorter sides minus the longest side; positive means valid, zero means degenerate, negative means impossible

The three separate inequalities are equivalent to the single check that the longest side is strictly less than the sum of the other two. Equality is rejected because a triangle whose longest side equals the sum of the other two collapses to a flat segment and produces a zero in Heron's formula.

Example: sides 3, 4, 5 (classic right triangle)

Enter a = 3, b = 4, c = 5.

longest = 5. sum of the other two = 3 + 4 = 7. margin = 7 - 5 = 2 (positive).

Verdict = Valid triangle, longest = 5.00, sum of the other two = 7.00, margin = 2.00, perimeter = 12.00.

The 3-4-5 triangle passes the rule by 2 units of margin. Any other ordering of a, b, c with the same three numbers gives the same verdict because the rule depends only on the multiset of side lengths.

Example: sides 1, 2, 5 (impossible)

Enter a = 1, b = 2, c = 5.

longest = 5. sum of the other two = 1 + 2 = 3. margin = 3 - 5 = -2 (negative).

Verdict = Not a triangle, longest = 5.00, sum of the other two = 3.00, margin = -2.00, perimeter = 0.

The two shorter sides do not reach across to close the third side. The negative margin tells the user exactly how much the inputs fall short.

According to Wolfram MathWorld, three positive lengths a, b, c form a real triangle if and only if a + b > c, a + c > b, and b + c > a, with equality producing a degenerate (flat) triangle

For the special case of three unequal side lengths that have already passed the rule, the Scalene Triangle Area Calculator applies Heron's formula directly to the same three numbers.

Key Concepts Explained

These four ideas cover the rule itself, the strict inequality that turns a flat segment into a triangle, and the relationship to the formulas that use the same three sides.

Sum of Two Sides vs Third Side

The whole rule is a single comparison: the longest side must be strictly less than the sum of the other two. The other two inequalities follow automatically once this one holds.

Strict Greater Than

A real triangle needs strict inequality. Equality gives a degenerate triangle that lies flat along a line, and strict violation cannot close at all.

Longest Side Identification

Finding the longest side first turns three checks into one. The rule is symmetric in a, b, c, so any ordering of the inputs gives the same verdict as long as the multiset of lengths is the same.

Gate to Heron's Formula

Heron's formula for triangle area uses the same three side lengths and the semi-perimeter s. The triangle inequality is what keeps the radicand s * (s - a) * (s - b) * (s - c) non-negative, so the area step is safe to run only after this check passes.

A triangle inequality calculator is the simplest way to enforce that gate before any problem with three sides.

When the three sides happen to form a right triangle and the longest side is the hypotenuse c, the Abc Triangle Calculator solves the rest of the ABC triangle from the same side labels.

How to Use This Calculator

Pick three side lengths from the problem or the drawing, type them in, and read the verdict from this triangle inequality calculator against the same length unit.

  1. 1 Pick a single length unit: Use meters, feet, inches, or any one unit for all three inputs. Mixing units does not change the verdict but it makes the perimeter meaningless.
  2. 2 Enter side a, side b, and side c: Type the three lengths into the labeled fields. The order does not matter because the rule is symmetric in a, b, and c.
  3. 3 Read the verdict: Valid triangle means the three sides can close. Not a triangle means the inputs fail the rule, with the reason spelled out below the verdict.
  4. 4 Read the longest side and the sum of the other two: These are the two values the rule actually compares. The longest side is the largest input; the sum of the other two is the remaining total.
  5. 5 Read the margin: A positive margin means the inputs pass the rule by that amount. A zero margin means the inputs are degenerate. A negative margin means the inputs fall short.
  6. 6 Read the perimeter when valid: The perimeter is a + b + c in the same length unit. A zero perimeter means the inputs did not form a valid triangle.

A roof gable has two rafter lengths of 5 meters and a base of 7 meters across the wall plate. Type a = 5, b = 5, c = 7. The longest side is 7, the sum of the other two is 10, and the margin is 3 meters. The gable closes into a valid isosceles triangle, so the area and the apex angle are worth computing next.

After the verdict confirms the inputs are valid, the Triangle Calculator extends the same three sides to the full triangle solution, including the third side, the angles, and the area.

Benefits of Using This Calculator

Putting the rule at the front of the workflow keeps the rest of the triangle math honest.

  • Catch invalid sides before other formulas fail: A failed triangle inequality check saves the user from a negative radicand in Heron's formula or an impossible third side in the law of cosines.
  • Reject degenerate triangles explicitly: Sides that sum exactly to a flat segment are flagged separately from sides that fall short, so the user knows whether the inputs are on the line or truly impossible.
  • Show the longest side and the failing comparison: The output names the largest input and the sum of the other two, which is the single comparison the rule actually performs.
  • Report a margin for near-miss cases: A small positive margin warns the user that the inputs are valid but only just. A negative margin tells the user exactly how much the inputs fall short.
  • Symmetric in a, b, c: Reordering the inputs does not change the verdict, so the user can paste three lengths into a, b, c in any order.
  • Unit-agnostic for the verdict: The verdict does not depend on the unit, so the same calculator handles inches, feet, centimeters, and meters as long as all three inputs share a unit.

A triangle inequality calculator is the simplest way to enforce that gate.

Factors That Affect Your Results

A few input choices decide whether the result matches the actual triangle the user is checking.

Longest side identification

The rule reduces to one comparison, so the longest side must be identified correctly. The calculator sorts the three inputs by size to avoid any re-ordering mistakes.

Strict vs non-strict inequality

The triangle inequality uses strict greater than. Equality is rejected because a degenerate triangle has zero area and lies along a line.

Unit consistency

All three side inputs must use the same length unit. The verdict is unit-agnostic, but the perimeter and margin are reported in the same unit as the inputs.

Near-miss margin

A small positive margin means the triangle is valid but nearly degenerate. Real measurements of that kind often fail on the first try because the longest side is the most likely to be measured slightly too large.

Perimeter behavior

The perimeter is reported only when the inputs form a valid triangle. A zero perimeter on the result panel means the rule failed.

  • The triangle inequality only checks whether three lengths can close into a real triangle. It does not check whether the three sides correspond to a particular triangle type (right, equilateral, isosceles, scalene) or whether the angles match what the user expects.
  • The result is a single geometric test. A passing verdict does not mean the three side lengths are the right ones. It only says the lengths are consistent.

If a verdict is Not a triangle, the most common fix is to re-measure the longest side.

According to Math Open Reference, the sum of the lengths of any two sides of a triangle is always greater than the length of the third side

According to Wikipedia, the triangle inequality requires strict inequality for a non-degenerate triangle and reduces to the single comparison that the longest side is less than the sum of the other two

If the verdict is valid and the three sides also satisfy the Pythagorean theorem, the Right Triangle Calculator is the closer peer for the specific case of a right triangle with legs a and b and hypotenuse c.

triangle inequality calculator showing three side lengths a, b, c checked against a + b > c, a + c > b, b + c > a with longest side, sum, margin, and perimeter
triangle inequality calculator showing three side lengths a, b, c checked against a + b > c, a + c > b, b + c > a with longest side, sum, margin, and perimeter

Frequently Asked Questions

Q: What is the triangle inequality?

A: The triangle inequality is the rule that three positive lengths a, b, c form a real triangle if and only if the sum of any two sides is strictly greater than the third. Equivalently, the longest side must be strictly less than the sum of the other two.

Q: How do you check if three sides form a triangle?

A: Find the longest of the three lengths, add the other two together, and check whether that sum is strictly greater than the longest. If yes, the sides form a real triangle. If equal, the triangle is degenerate. If less, the sides cannot close into a triangle.

Q: What is the triangle inequality formula?

A: The formula is a + b > c, a + c > b, and b + c > a. All three must hold. The formula reduces to a single check: the longest side must be strictly less than the sum of the other two.

Q: Why does the triangle inequality use strict greater than?

A: Strict greater than rules out the degenerate triangle, the limiting case in which the three sides lie along a single line. A degenerate triangle has no interior area, so the rule rejects equality on purpose.

Q: Can two equal sides sum to the third side?

A: No. If two sides sum exactly to the third, the three sides form a degenerate triangle, which the rule rejects. The sum of the two shorter sides must be strictly greater than the longest side, not just equal to it.

Q: How does the triangle inequality relate to Heron's formula?

A: Heron's formula uses the three side lengths and the semi-perimeter s to compute the area as sqrt(s * (s - a) * (s - b) * (s - c)). The triangle inequality is what keeps the radicand non-negative. If the three sides fail the rule, Heron's formula gives a negative radicand and no real area.