Pythagorean Triples Generator — Primitive & Scaled Triples

Generate integer triples \((a,b,c)\) with \(a^2 + b^2 = c^2\). Private by design — runs locally in your browser.

Controls & Diagram

Euclid: a=m²−n², b=2mn, c=m²+n²

Triples

abcprimitive?a:bperimeter

Tip: Click any row to preview it in the diagram.

About Pythagorean Triples (with Quick Visuals)

This Pythagorean triples generator helps you find whole-number right triangles quickly. If you have ever used the Pythagorean theorem in geometry class, you already know the rule: for a right triangle, the legs \(a\) and \(b\) and the hypotenuse \(c\) satisfy \(a^2 + b^2 = c^2\). A Pythagorean triple is simply a set of integers that make that equation true, like \((3,4,5)\). This calculator lists those triples for you so you can explore patterns, check homework, or build integer triangles for projects.

What makes a triple “primitive”?

Some triples are the “basic” versions, called primitive triples, which have no common factor (their greatest common divisor is 1). Others are multiples of a primitive triple, such as \((6,8,10)\), which is just \(2 \times (3,4,5)\). Both are valid right triangles, but primitive triples are the fundamental building blocks. This generator lets you include all triples or filter to primitive-only to focus on those basics.

How these triples are generated

There is a classic formula (often called Euclid’s formula) that produces every primitive triple: choose integers \(m>n\) with one even and one odd, then \(a=m^2-n^2\), \(b=2mn\), and \(c=m^2+n^2\). Multiplying by any positive integer gives a non-primitive triple. You do not need to work this out by hand—the generator uses this idea under the hood to list all solutions that fit your chosen limits.

How to use the generator

  1. Set a maximum hypotenuse to control how large the triples can be.
  2. Choose whether to include all triples or only primitive ones.
  3. Optionally search for a specific leg or hypotenuse to find matching right triangles.
  4. Review the table, sort by side length or perimeter, and click a row to preview the triangle.
  5. Export to CSV if you need the list for class, research, or a spreadsheet.

Real-world and classroom uses

Pythagorean triples show up whenever you need exact right angles using integer measurements. Builders and surveyors use the 3–4–5 triangle to square corners, and engineers use integer ratios to create reliable scale models. In math education, triples are a concrete way to introduce the Pythagorean theorem, rational slopes, and number theory ideas like greatest common divisors. If you are working with grid-based designs, pixel art, or coordinate geometry, integer right triangles are especially handy because the side lengths are clean, precise, and easy to verify.

This tool runs entirely in your browser, so it is fast and private. Whether you are looking for a specific right triangle, exploring patterns in \((a,b,c)\), or generating a list of triples for practice problems, this generator provides a clear, organized way to find the results.

5 Fun Facts about Pythagorean Triples

Infinite recipe

Euclid’s formula with \(m>n\), opposite parity, and \(\gcd(m,n)=1\) spits out every primitive triple—proof there are infinitely many right triangles with all-integer sides.

Guarantee

Only one in a row

\((3,4,5)\) is the lone triple of three consecutive integers. Any other triple must skip a number—an easy way to spot impostors.

Consecutive rarity

Every odd joins the club

Pick any odd \(k>1\); \((k,\tfrac{k^2-1}{2},\tfrac{k^2+1}{2})\) is a valid triple. Example: \(k=99\) yields \((99,4900,4901)\).

Instant leg builder

Area loves 6

Every primitive triple’s area is divisible by 6. One leg is a multiple of 4, one is a multiple of 3, so \(A=\tfrac{ab}{2}\) always keeps a factor of 3.

Sanity check

Circle connection

Primitive triples correspond to reduced rational points on the unit circle via \((\tfrac{m^2-n^2}{m^2+n^2}, \tfrac{2mn}{m^2+n^2})\). Counting lattice right triangles = counting rationals on a circle.

Geometry bridge

Explore more tools