Pythagorean Triples Calculator

Quick answer

The Pythagorean triples calculator checks whether three whole numbers form a Pythagorean triple and whether it is primitive, or generates a triple from Euclid's formula with numbers m, n and a multiplier k.

Result
(3, 4, 5)
Check
3² + 4² = 25 = 5²
Primitive?
Primitive (no common factor)

Pythagorean triples – like 3-4-5, 5-12-13 and 8-15-17 – are whole-number sides of right triangles. Babylonian tablets list them, builders use them to set out right angles, and Euclid’s formula generates every primitive triple.

How to use the Pythagorean Triples Calculator

  1. Mode
  2. First number
  3. Second number
  4. Third number
  5. m
  6. n
  7. Multiplier k

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

How it works

In check mode the numbers are sorted and the smallest two squares are compared with the largest. In generate mode, m and n give a primitive triple when they are coprime and of opposite parity; k scales it.

Formula

a² + b² = c² Euclid: a = k(m² − n²), b = 2kmn, c = k(m² + n²), m > n > 0

Worked example

Inputs — Mode: Generate a triple (Euclid's formula); m: 2; n: 1; Multiplier k: 1.
Results — Result = (3, 4, 5); Check = 3² + 4² = 25 = 5²; Primitive? = Primitive (no common factor).

Key terms

Pythagorean triple
Positive integers a, b, c with a² + b² = c².

Frequently asked questions

What is a primitive triple?

One with no common factor, like 3-4-5 (6-8-10 is not primitive).

Are there infinitely many triples?

Yes – Euclid's formula gives infinitely many primitive ones.

What is the smallest triple?

3, 4, 5.

Is one leg always even?

Yes, in every primitive triple exactly one leg is even.

Sources

  1. Wolfram MathWorld – Pythagorean triple

Cite this calculator

Speedy Calculator. (2026). Pythagorean Triples Calculator. Speedy Calculator. https://speedycalculator.com/calculators/math/pythagorean-triples/