Saved

Press the star next to a tool's name to save it.

All my tools

Triangle Inequality Calculator

Use this triangle inequality calculator to check whether three side lengths make a triangle, find the allowed range of a third side and classify the triangle.

Restored your last values ·

Enter three side lengths to see whether they can form a triangle. Enter only two sides to find the range in which the third side must lie. Use the same unit for all the lengths.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Enter two sides, or three, then press Check.

See full result

A triangle inequality calculator tells you whether three lengths can be the sides of a triangle. Enter three sides and it checks the three sums, says whether the triangle is proper, flat or impossible, and, if it is proper, classifies it by its sides and angles. Enter just two sides and it gives the range in which the third side must lie. It runs in your browser.

How to use the triangle inequality calculator

  1. Enter the sides a and b.
  2. Enter the side c to test, or leave it blank to get its range.
  3. Press Check.

The triangle inequality

The Wikipedia article on the triangle inequality says that the sum of the lengths of any two sides must be greater than or equal to the length of the third side.[1] For a non-degenerate triangle with sides a, b and c, the three inequalities are a + b > c, b + c > a and c + a > b, with strict inequalities.[1] The page summarizes these as |a − b| < c < a + b, and gives the equivalent form that the longest side is less than half of the perimeter, max(a, b, c) < (a + b + c) ÷ 2.[1] Sides of 3, 4 and 5 pass, since 3 + 4 = 7 is more than 5. Sides of 2, 3 and 6 fail, because 2 + 3 = 5 is not more than 6.

The flat triangle

If one side equals the sum of the other two, as with 1, 2 and 3, the triangle is degenerate. The three corners lie on one straight line, and the triangle has zero area.[1] The calculator calls this a flat triangle. Such a case is allowed by the weak form of the inequality, which includes equality, but it is not a triangle that you can draw with an inside. For sides of 0.1, 0.2 and 0.3, the calculator treats the sum as equal, within a tiny rounding margin, and calls the triangle flat.

The range of the third side

Given two sides, the third side must be longer than their difference and shorter than their sum. For sides of 3 and 4, the third side c must satisfy 1 < c < 7. A side of 1 or 7 gives a flat triangle, and a side outside the range gives no triangle. In the range mode, the calculator gives the two limits. This is helpful for puzzles, for building a frame with two given struts, and for checking measurements from a survey.

Classifying the triangle

When the sides do make a triangle, the calculator tells you its type. If all three sides are equal, it is equilateral. If two are equal, it is isosceles, and if none are, it is scalene. By its angles, the triangle is right if the sum of the squares of the two shorter sides equals the square of the longest, acute if it is greater, and obtuse if it is less. These are the usual tests from the Pythagorean theorem and its converse. The sides 3, 4 and 5 give a scalene right triangle. The sides 5, 5 and 8 give an isosceles obtuse triangle, since 25 + 25 = 50 is less than 64. The sides 5, 5 and 7 give an isosceles acute one.

Worked examples

Can you make a triangle from sticks of 7, 10 and 5 cm? The sums are 17, 15 and 12, and each is more than the third stick, so yes. The triangle is scalene, and since 25 + 49 = 74 is less than 100, it is obtuse. What about 4, 4 and 9? The two short sticks add up to 8, which is less than 9, so no triangle is possible. What lengths can the third side take if two sides are 8 and 12? From 4 up to 20, exclusive.

Why the rule makes sense

The shortest path between two points is a straight line. In a triangle, the side joining two corners is the straight path between them, and going via the third corner is a detour, so the two other sides together must be longer, unless the corner lies on the straight line. That is the triangle inequality, and the same idea underlies distance in geometry and in many fields of mathematics, where it is one of the basic rules for any measure of distance.

Triangle inequality in other settings

The same rule holds for the distances between any three points, in a plane or in space: the direct distance from one point to another is never longer than the distance by way of a third point. It is used to check measurements, since a set of three measured distances that break the rule must contain an error. It is also used in computer science, where a distance measure must obey it to be useful for searching, and in the study of graphs and networks, where the shortest route is never longer than a route that stops along the way.

Using the range for design

Suppose that you are designing a triangular bracket with two struts of 30 cm and 45 cm. The third strut must be longer than 15 cm and shorter than 75 cm. If you want a right angle between the two given struts, the third is √(900 + 2025), about 54.1 cm, which lies inside the range, as it must. Try values at the ends of the range to see how the triangle flattens.

Common mistakes

  • Testing only one sum. All three sums must pass, though checking the two shorter sides against the longest is enough.
  • Allowing equality. Equality gives a flat triangle.
  • Mixing units. Give all sides in the same unit.
  • Taking the range as inclusive. The limits themselves give flat triangles.

What next

Use this often? Add Triangle Ine to your Home screen.

Frequently asked questions

What is a triangle inequality calculator?

A tool that checks whether three lengths can be the sides of a triangle by testing that each side is shorter than the other two added together.

What is the triangle inequality theorem?

The sum of the lengths of any two sides of a triangle is greater than the length of the third side.

How do I find the range of the third side?

It must be greater than the difference of the other two sides and less than their sum. For 3 and 4, it lies between 1 and 7.

Can 1, 2 and 3 make a triangle?

Only a flat one. 1 + 2 equals 3, so the three corners lie on a line and the area is zero.

How can I tell if a triangle is right, acute or obtuse?

Compare the square of the longest side with the sum of the squares of the other two: equal means right, less means acute, more means obtuse.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Math Tools