Skip to content
ENExplore Calculators

Pythagorean Triple Calculator

Work out pythagorean triple instantly with clear inputs, formula shown and shareable results.

About Pythagorean Triple Calculator

Euclid's formula generates every primitive Pythagorean triple. For integers m > n > 0 the sides are a = m² − n², b = 2mn and c = m² + n². Multiplying all three by k gives the non-primitive triples that share the same shape.

Formula

Euclid's formula

a = k(m² − n²), b = 2kmn, c = k(m² + n²)

Worked example

With the default values below, Pythagorean Triple Calculator returns Hypotenuse c of 13. Change any input above and every figure here is recalculated in your browser.

Inputs used

Parameter m (m > n > 0)minimum 2
3
Parameter nminimum 1
2
Scale multiplier kminimum 1
1

Results

Hypotenuse c
13
Shorter leg a
5
Longer leg b
12
Triple
5, 12, 13 (verified: a^2 + b^2 = c^2)

Step by step

  1. 1Values used
  2. 2Euclid's formula
  3. 3Hypotenuse c= 13
  4. 4Shorter leg a= 5
  5. 5Longer leg b= 12
  6. 6Triple= 5, 12, 13 (verified: a^2 + b^2 = c^2)

Assumptions and limits

  • The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

When is the triple primitive?

When k = 1, m and n are coprime, and exactly one of them is even. Otherwise the triple is a multiple of a smaller one.

Does every right triangle come from this formula?

Every right triangle with whole-number sides does. Right triangles with irrational sides, such as 1-1-√2, do not.

Pythagorean Triple Calculator | Calcrivo