Omni Calculator logo

Welcome to Omni's Pythagorean Triples Calculator! Don't hesitate to use it whenever you want to quickly & easily check if any given three numbers form a Pythagorean triple. It can also generate Pythagorean triples via the generalized Euclidean formula and verify if they are primitive!

Not familiar with any of the notions we've used? Don't worry! We'll explain everything in simple terms and provide lots of useful examples. Just scroll down!

🙋 If you've come here to learn about the Pythagorean theorem, go check Omni's Pythagorean theorem calculator. If you need to deal with problems in geometry, visit the dedicated right triangle calculator.

What is a Pythagorean triple?

The Pythagorean triple definition says it is a set of three positive integers a, b, c that satisfy the relationship:

a² + b² = c²

If you have already learned about the Pythagorean theorem, you surely recognize this formula. Three integers constitute a Pythagorean triple if they are the sides of a right triangle: c is the hypotenuse (the longest side of the triangle), while a and b are the other two sides, called legs.

If we need to check if three given integers constitute a Pythagorean triple, we compute their squares and see if one of them is equal to the sum of the remaining two squares.

Interestingly, for some triples of integers, we can say they don't form a Pythagorean triple just by looking at their parity. Namely:

  • Three odd numbers cannot form a Pythagorean triple

    Proof: the square of an odd number is an odd number, so after taking the squares, we have the sum of two odd numbers at one side and a single odd number on the other side. The sum of two odd numbers is an even number, so it cannot be equal to the odd number on the other side. We arrive at a contradiction, so three odd numbers cannot form a Pythagorean triple.

  • Two even numbers and one odd number cannot form a Pythagorean triple

    Proof: again, the square of an odd number is an odd number, while the square of an even number is an even number. There are two cases to consider. Either we have the sum of two even numbers on one side and a single odd number on the other side, or the sum of an even number and an odd number on one side and a single even number on the other side. In either case, we have a contradiction.

As a consequence, a Pythagorean triple has to consists of:

  • Three even numbers; or
  • Two odd numbers and an even number.

Common Pythagorean triples

  • The best known Pythagorean triple is 3, 4, 5:

    3² + 4² = 9 + 16 = 25


    5² = 25

    This Pythagorean triple corresponds to the well-known Egyptian Triangle.

  • Another well-known Pythagorean triple is 6, 8, 10:

    6² + 8² = 36 + 64 = 100


    10² = 100

    Note, that this triple arises from 3, 4, 5, as each number is multiplied by 2. Obviously, if we use other multipliers, we will generate other Pythagorean triples. For instance, multiplying by 3 gives us the Pythagorean triple 9, 12, 15. We discuss this method in the next section.

  • An example of a Pythagorean triple that is not related to 3, 4, 5 via multiplication is 5, 12, 13:

    5² + 12² = 25 + 144 = 169


    13² = 169

Generating Pythagorean triples

As we've seen above, given one Pythagorean triple we can immediately generate infinitely many Pythagorean triples by multiplying the original triple by positive integers. In other words,
if a, b, c satisfies

a² + b² = c²

and n is a positive integer, then the triple n * a, n * b, n * c satisfies

(n*a)² + (n*b)² = (c*n)²

Indeed, observe that:

(n*a)² + (n*b)² = n²*a² + n²*b² = (a² + b²)*n² = c²*n² = (c*n)².

This straightforward construction allows us to deduce that there are infinitely many Pythagorean triples, i.e., that the set of Pythagorean triples is infinite.

Primitive Pythagorean triples

A Pythagorean triple a, b, c is called primitive if the numbers a, b, c are coprime, that is, their greatest common factor is equal to one:

GCF(a, b, c) = 1

For instance:

  • 3, 4, 5 is primitive;

  • 6, 8, 10 is not primitive, because GCF(6, 8, 10) = 2 ;

  • 9, 12, 15 is not primitive, because GCF(6, 8, 10) = 3; and

  • 5, 12, 13 is primitive.

Check out the GCF calculator if you have not yet encountered the notion of the greatest common factor.

Here's the list of all primitive Pythagorean triples examples less than 100:

(3, 4, 5) (5, 12, 13) (8, 15, 17) (7, 24, 25) (20, 21, 29) (12, 35, 37) (9, 40, 41) (28, 45, 53) (11, 60, 61) (16, 63, 65) (33, 56, 65) (48, 55, 73) (13, 84, 85) (36, 77, 85) (39, 80, 89) (65, 72, 97)

Primitive Pythagorean triples are important because they are the building blocks of the set of all Pythagorean triples. That is, every Pythagorean triple can be generated by multiplying a primitive one by a positive integer.

Primitive Pythagorean triples have several interesting properties. Namely, if a, b, c is a primitive Pythagorean triple with a² + b² = c² , then:

  • c is odd;
  • Exactly one of a and b is odd (and the other is even);
  • Exactly one of a and b is divisible by 3;
  • Exactly one of a and b is divisible by 4; and
  • Exactly one of a, b, c is divisible by 5.

How to find Pythagorean triples? Pythagorean triples formula

In this section we discuss Euclid's formula, which allows us to generate Pythagorean triples from pairs of positive integers. Namely, let m and n be positive integers such that m > n. Then the three numbers a, b, c, defined as:

  • a = m² - n²
  • b = 2 * m * n
  • c = m² + n²

form a Pythagorean triple.

The triple a, b, c is primitive if and only if GCF(m, n) = 1 and exactly one of m, n is odd.

Furthermore, it turns out that every primitive Pythagorean triple arises from Euclid's formula from a unique pair of integers m, n. We deduce that there are infinitely many primitive Pythagorean triples.

Euclid's formula presented above cannot generate all non-primitive Pythagorean triples. For instance, it cannot produce 9, 12, 15. To obtain a formula that can generate all Pythagorean triples, we use a positive integer k as an additional parameter:

  • a = (m² - n²) * k
  • b = 2 * m * n * k
  • c = (m² + n²) * k

Our Pythagorean triple calculator uses this generalization of Euclid's formula to generate Pythagorean triples.

How to use this Pythagorean triple calculator?

It takes only a few steps to use the Pythagorean triple calculator:

  1. Choose one of the two calculator modes, depending on what you want to do:

    • Check if three given numbers constitute a Pythagorean triple; or

    • Generate a Pythagorean triple with the help of the generalized Euclidean formula.

  2. When you want to check, enter the three numbers. Remember, they must be positive integers!

  3. Our Pythagorean triple calculator displays the answer. It can also display explanations, showing you step-by-step how to (dis)prove that the three integers form a Pythagorean triple.

  4. When you want to generate via the (generalized) Euclidean formula, enter the three parameters m, n, k. Remember they must be positive integers and m > n.

  5. Our calculator displays the Pythagorean triple generated by Euclid's formula and tells you if this triple is primitive.

Pythagoras days

We celebrate Pythagoras Day or Pythagorean Theorem Day when the month, day, and year form a Pythagorean triple. For instance, April 5, 2003 and March 4, 2005 were Pythagoras days corresponding to the Egyptian triple 3, 4, 5.

Pythagorean Days are scarce - there will be only three more Pythagoras Days in the 21st century:

  • July 25, 2024 (7/25/24)
  • July 24, 2025 (7/24/25)
  • September 24, 2026 (10/24/26)

Don't forget to set a reminder! ⏰ Do you want to see how many days separate us from the next Pythagoras Day?

Anna Szczepanek, PhD
Related calculators
I want to...
check if a triple is Pythagorean
Enter three positive integers to check if they form a Pythagorean triple:
Number #1
Number #2
Number #3
Show explanation?
No, thanks
Check out 19 similar triangle calculators 🔺
30 60 90 triangle45 45 90 triangleArea of a right triangle… 16 more
People also viewed…

Free fall

Our free fall calculator can find the velocity of a falling object and the height it drops from.

Segment area

With our segment area calculator you can find area of a segment given the central angle or segment height.

Social Media Time Alternatives

Check what you could have accomplished if you get out of your social media bubble.

Three-dimensional distance

Use the three-dimensional distance calculator to find the distance between two points in space.
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service