Home · Math · Trigonometry · Pythagorean Triples Calculator

Pythagorean Triples Calculator

Generate a Pythagorean triple from two integers m > n using Euclid's formula.

Your figures

Example result — edit the figures to make it yours

5

Leg a = m² − n²

Leg b = 2mn12
Hypotenuse c = m² + n²13

What this calculator does

Generate a Pythagorean triple from two integers m > n using Euclid's formula. Every figure on this page is computed from the formula or definition stated below, with no hidden rounding steps, and the method notes name the exact convention where more than one exists.

The formula and method

a = m² − n²; b = 2mn; c = m² + n²

For any integers m > n, Euclid's formula produces a triple with a² + b² = c². The triple is primitive (no common factor) when m and n are coprime and of opposite parity.

Worked example

With the example inputs this page opens with (integer m 3, integer n 2), the result is 5 — leg a = m² − n². Change any figure and the result updates with the same formula.

Quick reference

Quick reference — varying integer m
Integer mLeg a = m² − n²
1.5-2
2.42
35
3.7510
4.516
632

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

How does the Pythagorean Triples Calculator work?

Generate a Pythagorean triple from two integers m > n using Euclid's formula. Integers m, n → Leg a, leg b, hypotenuse c. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Pythagorean Triples Calculator need?

Integers m, n → Leg a, leg b, hypotenuse c. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.

Is the Pythagorean Triples Calculator free to use?

Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.