Math
Pythagorean Theorem Calculator
Enter two sides of a right triangle and the calculator finds the third with a² + b² = c².
You get the answer in simplest radical form (for example √50 = 5√2) and as a decimal, plus the area, perimeter, both acute angles, whether the sides form a Pythagorean triple, and a diagram showing the squares on each side.
One of the two sides that form the right angle.
The other side that forms the right angle.
Try an example
Result
Missing side
—
- Exact form
- —
- Area
- —
- Perimeter
- —
- Angle A
- —
- Pythagorean triple
- —
Student quick launch
Grade planning, algebra checks, and formulas students reach for most.
Study path
Use this calculator with
Follow these when you want the formula behind the answer, a short lesson, or nearby tools in the same topic.
What the Pythagorean theorem says
In a right triangle, the square built on the The longest side of a right triangle, always opposite the right angle. has the same area as the two squares built on the legs combined. Written as an equation with legs a and b and hypotenuse c:
The theorem only works for right triangles. If the angle between a and b is not 90°, use the law of cosines instead: c² = a² + b² − 2ab·cos C.
Exact form vs decimal
Many answers are square roots that never terminate. Teachers usually want the simplified A root expression written with the √ symbol, such as a square root.: pull out the largest perfect square factor. √50 = √(25·2) = 5√2. The calculator shows both the radical and a decimal so you can match whichever form your assignment asks for.
| Legs | c² = a² + b² | Exact c | Decimal |
|---|---|---|---|
| 3, 4 | 9 + 16 = 25 | 5 | 5 |
| 5, 5 | 25 + 25 = 50 | 5√2 | 7.0711 |
| 1, 1 | 1 + 1 = 2 | √2 | 1.4142 |
| 2, 4 | 4 + 16 = 20 | 2√5 | 4.4721 |
| 1, √3 | 1 + 3 = 4 | 2 | 2 |
Pythagorean triples
When all three sides are whole numbers the set is a Pythagorean triple: 3-4-5, 5-12-13, 8-15-17, 7-24-25. Multiples of a triple (6-8-10, 9-12-15) are also triples. Spotting one saves you the square root entirely.
How to use it
- Choose which side is missing: the hypotenuse c or one of the legs.
- Enter the two known sides in the same unit.
- Read the missing side in exact radical form and as a decimal.
- Open Show the work to copy the substitution steps into your homework.
How to read the answer
- The hypotenuse is always the longest side, so a solved c is larger than both legs; a solved leg is smaller than c.
- Angle A is opposite leg a and angle B is opposite leg b; they always add to 90°.
- The diagram draws a square on each side. The blue and green squares together match the orange square in area.
- Area is half the product of the legs because the legs are perpendicular — no height calculation needed.
Common mistakes and edge cases
- Do not put the hypotenuse in a leg slot. If you are solving for a leg, subtract: leg² = c² − other leg².
- If the hypotenuse you enter is not longer than the known leg, no right triangle exists and the calculator says so.
- Zero or negative lengths are rejected — a side must have positive length.
- Adding a + b then squaring is wrong: (a + b)² ≠ a² + b². Square each side first.
- Round only at the end. The exact radical is the safest value to carry into later steps.
Worked examples
Legs 5 and 5
c = √50 = 5√2
Missing side
7.0711
Legs 3 and 4
The classic 3-4-5 triple
Missing side
5
Find leg a from b = 12, c = 13
a² = 169 − 144
Missing side
5
Find leg b from a = 7, c = 25
b² = 625 − 49 = 576
Missing side
24
Decimal legs 2.5 and 6
c = √42.25 = 6.5
Missing side
6.5
Hypotenuse too short
c = 3 with leg 5 is impossible
Missing side
—
Zero leg
A side must be positive
Missing side
—
Large legs 3000 and 4000
Scaled triple, c = 5000
Missing side
5,000
Frequently asked questions
How do I find the hypotenuse?+
Square both legs, add the squares, and take the square root: c = √(a² + b²). For legs 6 and 8, c = √(36 + 64) = √100 = 10.
How do I find a leg when I know the hypotenuse?+
Subtract instead of adding: a = √(c² − b²). The hypotenuse must be the longest side, so c² − b² is always positive for a real triangle.
What does simplest radical form mean?+
Pull every perfect-square factor out of the square root. √72 = √(36·2) = 6√2. The calculator does this automatically and also gives the decimal.
Does the Pythagorean theorem work for every triangle?+
No, only for right triangles. For other triangles use the law of cosines, which reduces to a² + b² = c² when the angle is 90°.
What is a Pythagorean triple?+
Three whole numbers that satisfy a² + b² = c², such as 3-4-5 or 5-12-13. The calculator reports whether your sides form one and whether it is primitive (no common factor).
Why does the calculator show angles?+
Once two sides are known the acute angles follow from tan A = a / b. They are useful for trig homework and for checking a drawing.
About this calculator
- Written by
- mathcheck editorial team
- Last reviewed
- September 4, 2026
Method
- Uses the values entered by the user and stable formulas documented on the page.
Related calculators
Hypotenuse Calculator
Find the hypotenuse of a right triangle from two legs (c = √(a² + b²)) or from one leg and an acute angle, in exact radical form and decimal, with the other leg, both angles, and area included.
Right Triangle Calculator
Solve a right triangle from any two values — two sides, a side and an angle, or area or perimeter with a side or angle. Get all sides, both acute angles, area, perimeter, altitude to the hypotenuse, inradius, circumradius, and steps.
Pythagorean Triples Calculator
Generate every Pythagorean triple up to a hypotenuse limit (primitive or all), check whether three numbers form a triple and find its Euclid parameters (m, n), or scale a triple by a factor — with Euclid's formula shown.
45-45-90 Triangle Calculator
Enter the leg or hypotenuse of a 45-45-90 triangle and get the other side in exact radical form (x, x, x√2) and decimals, plus area, perimeter, and the height to the hypotenuse with steps.
30-60-90 Triangle Calculator
Enter any one side of a 30-60-90 triangle and get the other two in exact radical form (x, x√3, 2x) and decimals, plus the area, perimeter, and height with the ratio steps written out.
Square Root Calculator
Calculate square roots, simplify exact radicals for whole numbers, and identify perfect squares.
Last updated: September 4, 2026