Launch Main Calculator

Pythagorean Triple Calculator

A Pythagorean Triple consists of three positive integers (a, b, c) that satisfy the fundamental equation a² + b² = c². Use this specialized calculator to verify integer sets, find missing integer sides, generate lists of primitive triples, and apply Euclid's formula.

Explore fundamental primitive triples such as 3-4-5, 5-12-13, 7-24-25, and 8-15-17, test scaling multipliers, examine shared hypotenuse families, and analyze integer right triangles with precision.

Pythagorean Triples Integer Right Triangles Primitive Triples Triple Generator 3-4-5 Triple

Pythagorean Triple Calculator Tool

Pythagorean Triple Suite

Pythagorean Triple Diagram
Triple Calculation Summary
Step-by-Step Breakdown:

What Is a Pythagorean Triple?

A Pythagorean triple is a set of three positive integers (a, b, c) that satisfy the Pythagorean equation:

a² + b² = c²

In this relationship, a and b represent the integer lengths of the perpendicular legs of a right triangle, while c represents the integer length of the hypotenuse (the longest side opposite the right angle).

Classic examples of Pythagorean triples include:

Crucially, a Pythagorean triple requires all three side lengths to be exact positive integers. Non-integer right triangle side combinations (such as 1, 1, √2) satisfy the general Pythagorean theorem but are not Pythagorean triples.

Pythagorean Triple Formula

The defining mathematical formula for integer triples is derived directly from right-triangle geometry:

a² + b² = c²   (where a, b, c are positive integers 1, 2, 3...)

Where:

This formula enforces two simultaneous constraints: geometric right-angle alignment and exact integer closure.

How the Pythagorean Triple Calculator Works

The Pythagorean Triple Calculator provides four specialized computational modes to work with integer triples:

1. Check Triple Mode

Takes three positive integers a, b, and c, sorts them so that the largest value is candidate hypotenuse c, evaluates a² + b² versus , and determines primitive status via gcd(a,b,c).

2. Find Third Side Mode

Solves for an unknown hypotenuse or missing leg from two known integers. It verifies whether the resulting side is a positive integer before classifying the set as a true Pythagorean triple.

3. Generate Triples Mode

Iterates systematically up to a specified maximum hypotenuse c, finding all unique canonical triples (where a < b < c) and allowing filtering by primitive status.

4. Euclid's Formula Mode

Uses parameters m > n > 0 to construct exact triples via a = m² - n², b = 2mn, and c = m² + n², giving step-by-step mathematical proofs.

How to Check Whether Three Numbers Form a Pythagorean Triple

Follow this 5-step procedure to determine if three given numbers form a valid Pythagorean triple:

  1. Verify Integer Status: Ensure that all three numbers a, b, and c are positive whole numbers (1, 2, 3...) in Euclidean geometry. If any value is a decimal or fraction, it is not a Pythagorean triple.
  2. Identify the Largest Value: Assign the largest number to candidate hypotenuse c. Assign the remaining two smaller values to legs a and b.
  3. Square the Legs: Calculate a² and b², then sum them: a² + b².
  4. Square the Candidate Hypotenuse: Calculate c².
  5. Compare Sums: If a² + b² = c², the three numbers form a valid Pythagorean triple.

Worked Checking Example: (5, 12, 13)

1. Values are integers: 5, 12, 13 ✓

2. Largest value is c = 13; legs are a = 5, b = 12.

3. Sum of squared legs: 5² + 12² = 25 + 144 = 169.

4. Hypotenuse squared: 13² = 169.

5. Comparison: 169 = 169 ✓ (5-12-13 is a valid Pythagorean triple).

Common Pythagorean Triples

Pythagorean triples are integer side combinations that satisfy right-triangle geometry (a² + b² = c²). Below are the four most famous primitive parent triples, followed by an interactive reference list up to hypotenuse c = 100:

Primitive Base gcd = 1
(3, 4, 5)
3² + 4² = 9 + 16 = 25 = 5²
Primitive Base gcd = 1
(5, 12, 13)
5² + 12² = 25 + 144 = 169 = 13²
Primitive Base gcd = 1
(7, 24, 25)
7² + 24² = 49 + 576 = 625 = 25²
Primitive Base gcd = 1
(8, 15, 17)
8² + 15² = 64 + 225 = 289 = 17²

Interactive Pythagorean Triple Reference Table

Filter by primitive or scaled status, or click Test on any row to load the triple into the calculator:

Leg a Leg b Hypotenuse c Primitive? GCD Factor / Family Action
345✓ YesFundamental Base (3-4-5)
51213✓ YesFundamental Base (5-12-13)
6810⚡ Scaled2 × (3-4-5)
72425✓ YesFundamental Base (7-24-25)
81517✓ YesFundamental Base (8-15-17)
91215⚡ Scaled3 × (3-4-5)
94041✓ YesFundamental Base (9-40-41)
102426⚡ Scaled2 × (5-12-13)
121620⚡ Scaled4 × (3-4-5)
123537✓ YesFundamental Base (12-35-37)
152025⚡ Scaled5 × (3-4-5)
163034⚡ Scaled2 × (8-15-17)
202129✓ YesFundamental Base (20-21-29)
284553✓ YesFundamental Base (28-45-53)
335665✓ YesFundamental Base (33-56-65)
367785✓ YesFundamental Base (36-77-85)
398089✓ YesFundamental Base (39-80-89)
485573✓ YesFundamental Base (48-55-73)
657297✓ YesFundamental Base (65-72-97)

Primitive Pythagorean Triples

A primitive Pythagorean triple is a triple (a, b, c) where the three side lengths share no common factor greater than 1. Formally, their greatest common divisor is 1:

gcd(a, b, c) = 1

Key properties of primitive Pythagorean triples:

Non-Primitive Pythagorean Triples

A non-primitive Pythagorean triple is an integer triple (a, b, c) whose side lengths share a common divisor k > 1. Formally:

gcd(a, b, c) = k > 1

Every non-primitive triple can be simplified by dividing each side by k, resulting in its underlying primitive parent triple (a/k, b/k, c/k).

Examples of non-primitive triples derived from (3, 4, 5):

Primitive vs. Non-Primitive Pythagorean Triples

The following table summarizes the structural differences between primitive and non-primitive triples:

Feature / Property Primitive Triple gcd = 1 Non-Primitive Triple gcd > 1
GCD Condition gcd(a,b,c) = 1 gcd(a,b,c) = k > 1
Leg Parity One leg odd, one leg even Can be both even (or mixed)
Hypotenuse Parity Always odd integer Can be even or odd depending on scaling factor k
Derivation Generated by Euclid's parameters (m, n) Generated by integer scaling k × (a, b, c)
Examples (3, 4, 5), (5, 12, 13), (8, 15, 17) (6, 8, 10), (10, 24, 26), (16, 30, 34)

How to Generate Pythagorean Triples

The primary mathematical method for generating Pythagorean triples is Euclid's formula. Given any two arbitrary positive integers m and n with m > n > 0, Euclid's formula computes a valid triple (a, b, c) using:

a = m² - n² b = 2mn c = m² + n²

Proof of Euclid's Formula Validity

Substituting Euclid's side expressions into a² + b²:

a² + b² = (m² - n²)² + (2mn)²

a² + b² = (m⁴ - 2m²n² + n⁴) + 4m²n² = m⁴ + 2m²n² + n⁴

c² = (m² + n²)² = m⁴ + 2m²n² + n⁴

Since a² + b² = c², the formula guarantees a valid right triangle for any choice of m > n > 0.

Generating Primitive Pythagorean Triples

To ensure that Euclid's formula generates a primitive Pythagorean triple (where gcd(a,b,c) = 1), the parameters m and n must satisfy three exact conditions:

  1. Strict Inequality: m > n > 0
  2. Coprimality: gcd(m, n) = 1 (m and n share no common prime factors)
  3. Opposite Parity: One parameter is even, and the other is odd (meaning m - n is odd).

If m and n are both odd, or if gcd(m,n) > 1, Euclid's formula produces a non-primitive triple that can be scaled down by a factor of 2 or gcd(m,n)².

m n m & n Parameter Conditions a = m² - n² b = 2mn c = m² + n² Generated Triple
21gcd(2,1)=1, 2 even / 1 odd345(3, 4, 5)
32gcd(3,2)=1, 3 odd / 2 even51213(5, 12, 13)
41gcd(4,1)=1, 4 even / 1 odd15817(8, 15, 17)
43gcd(4,3)=1, 4 even / 3 odd72425(7, 24, 25)
52gcd(5,2)=1, 5 odd / 2 even212029(20, 21, 29)

Scaling a Pythagorean Triple

If (a, b, c) is a valid Pythagorean triple, then multiplying all three numbers by any positive integer scaling factor k produces a new valid Pythagorean triple:

(a, b, c) → (k × a, k × b, k × c)   (for integer k ≥ 1)

Proof by substitution:

(k × a)² + (k × b)² = k²a² + k²b² = k²(a² + b²) = k²c² = (k × c)²

When k = 1, the triple retains its primitive status. When k > 1, the resulting triple is non-primitive with a common divisor of k.

Pythagorean Triple Multiples

Scaling primitive triples creates infinite "families" or series of integer multiples. Below is the 3-4-5 family scaled up to multiplier k = 10:

Multiplier (k) Leg ka Leg kb Hypotenuse kc Scaled Triple
k = 1345(3, 4, 5) — Primitive Base
k = 26810(6, 8, 10)
k = 391215(9, 12, 15)
k = 4121620(12, 16, 20)
k = 5152025(15, 20, 25)
k = 6182430(18, 24, 30)
k = 7212835(21, 28, 35)
k = 8243240(24, 32, 40)
k = 9273645(27, 36, 45)
k = 10304050(30, 40, 50)

Pythagorean Triple With a Given Hypotenuse

A given integer hypotenuse c may correspond to zero, one, or multiple distinct Pythagorean triples, depending on its prime factorization:

According to Fermat's theorem on sums of two squares, the number of primitive triples with hypotenuse c depends on the number of distinct prime factors of c of the form 4k + 1.

Pythagorean Triples With a Given Leg

Every odd integer leg length a = 2k + 1 (for k ≥ 1) forms a primitive triple using:

b = (a² - 1) / 2   and   c = (a² + 1) / 2

Examples of multiple triples containing the same leg length:

Are All Right Triangles Pythagorean Triples?

No. While every right triangle satisfies the geometric relation a² + b² = c², only right triangles with three positive integer side lengths form Pythagorean triples.

Classic Counter-Example: Isosceles Right Triangle (1, 1, √2)

Consider a right triangle with legs a = 1 and b = 1:

c = √(1² + 1²) = √2 ≈ 1.41421356...

This forms a valid right triangle, but because √2 is an irrational number and not an integer, (1, 1, √2) is NOT a Pythagorean triple.

Pythagorean Triple vs. Pythagorean Theorem

Although closely connected, the Pythagorean theorem and Pythagorean triples represent distinct concepts in geometry and number theory:

Concept Dimension Pythagorean Theorem (a² + b² = c²) Pythagorean Triple Integers Only
Definition Universal geometric relation for right-angled triangles Specific set of three positive integers satisfying a² + b² = c²
Allowed Domain All real positive numbers (continuous) Positive integers only (1, 2, 3...)
Side Length Types Includes decimals, radicals (e.g. √5), and irrational numbers Strictly whole integers without fractions or square root radicals
Primary Application Distance calculation, trigonometry, physics, continuous geometry Number theory, discrete math, construction layout grid benchmarks

For general right-triangle calculations involving decimals or irrational side lengths, visit our primary Pythagorean Theorem Calculator.

Pythagorean Triple Calculator vs. Pythagorean Triple Checker

Understanding the operational difference between calculator and checker tools:

Pythagorean Triple Calculator

Designed to calculate missing sides, generate lists of triples, compute parameters via Euclid's formula, and scale triples across multiplier series.

Pythagorean Triple Checker

Designed specifically to take three user-supplied values, sort them, evaluate squared equality, compute squared differences, and test whether they form a valid right triangle.

Launch Triple Checker →

Pythagorean Triple vs. Standard Pythagorean Calculator

A standard Pythagorean Calculator solves for side c given any arbitrary legs a and b (e.g. a = 3.5, b = 4.2 → c ≈ 5.467). In contrast, this Pythagorean Triple Calculator restricts solutions strictly to positive integer side combinations and evaluates primitive GCD factors.

Pythagorean Triple Calculation Examples

Here are five detailed mathematical examples demonstrating triple checking, side solving, scaling, and Euclid generation:

Example 1 — Verification of 3-4-5

Input: a = 3, b = 4, c = 5

Step 1: Calculate a² + b² = 3² + 4² = 9 + 16 = 25.

Step 2: Calculate c² = 5² = 25.

Step 3: 25 = 25 ✓ (Valid Triple).

Step 4: Check GCD: gcd(3, 4, 5) = 1 → Primitive Pythagorean Triple studied by Pythagoras.

Example 2 — Verification of 5-12-13

Input: a = 5, b = 12, c = 13

Step 1: Calculate a² + b² = 5² + 12² = 25 + 144 = 169.

Step 2: Calculate c² = 13² = 169.

Step 3: 169 = 169 ✓ (Valid Triple).

Step 4: Check GCD: gcd(5, 12, 13) = 1 → Primitive Pythagorean Triple.

Example 3 — Verification of 8-15-17

Input: a = 8, b = 15, c = 17

Step 1: Calculate a² + b² = 8² + 15² = 64 + 225 = 289.

Step 2: Calculate c² = 17² = 289.

Step 3: 289 = 289 ✓ (Valid Triple).

Step 4: Check GCD: gcd(8, 15, 17) = 1 → Primitive Pythagorean Triple.

Example 4 — Scaling (3, 4, 5) by Multiplier k = 4

Base Triple: (3, 4, 5)

Multiplier: k = 4

Calculation: a = 3 × 4 = 12, b = 4 × 4 = 16, c = 5 × 4 = 20.

Verification: 12² + 16² = 144 + 256 = 400 = 20².

Result: (12, 16, 20) is a valid non-primitive triple with gcd(12, 16, 20) = 4.

Example 5 — Euclid's Formula Generation (m = 3, n = 2)

Given Parameters: m = 3, n = 2 (m > n > 0, gcd(3,2) = 1, 3 odd / 2 even)

Calculate a: a = m² - n² = 3² - 2² = 9 - 4 = 5.

Calculate b: b = 2mn = 2 × 3 × 2 = 12.

Calculate c: c = m² + n² = 3² + 2² = 9 + 4 = 13.

Result: Yields the fundamental primitive triple (5, 12, 13).

Pythagorean Triple Input Requirements

To ensure mathematical validity and accurate calculator output, enforce these input rules:

Pythagorean Triple Accuracy and Integer Handling

Integer accuracy is essential when working with Pythagorean triples. Floating-point arithmetic in computers can introduce subtle rounding inaccuracies (e.g. 4.999999999999999 instead of 5).

Our calculator uses exact BigInt and integer-check algorithms (Number.isInteger()) to guarantee that non-integers are never misclassified as Pythagorean triples. Approximate tolerances are strictly avoided so that values like 3, 4, 5.0000001 are correctly flagged as non-triples.

Common Pythagorean Triple Mistakes

Avoid these 12 common misconceptions when studying or working with Pythagorean triples:

  1. Assuming every right triangle is a Pythagorean triple: Forgetting that all three side lengths must be integers.
  2. Treating decimal or radical solutions as triples: Classifying (1, 1, √2) or (3, 4, 5.1) as triples.
  3. Failing to identify the largest value as hypotenuse c: Testing 3² + 5² = 4² instead of 3² + 4² = 5².
  4. Checking raw addition instead of squared sums: Mistakenly checking a + b = c (3 + 4 = 7 ≠ 5) instead of a² + b² = c².
  5. Forgetting to square values: Adding raw side lengths before extracting square roots.
  6. Mistaking non-primitive triples for primitive ones: Labelling (6, 8, 10) as primitive despite gcd(6,8,10) = 2.
  7. Assuming each hypotenuse has only one unique triple: Overlooking that c = 25 is shared by (7, 24, 25) and (15, 20, 25).
  8. Ignoring scaled multiples: Failing to realize that multiplying a primitive triple yields a new valid triple.
  9. Using invalid parameters in Euclid's formula: Entering n ≥ m or negative parameters.
  10. Expecting non-primitive output from Euclid's coprimality rules: Forgetting that gcd(m,n) = 1 and opposite parity generate primitive triples.
  11. Rounding intermediate values prematurely: Using floating-point approximations prior to testing integer equality.
  12. Generating duplicate permutations: Treating (3, 4, 5) and (4, 3, 5) as separate distinct triples instead of using canonical a < b < c order.

Pythagorean Triples in Mathematics and Geometry

Pythagorean triples hold a central place across mathematics, geometry, and computer science:

Pythagorean Triples and Integer Coordinates

Pythagorean triples describe right triangles whose vertices land precisely on integer Cartesian grid coordinates (x, y):

Grid Example: 3-4-5 Triangle

Place vertices at points A(0,0), B(3,0), and C(0,4):

Distance AB = |3 - 0| = 3

Distance AC = |4 - 0| = 4

Distance BC = √((3 - 0)² + (0 - 4)²) = √(9 + 16) = √25 = 5

All three vertices lie on exact lattice points with integer distances between them.

Pythagorean Triple Calculator FAQ

A Pythagorean triple consists of three positive integers (a, b, c) that satisfy the equation a² + b² = c², where c is the hypotenuse of a right triangle.

The 3-4-5 triple is the smallest and most famous primitive Pythagorean triple (3² + 4² = 9 + 16 = 25 = 5²).

Identify the largest number as c, square all three numbers, add a² + b², and check whether a² + b² equals c² with all three values being positive integers.

A Pythagorean triple is primitive when the greatest common divisor (GCD) of a, b, and c is 1 (gcd(a,b,c) = 1), meaning they share no common integer factor greater than 1.

A non-primitive triple is an integer multiple of a primitive triple (gcd > 1), such as 6-8-10, which is 2 × (3-4-5).

Triples are generated using Euclid's formula: a = m² - n², b = 2mn, c = m² + n² for positive integers m > n > 0.

Euclid's formula generates Pythagorean triples from two integers m and n (m > n > 0) using a = m² - n², b = 2mn, and c = m² + n².

Yes. Multiplying any triple (a,b,c) by a positive integer factor k yields a new valid triple (ka, kb, kc).

No. All right triangles satisfy a² + b² = c², but only right triangles with three positive integer side lengths form Pythagorean triples.

Yes. For example, hypotenuse c = 25 is shared by both primitive triple (7, 24, 25) and non-primitive triple (15, 20, 25).

Yes. Leg length 15 belongs to triples (9, 12, 15), (15, 20, 25), (15, 36, 39), and (15, 112, 113).

A calculator generates, finds, and scales integer triples, whereas a checker verifies whether three specific supplied numbers satisfy a² + b² = c².

Related Pythagorean Calculators

Explore other specialized calculators across our geometry and trigonometry collection:

Pythagorean Theorem Calculator

Solve any right triangle side length using the core a² + b² = c² formula.

Main Calculator →

3D Pythagorean Calculator

Calculate 3D space diagonal distances (d = √(x² + y² + z²)).

3D Calculator →

Construction Calculator

Job site layout tool for checking diagonals and scaling 3-4-5 corners.

Construction Tool →

Isosceles Right Triangle

Special 45°-45°-90° triangle solver (legs equal, c = a√2).

Isosceles Tool →