Calcoid
Math

Pythagorean Triple Calculator

Check whether (a, b, c) is a Pythagorean triple and generate every triple up to a hypotenuse cap. Uses Euclid's formula and exposes the primitive form behind any non-primitive triple.

Pythagorean Triples

Enter three positive integers. The calculator sorts them and treats the largest as the hypotenuse, then checks whether a² + b² = c².

Pythagorean triple

(3, 4, 5)

3² + 4² = 25 = 5²

TypePrimitive
Scale factor (gcd)1

Frequently Asked Questions about the Pythagorean Triple Calculator

What is a Pythagorean triple?
A Pythagorean triple is a set of three positive integers (a, b, c) that satisfy a^2 + b^2 = c^2, the Pythagorean theorem. The two smaller numbers are the legs of a right triangle and the largest is the hypotenuse. Because all three sides come out to whole numbers, these triples are useful any time you want an exact right triangle without decimals, from carpentry layouts to coordinate geometry problems.
Why is (3, 4, 5) the classic example?
It is the smallest Pythagorean triple in positive integers: 3^2 + 4^2 = 9 + 16 = 25 = 5^2. Builders use the 3-4-5 rule to square a corner with nothing but a tape measure: mark 3 feet along one wall, 4 feet along the other, and adjust until the diagonal reads exactly 5 feet. Any multiple works too, so 6-8-10, 9-12-15, and 30-40-50 give you the same right angle at a larger scale.
What is the difference between primitive and non-primitive triples?
A primitive Pythagorean triple is one where gcd(a, b, c) = 1, meaning the three sides share no common factor greater than 1. (3, 4, 5), (5, 12, 13), and (8, 15, 17) are primitive. Multiplying a primitive triple by any positive integer k produces a non-primitive triple: doubling (3, 4, 5) gives (6, 8, 10), tripling gives (9, 12, 15), and so on. This calculator flags which kind you have and, for a non-primitive triple, divides out the gcd to show the underlying primitive form.
How does Euclid's formula generate Pythagorean triples?
Pick two positive integers m and n with m > n, gcd(m, n) = 1, and m - n odd. Then (a, b, c) = (m^2 - n^2, 2mn, m^2 + n^2) is a primitive Pythagorean triple, and every primitive triple comes out of this formula exactly once. For m=2, n=1 you get (3, 4, 5). For m=3, n=2: (5, 12, 13). For m=4, n=1: (15, 8, 17). The generator mode in this calculator walks every valid (m, n) pair within the cap and, when you allow non-primitives, also multiplies each primitive by k = 1, 2, 3, ... until the hypotenuse would exceed your limit.
How many primitive Pythagorean triples have a hypotenuse of 100 or less?
Sixteen. Listed by hypotenuse they are 5, 13, 17, 25, 29, 37, 41, 53, 61, 65 (two triples), 73, 85 (two triples), 89, and 97. Both 65 and 85 sit at the intersection of two different primitive triples (65 = 16^2 + 63^2 = 33^2 + 56^2; 85 = 13^2 + 84^2 = 36^2 + 77^2), which is why the count of triples is sixteen even though only fourteen distinct hypotenuse values appear.