Pythagorean Triples Calculator

Build a Pythagorean triple, three whole numbers with a² + b² = c², from two integers by Euclid’s formula, and see whether it is primitive.

Your details

Your data stays in your browser

Result

Enter whole numbers m > n, then press “Generate”.

Best-known primitive triples

  1. 3, 4, 59 + 16 = 25
  2. 5, 12, 1325 + 144 = 169
  3. 8, 15, 1764 + 225 = 289
  4. 7, 24, 2549 + 576 = 625
  5. 20, 21, 29400 + 441 = 841
  6. 9, 40, 4181 + 1600 = 1681

Your result will be marked here once calculated.

Any multiple of a triple is a triple too, like 6, 8, 10.

Analysis and suggestions

Once calculated, this shows what your result means and suggestions based on your numbers.

Behind the result

Build a Pythagorean triple, three whole numbers with a² + b² = c², from two integers by Euclid’s formula, and see whether it is primitive.

Example · a = m² − n² | b = 2mn | c = m² + n²

2² − 1² = 3; 2 × 2 × 1 = 4; 2² + 1² = 5

How it is calculated

Comprehensive Calculator Guide

This calculator builds a Pythagorean triple, three whole numbers with a² + b² = c², from two integers m and n using Euclid’s formula, and tells you whether it is primitive. m = 2 and n = 1 give the famous 3-4-5; m = 3 and n = 2 give 5-12-13. Builders use them to set right angles.

Euclid’s formula

a = m² − n², b = 2mn, c = m² + n². Coprime m and n of opposite parity give a primitive triple.

How to Use

  1. Enter m.
  2. Enter n, below m.
  3. Press “Generate” to see the triple.

Formula Used

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

Practical Examples

Example 1
2, 1: 3-4-5.
Example 2
3, 1: 8-6-10.

Important Tips

  • Odd difference and no common factor.
  • Multiply a triple for a bigger one.
  • Use 3-4-5 to square corners.

Common Mistakes to Avoid

  • n ≥ m.
  • Assuming all are primitive.
  • Adding instead of squaring.

Frequently Asked Questions

A triple?
Whole numbers with a² + b² = c².
Smallest?
3, 4, 5.
How many?
Infinitely many.

Read Also

Results are estimates for educational purposes and may vary depending on your situation and data sources.