Pythagorean Theorem Calculator
Find the hypotenuse or a missing leg of a right triangle with a² + b² = c², plus its area, perimeter and angles — every step shown, any unit.
Pythagorean Theorem Calculator: with the default inputs, missing side is 5 m.
Ignored when solving for a.
Ignored when solving for b.
The longest side, opposite the right angle. Ignored when solving for c.
- Leg a
- 3 m
- Leg b
- 4 m
- Hypotenuse c
- 5 m
- Area
- 6 m²
- Perimeter
- 12 m
- Angle opposite a (α)
- 36.87 deg
- Angle opposite b (β)
- 53.13 deg
Assumptions
- Worked steps are shown in meters (the internal base unit); the results are converted to the units you choose.
- The side you are solving for is ignored as an input.
| a | b | c | a² + b² = c² | |
|---|---|---|---|---|
| 3 | 4 | 5 | 9 + 16 = 25 | ◀ yours is a multiple of this one |
| 5 | 12 | 13 | 25 + 144 = 169 | |
| 8 | 15 | 17 | 64 + 225 = 289 | |
| 7 | 24 | 25 | 49 + 576 = 625 | |
| 20 | 21 | 29 | 400 + 441 = 841 | |
| 9 | 40 | 41 | 81 + 1600 = 1681 | |
| 12 | 35 | 37 | 144 + 1225 = 1369 | |
| 11 | 60 | 61 | 121 + 3600 = 3721 |
Any multiple of a triple is another triple: 3-4-5 scales to 6-8-10 and 30-40-50, which is why builders check a corner by measuring 3 ft, 4 ft and 5 ft.
How this is worked out
The formula
a² + b² = c² (c is the hypotenuse, the side opposite the right angle) c = √(a² + b²) a = √(c² − b²) b = √(c² − a²) Area = a·b ÷ 2 Perimeter = a + b + c α = arctan(a ÷ b), β = 90° − α
Open How it’s calculated above to see this worked through with your own numbers.
What you enter
- Which side is missing?
- Choose one of 3 options.Hypotenuse c (I know both legs) · Leg a (I know b and c) · Leg b (I know a and c)
- Leg a
- Ignored when solving for a.in mm, cm, m, in, ft, yd · 0 or more · defaults to 3
- Leg b
- Ignored when solving for b.in mm, cm, m, in, ft, yd · 0 or more · defaults to 4
- Hypotenuse c
- The longest side, opposite the right angle. Ignored when solving for c.in mm, cm, m, in, ft, yd · 0 or more · defaults to 5
What you get back
- Missing sidemain answer
- Leg a
- Leg b
- Hypotenuse c
- Area
- Perimeter
- Angle opposite a (α)
- Angle opposite b (β)
What this assumes
- Worked steps are shown in meters (the internal base unit); the results are converted to the units you choose.
- The side you are solving for is ignored as an input.
About this calculator
In any right triangle the square on the hypotenuse equals the sum of the squares on the two legs: a² + b² = c². It is probably the most-used fact in all of geometry, because it turns "how far?" questions into arithmetic — the diagonal of a TV screen, the length of a ladder, the distance between two points on a map.
How to use it
Choose which side you're missing, enter the two you know (in any unit), and read off the third along with the area, perimeter and the two acute angles. The hypotenuse is always the longest side and always sits opposite the right angle; if you're solving for a leg and enter a hypotenuse that's shorter than the other leg, the calculator flags it, because no such triangle exists.
Why it's true
Draw a square with side a + b and place four copies of the right triangle inside it, corners touching. The uncovered middle is a tilted square of side c. Count the area two ways: (a + b)² = 4 × (½ab) + c², which simplifies to a² + b² = c². There are hundreds of proofs, but that one fits on a napkin.
Useful special cases
- 3-4-5 and its multiples (6-8-10, 9-12-15) — builders use a 3-4-5 layout to check that a corner is square.
- 5-12-13, 8-15-17, 7-24-25 are other whole-number "Pythagorean triples".
- 45-45-90: the legs are equal and the hypotenuse is leg × √2.
- 30-60-90: the sides are in the ratio 1 : √3 : 2.
Angles
Once you know two sides you know everything: tan α = a/b gives the angle opposite leg a, and the other acute angle is 90° − α. Switch the angle unit to radians if you're feeding the result into a formula.
Common mistakes
- Adding the squares when you're looking for a leg. If you know the hypotenuse, subtract.
- Forgetting the square root at the end (25 is c², not c).
- Using it on a triangle that isn't right-angled. For any other triangle you need the law of cosines — see the Triangle Calculator.
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 3 and 4, c = √(9 + 16) = √25 = 5.
▸How do I find a missing leg?
Square the hypotenuse, subtract the square of the known leg, and take the square root: a = √(c² − b²). For c = 13 and b = 12, a = √(169 − 144) = 5.
▸Does the Pythagorean theorem work for every triangle?
No — only right triangles. For other triangles use the law of cosines, c² = a² + b² − 2ab·cos C, which reduces to Pythagoras when C = 90°.
▸How can I tell whether a triangle is a right triangle?
Square the two shorter sides and add them. If the total equals the square of the longest side, the triangle is right-angled. 5, 12, 13 works (25 + 144 = 169); 5, 12, 14 does not.
Put this calculator on your own site
A working pythagorean, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.
Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.
Pythagorean Theorem Calculator by CalculateItNow
The page's own title. The clearest description of what the link leads to.
The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.
Browse every calculator widget·How to add it to WordPress, Squarespace or Wix
Related calculators
The questions people ask next to a pythagorean.
From three side lengths get the area (Heron's formula), all three angles, perimeter, heights, inradius and circumradius, and whether it's right, acute or obtuse.
Straight-line distance between two points in 2D or 3D from their coordinates, with Manhattan distance, midpoint and the Pythagorean working shown.
Square roots, cube roots and nth roots with the radical simplified (√72 = 6√2) via prime factorization, plus the number squared and cubed.
Slope, y-intercept and the equation of the line through two points, plus distance, midpoint, angle and the perpendicular slope — with rise-over-run shown.
Convert between inches, feet, yards, miles, millimeters, centimeters, meters, kilometers and nautical miles — all at once, with exact factors and a reference table.
Solve a right triangle from two sides, or a side and an angle: all three sides, both acute angles, area, perimeter, altitude, inradius and circumradius.