Pythagorean Triples Calculator

Generate integer side lengths for right triangles up to a chosen limit.

Generate Pythagorean triples
Enter the largest allowed hypotenuse to list every matching integer triangle.

About Pythagorean triples

A Pythagorean triple is a set of three positive integers a, b, and c that satisfies a squared plus b squared equals c squared. Those values can be the side lengths of a right triangle, with a and b as the legs and c as the hypotenuse. The familiar 3, 4, 5 combination is the smallest example because 9 plus 16 equals 25. This calculator searches all increasing pairs of integer legs and keeps each pair whose calculated hypotenuse is also an integer within the selected limit. A triple is primitive when its three numbers share no common factor greater than one. For example, 3, 4, 5 is primitive, while 6, 8, 10 is not because every value is twice the corresponding value in 3, 4, 5. Non-primitive triples are still perfectly valid right triangles; they are scaled copies of smaller primitive triangles. The calculator labels each result by computing the greatest common divisor of all three sides, making it easy to distinguish fundamental patterns from their multiples. Pythagorean triples have practical and historical importance. Builders can use a 3-4-5 rope or measured layout to establish a right angle. Teachers use triples to demonstrate the theorem without introducing decimal square roots, and number theory uses them to explore divisibility and integer parameterizations. Euclid's formula generates primitive triples from two integers m and n: the legs are m squared minus n squared and two times m times n, while the hypotenuse is m squared plus n squared. Multiplying those values by a positive integer produces related non-primitive triples. The maximum hypotenuse controls the size of the search rather than the number of results. A limit of 15 includes triples with c equal to 5, 10, 13, and 15. Each triangle appears once with the shorter leg first, so swapped duplicates are omitted. The range is capped to keep browser calculations responsive. For larger mathematical investigations, Euclid's formula is more efficient than checking every pair, but this exhaustive method is transparent and guarantees a complete ordered list within the selected range.

Pythagorean triple examples

Maximum cIncluded triplesObservation
53, 4, 5The smallest primitive triple
103, 4, 5 and 6, 8, 10Includes one primitive triple and one multiple
153, 4, 5; 6, 8, 10; 5, 12, 13; 9, 12, 15Four triples have hypotenuse at most 15

How to generate triples

  1. Choose the largest hypotenuse you want included in the search.
  2. Enter that limit as a whole number from 5 through 500.
  3. Select Generate triples to test all eligible integer leg pairs.
  4. Review each ordered triple and its primitive or multiple label.

Frequently asked questions

What makes three numbers a Pythagorean triple?

Their two smaller squares must add exactly to the square of the largest number. The largest number is the hypotenuse of the corresponding right triangle.

What is a primitive Pythagorean triple?

A primitive triple has no common divisor greater than one across all three sides. It is not a whole-number scaling of a smaller triple.

Is every multiple also a valid triple?

Yes, multiplying all sides of a valid triple by the same positive integer preserves the equation. The new triangle has the same angles and a larger scale.

Why is 3, 4, 5 important?

It is the smallest positive integer Pythagorean triple. Its simple proportions also make it useful for laying out right angles in practical work.

Does the calculator include duplicate triples?

No, each triangle is listed once with its shorter leg first. Reversing the two legs does not create a different triangle.