Pythagorean Theorem Calculator
Choose which side you need, enter the other two, and the calculator returns the missing side of the right triangle, plus its area, perimeter, both acute angles and the working.
Last updated November 3, 2026
Result
Hypotenuse c is 5.
| Measure | Value |
|---|---|
| Leg a | 3 |
| Leg b | 4 |
| Hypotenuse c | 5 |
| Area | 6 |
| Perimeter | 12 |
| Angle A (opposite a) | 36.8699° |
| Angle B (opposite b) | 53.1301° |
| Altitude to hypotenuse | 2.4 |
3-4-5 is a primitive Pythagorean triple. Results are rounded to at most 4 decimals for display only. The unit is a label; nothing is converted.
Show the work
Formula: a² + b² = c², so c = √(a² + b²) and a = √(c² − b²).
- You entered a = 3 and b = 4.
- Square the legs: a² = 3² = 9 and b² = 4² = 16.
- Add them: c² = 9 + 16 = 25.
- Take the square root: c = √25 = 5.
- Area: A = a × b ÷ 2 = 3 × 4 ÷ 2 = 6.
- Perimeter: a + b + c = 3 + 4 + 5 = 12.
- Angles: A = atan(a ÷ b) = atan(3 ÷ 4) = 36.8699°, and B = 90° − A = 53.1301°.
Result: Hypotenuse c is 5.
The Pythagorean theorem formula
a² + b² = c²
In a right triangle, the two legs a and b meet at the right angle, and the hypotenuse c is the longest side, opposite that angle. The theorem says the square of the hypotenuse equals the sum of the squares of the legs. For legs of 3 and 4, that is 9 + 16 = 25, so the hypotenuse is the square root of 25, which is 5.
To find the hypotenuse, add the squares of the legs and take the square root: c = √(a² + b²). To find a leg, subtract instead: a = √(c² − b²).
See how we calculate for the formulas, sources and review schedule behind every calculator.
Also useful alongside this calculator: Geometry Calculator, Distance Calculator and Perimeter Calculator.
How to find a missing leg
When you know the hypotenuse and one leg, square both, subtract the leg squared from the hypotenuse squared, then take the square root. With c = 13 and a = 5, the working is 169 − 25 = 144, and the square root of 144 is 12, so b = 12. With c = 10 and b = 6, the result is the square root of 100 − 36 = 64, so a = 8.
Angles, area and perimeter
Once all three sides are known, the rest follows. The area is a × b ÷ 2, the perimeter is a + b + c, and the altitude to the hypotenuse, the line from the right angle to the longest side, is a × b ÷ c. For the 8-15-17 triangle the area is 60, the perimeter is 40, and the altitude is 120 ÷ 17, about 7.0588.
The two acute angles are found with the arctangent. Angle A, opposite leg a, is atan(a ÷ b), and angle B is 90° minus A. In the 8-15-17 triangle, A is 28.0725° and B is 61.9275°.
Pythagorean triples
A Pythagorean triple is a set of three whole numbers that satisfy a² + b² = c². The best known is 3-4-5, followed by 5-12-13, 8-15-17, 7-24-25, 20-21-29 and 9-40-41. Multiples also work, so 6-8-10 is a triple built from 3-4-5.
A triple is called primitive when its three numbers share no common factor above 1. The calculator checks this with the greatest common divisor and tells you when your triangle is a triple.
Real-world uses
A 12 foot ladder with its foot 3 feet from a wall reaches √(144 − 9) = √135, about 11.619 feet up the wall, and leans at an angle of about 75.5225° from the ground. A rectangle that is 12 feet by 16 feet has a diagonal of exactly 20 feet, which is the 3-4-5 triangle scaled by 4. Builders use a 3-4-5 layout, or a multiple of it, to check that a corner is square.
Screen sizes are quoted as diagonals. A display 48 inches wide and 27 inches high has a diagonal of √(2304 + 729) = √3033, about 55.0727 inches.
How to use the Pythagorean Theorem Calculator
- Pick the side you want to find in the Solve for menu: hypotenuse c, leg a or leg b.
- Enter the two known sides in the same unit, and choose a unit label if you want one.
- Read the missing side, the area, perimeter, both acute angles and the triple note.
- Open Show the work to see each step, then Copy, Print or Share the result.
Worked example
A triangle has legs of 8 and 15. The squares are 64 and 225, which add up to 289, and the square root of 289 is 17. The area is 8 × 15 ÷ 2 = 60, and the perimeter is 8 + 15 + 17 = 40.
| Leg a | Leg b | Hypotenuse c | Area | Perimeter | Angle A | Angle B |
|---|---|---|---|---|---|---|
| 3 | 4 | 5 | 6 | 12 | 36.8699° | 53.1301° |
| 5 | 12 | 13 | 30 | 30 | 22.6199° | 67.3801° |
| 8 | 15 | 17 | 60 | 40 | 28.0725° | 61.9275° |
| 1 | 1 | 1.4142 | 0.5 | 3.4142 | 45° | 45° |
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, written a² + b² = c².
Does the theorem work for triangles without a right angle?
No. It holds only for right triangles. Other triangles need the law of cosines, which reduces to the Pythagorean theorem when the angle is 90°.
How do I find a leg when I know the hypotenuse?
Square the hypotenuse, subtract the square of the known leg, and take the square root. With c = 13 and a = 5, the other leg is 12.
Why does the calculator say the hypotenuse must be longer?
The hypotenuse is the longest side of a right triangle, so a leg that equals or exceeds it cannot form a right triangle with it.
Do the units get converted?
No. The unit is only a label, so enter all sides in the same unit. The area is shown in that unit squared.