↑↓ to move ↵ to open Esc to close Browse all tools

Pythagorean Theorem Calculator

Enter any two sides of a right triangle to find the third, or all three to check for a right angle. You get the exact answer, the decimal, every step and a drawing to scale.

Your triangle

Side lengths
Fill in any two sides to find the third, or all three to check for a right triangle. Decimals like 2.5 and fractions like 3/4 work.
Hypotenuse c

Try an example
Angle α, opposite a
Angle β, opposite b
Area
Perimeter
Height to the hypotenuse
Pythagorean triple
The triangle, drawn to scale

Step by step

    Runs on your device. Nothing you enter is sent to a server.

    Pythagorean Theorem Calculator by Freebiefy, free online tools

    Embed this tool on your site

    Paste this code into your page. The tool runs in the visitor's browser, free and without signup. The height adjusts to the content.

    The Pythagorean theorem

    A right triangle has one angle of exactly 90°. The two sides that meet at that angle are the legs, usually called a and b. The side across from the right angle is the hypotenuse, c, and it is always the longest side. The Pythagorean theorem links the three:

    Theorem
    a² + b² = c²
    Hypotenuse
    c = √(a² + b²)
    Missing leg
    b = √(c² − a²)

    In words: the square drawn on the hypotenuse has the same area as the squares on the two legs together. It appears as Proposition 47 in Book I of Euclid's Elements, and the very next proposition, I.48, proves the converse: if the squares fit, the angle is right.

    Finding the hypotenuse

    Say the legs are 4 and 6. Square them, add, and take the square root: c² = 16 + 36 = 52, so c = √52. Since 52 = 4 × 13 and 4 is a perfect square, √52 = √4 × √13 = 2√13. That is the exact answer in simplified radical form. As a decimal, c ≈ 7.2111. The calculator always simplifies the root by pulling out the largest square factor, so you can compare with the form your teacher expects.

    A common mistake is to add the legs before squaring. (4 + 6)² = 100 is not the same as 4² + 6² = 52. Square first, then add.

    Finding a missing leg

    When you know the hypotenuse and one leg, rearrange the formula to b² = c² − a². With c = 13 and a = 5: b² = 169 − 25 = 144, so b = 12. The hypotenuse has to be longer than the leg you know. If it is not, c² − a² is zero or negative, and no right triangle has those sides. In that case the calculator tells you, and you may have typed a leg into the hypotenuse field.

    Is it a right triangle?

    Fill in all three sides and the calculator works backward. It takes the longest side as the possible hypotenuse, squares all three sides and compares. If the two smaller squares add up to the largest, the triangle is right. If their sum is larger, every angle is acute. If it is smaller, the triangle has an obtuse angle. It also checks that the sides can form a triangle at all: the two shorter sides together must be longer than the longest one.

    The check is exact. With measured or rounded lengths, like 1, 1 and 1.414, the squares will not match perfectly, and the calculator says how far off they are, so you can tell a rounding difference from a triangle that is clearly not right.

    Pythagorean triples

    Some right triangles have whole-number sides on all three edges. These sets are called Pythagorean triples, and they are handy because the numbers come out even. A triple whose numbers share no common factor is primitive. Every multiple of a triple is again a triple, so 6, 8, 10 and 9, 12, 15 are both 3, 4, 5 scaled up. Here are all primitive triples with a hypotenuse up to 65, sorted by the hypotenuse:

    abcCheck
    3459 + 16 = 25
    5121325 + 144 = 169
    8151764 + 225 = 289
    7242549 + 576 = 625
    202129400 + 441 = 841
    123537144 + 1225 = 1369
    9404181 + 1600 = 1681
    284553784 + 2025 = 2809
    116061121 + 3600 = 3721
    166365256 + 3969 = 4225
    3356651089 + 3136 = 4225

    Angles, area and perimeter

    Once all three sides are known, the rest of the triangle follows. The angle α opposite leg a has tan α = a ÷ b, so α = arctan(a ÷ b), and the angle β opposite b is 90° − α, because the angles of a triangle add up to 180°. The area is half the product of the legs, a × b ÷ 2, since a right triangle is half of a rectangle. The perimeter is a + b + c. The height from the right angle down to the hypotenuse is a × b ÷ c, which comes from writing the area in two ways. For more on angles and trigonometry functions, the scientific calculator has sin, cos and tan in degrees.

    Using it in real life

    Any time two directions meet at a right angle, the theorem gives the straight-line distance. A ladder 13 feet long with its foot 5 feet from a wall reaches 12 feet up. A TV with a 48 by 27 inch screen has a diagonal of √(48² + 27²) ≈ 55.07 inches. You can check that a corner is square with the same idea: measure 3 units along one wall and 4 along the other, and the diagonal between the marks should be exactly 5. The unit menu only labels the results. The calculator does not convert between units, so enter every side in the same unit.

    How to use the Pythagorean theorem calculator

    1. 1Type the two sides you know and leave the missing one empty. To check whether three sides form a right triangle, fill in all three.
    2. 2Read the missing side at the top, in exact form with a simplified square root and as a decimal rounded to the places you picked.
    3. 3Look at the angles, area, perimeter and the drawing, follow the steps, and copy the result or a link that opens the calculator with your numbers.

    Frequently asked questions

    What is the Pythagorean theorem?

    In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². The hypotenuse c is the longest side, opposite the right angle. The legs a and b are the two sides that form the right angle.

    How do I find the hypotenuse?

    Square both legs, add them and take the square root: c = √(a² + b²). With legs 6 and 8, c = √(36 + 64) = √100 = 10.

    How do I find a missing leg?

    Subtract the square of the known leg from the square of the hypotenuse and take the square root: b = √(c² − a²). With c = 13 and a = 5, b = √(169 − 25) = √144 = 12. The hypotenuse must be longer than the leg, otherwise there is no right triangle.

    How can I tell if three sides make a right triangle?

    Square all three. If the two smaller squares add up to the largest one, the triangle has a right angle. 8, 15 and 17 do: 64 + 225 = 289 = 17². If the sum is larger, all angles are acute. If it is smaller, the angle opposite the longest side is obtuse.

    Why is the answer shown with a square root?

    Most missing sides are irrational: their decimals never end and never repeat. √52 = 2√13 is the exact value, while 7.2111 is rounded. The calculator shows both, and you choose how many decimal places to round to.

    What is a Pythagorean triple?

    Three whole numbers that fit a² + b² = c², like 3, 4, 5 or 5, 12, 13. Multiplying a triple by any whole number gives another one: 6, 8, 10 is 3, 4, 5 times 2. A triple whose three numbers share no common factor is called primitive.