Pythagorean Triple Generator and Checker

Generate a list, create one triple from m and n, find triples containing a known side, or verify three integers.

All calculations happen locally in your browser; your inputs are not uploaded.

What do you want to do?

Quick examples

Pythagorean right triangle preview A right triangle with legs 3 and 4 and hypotenuse 5. a = 3 b = 4 c = 5 Right triangle

Results

5 triples shown. Select a row to preview its triangle.

Generated Pythagorean triples; use Details for the equation, Euclid parameters, GCD, area, and perimeter.
TripleTypeActions
(3, 4, 5)Primitive3² + 4² = 9 + 16 = 25 = 5²
(6, 8, 10)Scaled ×22 × (3, 4, 5)
(5, 12, 13)Primitive5² + 12² = 25 + 144 = 169 = 13²
(8, 15, 17)Primitive8² + 15² = 64 + 225 = 289 = 17²
(7, 24, 25)Primitive7² + 24² = 49 + 576 = 625 = 25²

Advertisement

How Pythagorean triples work

A Pythagorean triple is a set of positive integers (a, b, c) satisfying a² + b² = c², where c is the hypotenuse. To check a candidate, order its sides and square them: 7² + 24² = 49 + 576 = 625 = 25².

Primitive and scaled triples

A triple is primitive when gcd(a,b,c)=1. Thus (3,4,5) is primitive, while (12,16,20) has GCD 4 and is the scaled triple 4×(3,4,5).

Euclid’s formula and its exact conditions

For integers m>n>0, the scaled formula is a=k(m²−n²), b=2kmn, c=k(m²+n²). It produces a primitive triple precisely when gcd(m,n)=1, m and n have opposite parity, and k=1. Other valid inputs can produce non-primitive triples.

Algebraic check: (m²−n²)²+(2mn)² = m⁴−2m²n²+n⁴+4m²n² = m⁴+2m²n²+n⁴ = (m²+n²)².

Finding a triple containing a known side

Select “Find a known leg” or another finder option. A side can belong to more than one triple, so the tool searches every Euclid seed and scale up to a sufficient calculated bound and reports that bound. For example, leg 20 has four matches through (20,99,101), not just the matches below the old default c≤200 by coincidence.

Common primitive triples below 100

abcPerimeter
34512
5121330
8151740
7242556
20212970
12353784
9404190
284553126
116061132
335665154
166365144
485573176
138485182
367785198
398089208
657297234

Examples of scaled triples

TriplePrimitive baseScaleGCD
(6,8,10)(3,4,5)22
(9,12,15)(3,4,5)33
(12,16,20)(3,4,5)44
(10,24,26)(5,12,13)22

Frequently asked questions

What is the smallest Pythagorean triple?

The smallest Pythagorean triple is (3, 4, 5), because 3² + 4² = 9 + 16 = 25 = 5².

Is 6-8-10 a primitive Pythagorean triple?

No. (6, 8, 10) is valid, but its greatest common divisor is 2, so it is 2 × (3, 4, 5).

How do I test whether three numbers form a Pythagorean triple?

Order the positive integers from smallest to largest and check whether the squares of the two smaller numbers add to the square of the largest: a² + b² = c².

What conditions make Euclid's formula produce a primitive triple?

Use integers m > n > 0 with gcd(m,n)=1 and opposite parity, then set a=m²−n², b=2mn, and c=m²+n². Use scale factor k=1 for a primitive triple.

Can one side occur in multiple Pythagorean triples?

Yes. For example, leg 20 occurs in (15,20,25), (20,21,29), (20,48,52), and (20,99,101).

Are there infinitely many Pythagorean triples?

Yes. Euclid's formula produces infinitely many primitive triples, and every positive integer multiple of a triple is also a triple.

Can an integer right triangle be isosceles?

No. Equal integer legs would require c=a√2, which is not an integer for any positive integer a.

Method and validation

The list and finder enumerate primitive seeds using Euclid’s formula, then apply positive scale factors. Legs are ordered a≤b and a composite key removes duplicates. The checker independently compares a²+b² with c².

Known test cases: (3,4,5), (5,12,13), (7,24,25), scaled (6,8,10), invalid (2,3,4), leg 20’s four matches, and both primitive triples with c=65.

References: Wolfram MathWorld: Pythagorean Triple; Euclid’s Elements, Book I, Proposition 47 (Trinity College Dublin).

Last reviewed: 17 July 2026. No named mathematical reviewer is claimed.

Explore more tools