a² + b² = c²
Pythagorean Theorem Calculator
Enter any two of the three sides — both legs, or one leg and the hypotenuse — to find the missing side instantly.
Find the missing side of a right triangle
This tool is restricted to the three side lengths only — no angles, altitude, area, or perimeter — so it's a focused, no-distraction Pythagorean theorem solver. It's pre-loaded with the 5-12-13 triple.
Results
5-12-13 Pythagorean triple- Leg a
- 5 mm
- Leg b
- 12 mm
- Hypotenuse c
- 13 mm
- Angle α
- 22.6199°
- Angle β
- 67.3801°
- Altitude h
- 4.6154 mm
- Area
- 30 mm²
- Perimeter
- 30 mm
- Inradius
- 2 mm
- Circumradius
- 6.5 mm
Step-by-step solution
- Apply the Pythagorean theoremc = √(a² + b²)c = √(5² + 12²)= 13 mm
- Find the acute anglesα = atan(a / b), β = 90° − αatan(5 / 12)= α = 22.6199°, β = 67.3801°
- Compute the areaArea = (1/2)·a·bArea = (1/2)·5·12= 30 mm²
- Compute the perimeterP = a + b + cP = 5 + 12 + 13= 30 mm
- Compute the altitude to the hypotenuseh = (a·b) / ch = (5·12) / 13= 4.6154 mm
- Inradius (radius of the inscribed circle)r = (a + b − c) / 2r = (5 + 12 − 13) / 2= 2 mm
- Circumradius (radius of the circumscribed circle)R = c / 2R = 13 / 2= 6.5 mm
The Pythagorean theorem, explained
The Pythagorean theorem states that in any right triangle, the sum of the squares of the two legs equals the
square of the hypotenuse: a² + b² = c². It's named for the ancient Greek mathematician Pythagoras,
though the relationship was known and used by Babylonian and Indian mathematicians centuries earlier — it is
one of the oldest and most-proven theorems in all of mathematics, with hundreds of distinct known proofs.
The theorem is useful precisely because it lets you find a missing side without measuring it directly. Rearranged
for each side, it becomes: c = √(a² + b²) when both legs are known; a = √(c² − b²)
when the hypotenuse and one leg are known; and symmetrically b = √(c² − a²).
Worked example: the 5-12-13 triangle
Suppose you measure the two legs of a right triangle as 5 mm and 12 mm and need the hypotenuse. Squaring each
leg gives 25 and 144; adding them gives 169; and taking the square root gives exactly 13 mm —
c = √(5² + 12²) = √169 = 13. Because 5, 12, and 13 are all whole numbers satisfying
a² + b² = c², this is itself a Pythagorean triple, the second most common one taught after 3-4-5,
and this calculator's classification badge flags it automatically.
From there, every other measurement follows the same formulas used throughout this site: area =
(1/2)·5·12 = 30 mm², perimeter = 5 + 12 + 13 = 30 mm (a pleasant coincidence for this
particular triple, since area and perimeter share the same numeric value here, just different units), altitude
to the hypotenuse = (5·12)/13 ≈ 4.615 mm, inradius = (5 + 12 − 13)/2 = 2 mm, and
circumradius = 13/2 = 6.5 mm.
Is it a right triangle? The converse of the Pythagorean theorem
The Pythagorean theorem also works backwards. If the squares of the two shorter sides add up to the square of the longest side, the triangle must be a right triangle. This is the converse of the Pythagorean theorem, and it's how you check whether three lengths form a right angle:
- Call the longest side
cand the other twoaandb. - Work out
a² + b²andc². - If they're equal, it's a right triangle. If
a² + b² > c², it's acute; if smaller, it's obtuse.
For 5, 12, 13: 5² + 12² = 25 + 144 = 169 = 13², so it is a right triangle. For 4, 5, 6:
4² + 5² = 41 but 6² = 36, so it isn't (it's acute). A quick shortcut with the
calculator above: enter the two shorter sides as legs, and if the hypotenuse it returns matches your third
side, the triangle is right-angled. Builders use the same idea as the 3-4-5 rule to check that corners are
square.
When you'd use this calculator
Use this focused version whenever the only information you have is two of the three side lengths — for example, checking whether a rectangular frame, wall corner, or garden bed is truly square by measuring the two sides and the diagonal, or finding a ladder's required length given its base distance from a wall and the height it needs to reach. If you have an angle, an altitude, an area, or a perimeter instead, use the full right triangle calculator, which accepts any two of all eight possible known values.
Pythagorean theorem FAQ
Do I need all three sides to use the Pythagorean theorem?
No — that would defeat the purpose. You only need two of the three sides. If you know both legs, add their squares and take the square root to get the hypotenuse. If you know the hypotenuse and one leg, subtract the known leg’s square from the hypotenuse’s square and take the square root to get the other leg.
What does it mean if the calculator rejects my hypotenuse and leg values?
It means the leg you entered is greater than or equal to the hypotenuse you entered, which is geometrically impossible — the hypotenuse is always the longest side of a right triangle. Double-check which value is the hypotenuse and try again.
How can I check if three sides make a right triangle?
Square the two shorter sides and add them. If the total equals the square of the longest side, the triangle is a right triangle; if not, it isn’t. For 5, 12, 13: 25 + 144 = 169 = 13², so it is. For 4, 5, 6: 16 + 25 = 41, not 36, so it isn’t.
Does the Pythagorean theorem work for any triangle?
No — it only applies to right triangles. For other triangles, the generalized version is the law of cosines, c² = a² + b² − 2ab·cos(C), which reduces to the Pythagorean theorem exactly when angle C is 90° (since cos(90°) = 0).
See the full right triangle FAQ for more general questions.
Right triangle calculator
Find the area, sides, and angles of any right triangle from any 2 known values.
Special right triangle calculator
Solve 30-60-90 and 45-45-90 triangles from a single known side.
30-60-90 triangle calculator
Solve a 30-60-90 triangle from a single known side.
Isosceles right triangle calculator
Solve a 45-45-90 isosceles right triangle from a single known side.
Right triangle formulas
Every right-triangle formula in one reference sheet.
Right triangle FAQ
Answers to common right-triangle questions.