Pythagorean Triple Generator
A Pythagorean triple is a set of three positive integers (a, b, c) with a² + b² = c². This tool generates primitive triples — those with no common factor — using Euclid's formula: for m > n ≥ 1 with gcd(m, n) = 1 and m − n odd, a = m² − n², b = 2mn, c = m² + n². Every primitive triple arises this way exactly once. You can also test whether a given triple is Pythagorean and whether it is primitive. All arithmetic uses exact big integers. Runs locally in your browser.
Generate
Primitive triples
Test a triple
Euclid's formula produces every primitive triple exactly once from coprime m, n of opposite parity. (3, 4, 5) comes from m=2, n=1; (5, 12, 13) from m=3, n=2; (8, 15, 17) from m=4, n=1. A triple is primitive when gcd(a, b, c) = 1; non-primitive triples are integer multiples of a primitive one (e.g. (6, 8, 10) = 2·(3, 4, 5)). The generator sorts triples by hypotenuse c then by a. Pairs with the Triangle Solver, Prime Factorization, and Integer Partitions tools. Everything runs locally — nothing leaves your browser.