A Pythagorean triple is a set of three positive whole numbers a, b and c with a2 + b2 = c2. The smallest is 3, 4, 5, because 9 + 16 = 25. Every triple gives a right triangle whose sides are all whole numbers, which is why the same few triples keep turning up in homework, on tests and on building sites.
There are infinitely many Pythagorean triples, but they are far from random. This page covers the ones to know, how to build new ones, how to check a set of numbers, and the patterns that every triple obeys. For complete tables, see the list of Pythagorean triples.
What is a Pythagorean triple?
Formally, a Pythagorean triple is a set (a, b, c) of positive integers such that a2 + b2 = c2. We usually list the numbers from smallest to largest and join them with hyphens, as in 5-12-13. The largest number, c, plays the part of the hypotenuse; the other two are the legs.
Triples and right triangles are two views of the same thing. The Pythagorean theorem says the sides of every right triangle satisfy a2 + b2 = c2, and its converse says any three lengths that satisfy the equation form a right triangle. So a Pythagorean triple is exactly the list of side lengths of a right triangle whose sides are all whole numbers.
Example: is 5, 12, 13 a Pythagorean triple?
Square the two smaller numbers, add them, and compare with the square of the largest.
52 + 122= 25 + 144 = 169132= 169The two sides match, so 5-12-13 is a Pythagorean triple.
What does not countThree numbers that fail the equation, such as 2, 3, 4 (4 + 9 = 13, not 16), are not a triple: they make a triangle, but an obtuse one. And 1, 1, √2 satisfies the equation but is not a triple, because √2 is not a whole number. Decimals such as 1.5, 2, 2.5 do fit (2.25 + 4 = 6.25), but that is just 3-4-5 cut in half.
Common Pythagorean triples
Seven triples have no common factor and a hypotenuse below 50. Here they are with the arithmetic that proves each one, and the area of the right triangle each one makes (half the product of the legs):
| Triple | a² | b² | a² + b² | c² | Area |
|---|---|---|---|---|---|
| 3-4-5 | 9 | 16 | 25 | 25 | 6 |
| 5-12-13 | 25 | 144 | 169 | 169 | 30 |
| 8-15-17 | 64 | 225 | 289 | 289 | 60 |
| 7-24-25 | 49 | 576 | 625 | 625 | 84 |
| 20-21-29 | 400 | 441 | 841 | 841 | 210 |
| 12-35-37 | 144 | 1,225 | 1,369 | 1,369 | 210 |
| 9-40-41 | 81 | 1,600 | 1,681 | 1,681 | 180 |
TipLearn 3-4-5, 5-12-13, 8-15-17 and 7-24-25 by heart, together with their multiples. They cover most textbook and test questions: if a problem gives legs 10 and 24, you can say "hypotenuse 26" straight away, because that is 5-12-13 doubled. The SAT and ACT guide shows how often this shortcut pays off.
Two of these triples have legs that differ by just 1: 3-4-5 and 20-21-29. The next one like that is 119-120-169. Triangles of this kind are almost isosceles, and they are surprisingly rare.
Multiples of a triple
Multiply all three numbers of a triple by the same whole number k and you always get another triple. The algebra takes one line:
(ka)2 + (kb)2 = k2(a2 + b2) = k2c2 = (kc)2The bigger triangle is similar to the original: same angles, every side k times as long. That is why 6-8-10, 9-12-15 and 30-40-50 behave exactly like the 3-4-5 triangle, and 10-24-26 like the 5-12-13 triangle.
| k = 1 (primitive) | k = 2 | k = 3 | k = 4 | k = 5 |
|---|---|---|---|---|
| 3-4-5 | 6-8-10 | 9-12-15 | 12-16-20 | 15-20-25 |
| 5-12-13 | 10-24-26 | 15-36-39 | 20-48-52 | 25-60-65 |
| 8-15-17 | 16-30-34 | 24-45-51 | 32-60-68 | 40-75-85 |
| 7-24-25 | 14-48-50 | 21-72-75 | 28-96-100 | 35-120-125 |
It works in reverse too. If all three numbers share a factor, divide it out: 30-40-50 divided by 10 is 3-4-5, and 20-48-52 divided by 4 is 5-12-13. Spotting a disguised multiple is often the fastest way to solve a problem.
Primitive and non-primitive triples
A triple is primitive when its three numbers have no common factor greater than 1, like 3-4-5, 5-12-13 and 20-21-29. Triples such as 6-8-10 (common factor 2) and 9-12-15 (common factor 3) are non-primitive.
Key ideaEvery Pythagorean triple is a whole-number multiple of exactly one primitive triple. To find it, divide all three numbers by their greatest common factor.
So the primitive triples are the building blocks: list them and you have, in effect, listed every triple. Among the 52 triples with hypotenuse up to 100, only 16 are primitive. The primitive Pythagorean triples page shows how to test for primitivity and proves the facts used below.
How to generate Pythagorean triples
The classic recipe is Euclid's formula. Choose two whole numbers m > n > 0 and compute
a = m2 − n2, b = 2mn, c = m2 + n2It always works, because (m2 − n2)2 + (2mn)2 = m4 + 2m2n2 + n4 = (m2 + n2)2. A few choices of m and n:
| m | n | a = m² − n² | b = 2mn | c = m² + n² | Triple |
|---|---|---|---|---|---|
| 2 | 1 | 4 − 1 = 3 | 2 × 2 × 1 = 4 | 4 + 1 = 5 | 3-4-5 |
| 3 | 2 | 9 − 4 = 5 | 2 × 3 × 2 = 12 | 9 + 4 = 13 | 5-12-13 |
| 4 | 1 | 16 − 1 = 15 | 2 × 4 × 1 = 8 | 16 + 1 = 17 | 8-15-17 |
| 4 | 3 | 16 − 9 = 7 | 2 × 4 × 3 = 24 | 16 + 9 = 25 | 7-24-25 |
| 5 | 2 | 25 − 4 = 21 | 2 × 5 × 2 = 20 | 25 + 4 = 29 | 20-21-29 |
| 5 | 4 | 25 − 16 = 9 | 2 × 5 × 4 = 40 | 25 + 16 = 41 | 9-40-41 |
If m and n have no common factor and one of them is even, the triple is primitive, and every primitive triple comes from exactly one such pair. Multiplying by k then gives all the rest.
Two quick shortcuts
- Start from an odd number (the method credited to Pythagoras). For any odd a ≥ 3, take b = a2 − 1 over 2 and c = b + 1. With a = 11: b = 60, c = 61, and indeed 121 + 3600 = 3721 = 612.
- Start from an even number (the method credited to Plato). For any even a = 2k ≥ 4, take b = k2 − 1 and c = k2 + 1. With a = 12, k = 6: 12-35-37.
Together they show that every whole number from 3 upward is a leg of at least one triple. For other methods, including a family tree that grows every primitive triple from 3-4-5, see the tree of primitive Pythagorean triples, or let the Pythagorean triples generator do the work.
How to recognize a Pythagorean triple
- Check they are whole numbers. A triple has no decimals, fractions or roots.
- Call the largest number c. The hypotenuse is always the longest side.
- Divide out any common factor to make the numbers smaller. This step is optional, but it makes the arithmetic easier.
- Test a2 + b2 = c2. If the two sides are equal, you have a triple; if not, you don't.
Example 1: 33, 56, 65
332 + 562= 1089 + 3136 = 4225652= 4225Yes. The numbers share no factor, so 33-56-65 is a primitive triple.
Example 2: 45, 60, 75
All three numbers are multiples of 15. Dividing by 15 gives 3, 4, 5.
Yes: 45-60-75 is 15 × (3-4-5), so there is no need to square 75.
Example 3: 9, 13, 16
Both smaller numbers are odd. As the next section shows, two odd legs can never work, so you can say no before calculating. The check agrees: 81 + 169 = 250, but 162 = 256.
No, 9, 13, 16 is not a triple.
For lengths that are not whole numbers, the same test tells you whether a triangle is right-angled; try the right triangle checker.
Patterns every triple shares
Perfect squares can only leave certain remainders when you divide them by 3, 4 or 5, and that forces strict patterns on every Pythagorean triple:
- At least one leg is even, and in fact a multiple of 4. Both legs can never be odd: an odd square is 1 more than a multiple of 4, so two of them add up to 2 more than a multiple of 4, which no perfect square is.
- At least one leg is a multiple of 3.
- At least one of the three numbers is a multiple of 5.
- So the product of the legs is a multiple of 12, the area 1 over 2ab is a multiple of 6, and the product abc is a multiple of 60.
| Triple | Leg divisible by 4 | Leg divisible by 3 | Number divisible by 5 | Area (a multiple of 6) |
|---|---|---|---|---|
| 3-4-5 | 4 | 3 | 5 | 6 = 6 × 1 |
| 5-12-13 | 12 | 12 | 5 | 30 = 6 × 5 |
| 8-15-17 | 8 | 15 | 15 | 60 = 6 × 10 |
| 7-24-25 | 24 | 24 | 25 | 84 = 6 × 14 |
| 20-21-29 | 20 | 21 | 20 | 210 = 6 × 35 |
| 12-35-37 | 12 | 12 | 35 | 210 = 6 × 35 |
| 9-40-41 | 40 | 9 | 40 | 180 = 6 × 30 |
These rules make fast lie detectors. Someone claims 7, 24, 26 is a triple? None of the three numbers is a multiple of 5, so it can't be, and indeed 49 + 576 = 625 = 252: the hypotenuse should be 25. In a primitive triple there is more: exactly one leg is even and the hypotenuse is always odd. The proofs are on the primitive triples page.
Why Pythagorean triples matter
- On site. Builders mark out right angles with the 3-4-5 rule: measure 3 along one line, 4 along the other, and adjust until the diagonal is exactly 5. Multiples such as 6-8-10 or 9-12-15 do the same job on a bigger scale. See the theorem in construction.
- In class. Triples give problems with tidy whole-number answers, so recognizing them saves time and catches mistakes.
- In history. A Babylonian clay tablet, Plimpton 322 (about 1800 BCE), records numbers from 15 right triangles with whole-number sides, more than a thousand years before Pythagoras. Euclid's Elements (about 300 BCE) gives a general method for finding them.
- In number theory. Asking whether an + bn = cn has whole-number solutions for powers above 2 led to Fermat's Last Theorem, finally proved by Andrew Wiles in 1994–95. Adding a third dimension gives Pythagorean quadruples such as 1, 2, 2, 3.
Explore the triples section
Each page below goes deeper into one part of the story, from complete tables to proofs:
- TriplesList of Pythagorean TriplesComplete, computer-checked list of Pythagorean triples: all 52 with hypotenuse up to 100 and all 47 primitive triples up to 300, with m, n, perimeter and area.
- TriplesPrimitive Pythagorean TriplesWhat makes a Pythagorean triple primitive, the quick gcd test, why exactly one leg is even, and a full proof that Euclid's formula gives every primitive triple.
- TriplesEuclid's Formula for Pythagorean TriplesEuclid's formula a = m² − n², b = 2mn, c = m² + n² explained: two derivations, a table for m ≤ 8, when the triple is primitive, and four other classic generators.
- TriplesThe Tree of Primitive Pythagorean TriplesThe Berggren tree builds every primitive Pythagorean triple exactly once from 3-4-5 using three matrices. See the tree to depth 3, worked examples and the proof.
- TriplesThe 3-4-5 TriangleThe 3-4-5 triangle explained: its angles (36.87° and 53.13°), area, perimeter and inradius, the 3-4-5 rule for square corners, multiples and history.
- TriplesThe 5-12-13 TriangleThe 5-12-13 right triangle: its angles (22.62° and 67.38°), area, perimeter, multiples, why it is primitive, examples and the 3-4-5, 5-12-13, 7-24-25 family.
- TriplesPythagorean QuadruplesPythagorean quadruples are whole-number boxes with a whole-number space diagonal: full list up to d = 41, how to make them, Euler bricks and the perfect cuboid.
- TriplesFermat's Last TheoremFermat's Last Theorem says aⁿ + bⁿ = cⁿ has no whole-number solutions for n > 2: Fermat's margin note, his proof for n = 4, Wiles's proof, why squares differ.
Frequently asked questions
What are the most common Pythagorean triples?
The ones you meet most often are 3-4-5, 5-12-13, 8-15-17 and 7-24-25, followed by 20-21-29, 12-35-37 and 9-40-41. Their multiples, especially 6-8-10, 9-12-15 and 10-24-26, are just as common in textbook problems.
How many Pythagorean triples are there?
Infinitely many. The multiples of 3-4-5 alone never run out, and there are also infinitely many primitive triples: 16 with hypotenuse up to 100 and 158 with hypotenuse up to 1,000.
Can all three numbers in a Pythagorean triple be odd?
No. If both legs were odd, their squares would add up to an even number, so the hypotenuse would be even. In fact both legs can't even be odd at the same time, so every triple contains at least one even leg.
Can two different triples have the same hypotenuse?
Yes. The number 25 is the hypotenuse of both 7-24-25 and 15-20-25, and 65 is the hypotenuse of four triples: 16-63-65, 25-60-65, 33-56-65 and 39-52-65. The list page shows which hypotenuses repeat and why.
Is 6-8-10 a Pythagorean triple?
Yes, because 36 + 64 = 100. It is a non-primitive triple: every number is twice the corresponding number in 3-4-5, so the triangle is a 3-4-5 triangle scaled up by a factor of 2.
Do the numbers have to be in order?
No. The set {4, 3, 5} is the same triple as 3-4-5, and it describes the same triangle. Listing the numbers from smallest to largest is just a habit that makes it obvious which one is the hypotenuse.
Keep exploring
- TriplesList of Pythagorean TriplesComplete, computer-checked list of Pythagorean triples: all 52 with hypotenuse up to 100 and all 47 primitive triples up to 300, with m, n, perimeter and area.
- TriplesEuclid's Formula for Pythagorean TriplesEuclid's formula a = m² − n², b = 2mn, c = m² + n² explained: two derivations, a table for m ≤ 8, when the triple is primitive, and four other classic generators.
- TriplesPrimitive Pythagorean TriplesWhat makes a Pythagorean triple primitive, the quick gcd test, why exactly one leg is even, and a full proof that Euclid's formula gives every primitive triple.
- TriplesThe 3-4-5 TriangleThe 3-4-5 triangle explained: its angles (36.87° and 53.13°), area, perimeter and inradius, the 3-4-5 rule for square corners, multiples and history.
- CalculatorsPythagorean Triples GeneratorGenerate every Pythagorean triple up to any hypotenuse, use Euclid's formula, check whether three numbers form a triple, or find all triples with a number.
- LearnConverse of the Pythagorean TheoremThe converse of the Pythagorean theorem explained: the statement, a clear proof, how to test any three side lengths, and many yes-or-no worked examples.