Concepts · 5 min read

Pythagorean Triples: A Full List and How to Generate Them

Pythagorean Triples: A Full List and How to Generate Them — illustration
In short: A Pythagorean triple is three whole numbers with a² + b² = c², such as 3-4-5. Euclid's formula generates every primitive triple, and there are 16 primitive triples with a hypotenuse of 100 or less.

What a Pythagorean triple is

The Pythagorean theorem says that in a right triangle the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². Most right triangles have at least one irrational side, such as a triangle with legs 1 and 1 and hypotenuse √2. A Pythagorean triple is the special case where all three sides are whole numbers.

The smallest and most famous is 3-4-5, since 9 + 16 = 25. Next is 5-12-13: 25 + 144 = 169. These show up in geometry homework because the answers come out clean.

Check the 3-4-5 triple: a² + b² (should equal 5² = 25)
Answer25
Order-of-operations steps 3 steps

Start: 3^2 + 4^2

  1. Exponent
    3^2 = 9→ 9 + 4^2
  2. Exponent
    4^2 = 16→ 9 + 16
  3. Add
    9 + 16 = 25→ 25

Primitive triples and multiples

A triple is primitive when its three numbers share no common factor greater than 1. Multiplying a primitive triple by any whole number gives another triple, because scaling every side by k scales both sides of the equation by k². So 3-4-5 leads to 6-8-10, 9-12-15, 12-16-20 and so on, all of the same shape.

This means you only need to understand primitive triples. Every other triple is a whole-number multiple of one of them.

Euclid’s formula

Pick two whole numbers m > k > 0. Then a = m² − k², b = 2mk and c = m² + k² form a Pythagorean triple. The triple is primitive when m and k have no common factor and one of them is even and the other odd.

For example, m = 2 and k = 1 give a = 3, b = 4, c = 5. For m = 3 and k = 2 you get a = 5, b = 12, c = 13. It works because (m² − k²)² + (2mk)² expands to m⁴ + 2m²k² + k⁴, which equals (m² + k²)².

Why does this give all primitive triples? Any primitive triple has exactly one even leg and an odd hypotenuse, and working back from the equation a² = (c − b)(c + b) forces the factors to be squares, which leads to the m and k above. The full proof is classical and appears in number theory textbooks.

A list of primitive triples

mkabca² + b² = c²
213459 + 16 = 25
325121325 + 144 = 169
418151764 + 225 = 289
437242549 + 576 = 625
52202129400 + 441 = 841
61123537144 + 1225 = 1369
549404181 + 1600 = 1681
72284553784 + 2025 = 2809
65116061121 + 3600 = 3721
743356651089 + 3136 = 4225
81166365256 + 3969 = 4225
834855732304 + 3025 = 5329
76138485169 + 7056 = 7225
923677851296 + 5929 = 7225
853980891521 + 6400 = 7921
946572974225 + 5184 = 9409

Every row was generated by the formula and checked by adding the squares, so you can reuse any of them as practice problems with known whole-number answers.

Checking whether three numbers form a triple

To test any three whole numbers, square them, sort them and see whether the two smaller squares add up to the largest square. Do not assume the hypotenuse is the last number you were given.

NumbersSquaresTriple?
7, 24, 2549, 576, 625Yes
8, 15, 1764, 225, 289Yes
6, 7, 936, 49, 81No
9, 40, 4181, 1600, 1681Yes
10, 24, 26100, 576, 676Yes
12, 13, 15144, 169, 225No

Near misses such as 12-13-15 are worth remembering: 144 + 169 = 313, which is not 225, so no right angle exists there. Also note that 10-24-26 is a triple but not primitive, because it is 2 times 5-12-13.

How many are there?

There are infinitely many triples, but they get sparser as the numbers grow. This table counts primitive triples by the size of the hypotenuse.

Hypotenuse up toPrimitive triples
507
10016
20032
50080
1000158
0501001502007≤5016≤10032≤20080≤500158≤1000
Primitive triples by hypotenuse limit, computed from Euclid’s formula.

Where triples are used

  • Squaring corners. Builders and gardeners mark 3, 4 and 5 units to check a right angle without an instrument. Any multiple, such as 6-8-10 or 9-12-15, works for larger layouts.
  • Tests and homework. Problems often use 5-12-13 or 8-15-17 so that no square roots are needed.
  • Coordinates. Points at whole-number distance, for example (0,0) and (3,4), are exactly 5 apart.

If you need the missing side of any right triangle, not only a triple, enter the two known sides into the Pythagorean theorem calculator and it shows each step. See Pythagorean theorem proofs for why the theorem is true.

Frequently asked questions

Is 6-8-10 a Pythagorean triple?

Yes, it is a multiple of 3-4-5, since 36 + 64 = 100. It is not primitive because all three numbers share the factor 2.

Can the hypotenuse of a primitive triple be even?

No. In a primitive triple the hypotenuse is always odd, and exactly one of the two legs is even.

Are there triples with consecutive legs?

Yes, for instance 3-4-5 and 20-21-29, but they are rare.

Is there a triple for every whole number?

Every whole number greater than 2 appears as a leg in at least one triple, but not every number appears as a hypotenuse.

Written and reviewed by Mateuss M.

Mateuss M. writes and reviews mathematical content for CalcSolver, focusing on online calculators, formulas, equations, and practical math tools. He reviews calculator functionality, calculation methods, formulas, examples, and explanations to help ensure that each tool is clear, useful, and easy to understand.

Keep reading