Right Triangle & Pythagorean: worked example
| Leg a | 5 |
|---|---|
| Leg b | 12 |
| Hypotenuse (c) | 13 |
| Angle A (degrees) | 22.6 |
| Angle B (degrees) | 67.4 |
| Area | 30 |
Right Triangle & Pythagorean: formula
Enter the two legs of the right triangle, a and b. The calculator finds the hypotenuse with the Pythagorean theorem, the two acute angles with the arctangent and the area. Angle A is opposite leg a.
The angles add up to 90 degrees. If you know one leg and the hypotenuse, use the Pythagorean theorem calculator or subtract to find the other leg.
Right Triangle & Pythagorean: changing Leg a
| Leg a | Hypotenuse (c) | Angle A (degrees) | Angle B (degrees) | Area |
|---|---|---|---|---|
| 4 | 12.6 | 18.4 | 71.6 | 24 |
| 4.5 | 12.8 | 20.6 | 69.4 | 27 |
| 5 (example) | 13 | 22.6 | 67.4 | 30 |
| 5.5 | 13.2 | 24.6 | 65.4 | 33 |
| 6 | 13.4 | 26.6 | 63.4 | 36 |
Right Triangle & Pythagorean: compare input ranges
| Input | Tested from | To | Hypotenuse (c): low input | Hypotenuse (c): high input | Swing |
|---|---|---|---|---|---|
| Leg b | 11 | 13 | 12.1 | 13.9 | 1.8 (14%) |
| Leg a | 4.5 | 5.5 | 12.8 | 13.2 | 0.384 (3.0%) |
Right Triangle & Pythagorean: individual input comparisons
| Input | Value | Hypotenuse (c) | Angle A (degrees) | Angle B (degrees) | Area |
|---|---|---|---|---|---|
| Leg a | 4 | 12.6 | 18.4 | 71.6 | 24 |
| 4.5 | 12.8 | 20.6 | 69.4 | 27 | |
| 5 | 13 | 22.6 | 67.4 | 30 | |
| 5.5 | 13.2 | 24.6 | 65.4 | 33 | |
| 6 | 13.4 | 26.6 | 63.4 | 36 | |
| Leg b | 10 | 11.2 | 26.6 | 63.4 | 25 |
| 11 | 12.1 | 24.4 | 65.6 | 27.5 | |
| 12 | 13 | 22.6 | 67.4 | 30 | |
| 13 | 13.9 | 21 | 69 | 32.5 | |
| 14 | 14.9 | 19.7 | 70.3 | 35 |
Right Triangle & Pythagorean: combined input changes
| Leg a / Leg b | 10 | 12 | 14 |
|---|---|---|---|
| 4 | 10.8 | 12.6 | 14.6 |
| 4.5 | 11 | 12.8 | 14.7 |
| 5 | 11.2 | 13 | 14.9 |
| 5.5 | 11.4 | 13.2 | 15 |
| 6 | 11.7 | 13.4 | 15.2 |
Right Triangle & Pythagorean: which assumptions move the result?
Right Triangle & Pythagorean: values and definitions
| Quantity and definition | Value used |
|---|---|
| Leg a | 5 |
| Leg b | 12 |
| Hypotenuse (c) | 13 |
| Angle A (degrees) | 22.6 |
| Angle B (degrees) | 67.4 |
| Area | 30 |
Right Triangle & Pythagorean: half and double Leg b
| Leg b | Hypotenuse (c) |
|---|---|
| 6 | 7.8 |
| 12 | 13 |
| 24 | 24.5 |
Common error: Mixing up which leg goes with which angle. Angle A sits opposite leg a, so the longer leg faces the larger angle.
The triangle must have a right angle, or the formulas do not apply. Small errors in measuring the legs can shift the angles, especially in thin triangles. Angles are given in degrees.
For other triangles use the law of sines or the triangle side calculator.
Geometry calculators: Aquarium Volume Calculator, Annulus Area Calculator, Regular Polygon Calculator, Rhombus Area Calculator, Hemisphere Volume Calculator, Cone Frustum Calculator.
Two legs of a right triangle fix everything else. The hypotenuse follows from the Pythagorean theorem, the angles from the ratio of the legs, and the area from half their product. A 5 by 12 triangle has a 13 unit hypotenuse, angles of about 22.6 and 67.4 degrees, and an area of 30.
That angle is what you set on a saw or a level when you have only tape measure readings. For comparison, a 3 by 4 triangle has a hypotenuse of 5 and an 8 by 15 triangle has 17. These whole-number sets, 3-4-5, 5-12-13 and 8-15-17, are why builders can check a square corner with a tape measure alone.
Confirm the corner really is square. The formulas assume a 90 degree angle, and a slightly off corner gives an angle that only looks right.
See the Pythagorean theorem calculator for the hypotenuse, the trigonometry page for sine and cosine, and the distance and slope calculator for coordinates. The triangle area and equilateral triangle pages cover other triangles, and the stair, roof and ramp calculators in the trades categories apply right triangles.
Right Triangle & Pythagorean Calculator: application examples
Pythagorean Theorem Calculator
Calculate the hypotenuse of a right triangle from its two legs. Only applies to right triangles: a 90° angle between the two legs.
Pythagorean Theorem Calculator: full formula
| Leg A | 3 |
|---|---|
| Leg B | 4 |
| Hypotenuse | 5 |
| Triangle area | 6 |
The hypotenuse is the square root of the sum of the squares of the legs. Legs of 3 and 4 give a hypotenuse of 5 and an area of 6, the classic 3-4-5 right triangle. Builders use the 3-4-5 rule to check that corners are square: measure 3 feet along one wall, 4 along the other and confirm the diagonal is 5.
It also gives the straight-line distance between two points on a grid.
Enter the lengths of the two legs of a right triangle, the sides that meet at the right angle, in the same unit. The hypotenuse is the longest side, opposite the right angle. The theorem says the square of the hypotenuse equals the sum of the squares of the legs.
To find a leg instead, use the right triangle calculator. Make sure the triangle really has a right angle before using the theorem.
The theorem only holds when the angle between the two given sides is ninety degrees. Apply it to a triangle that merely looks roughly square and the hypotenuse comes out wrong, sometimes by a meaningful margin depending on how far the real angle sits from ninety.
Confirm the two known sides meet at a right angle, ideally measured, before running the calculation. A framing square or a measured 3-4-5 check is more reliable than eyeballing it.
Applying the theorem to any triangle with a roughly square corner. Off by even a few degrees, the result stops being the hypotenuse of anything real and becomes a number that only looks like one.
Solve for angles and missing legs on the right triangle calculator, general triangles on the law of sines and triangle side pages, and distance on the distance and slope calculator. The rectangular prism page gives space diagonals, and the roof and stair tools in the carpentry category use right triangles.
What are Pythagorean triples?
Sets of whole numbers that satisfy the theorem, such as 3-4-5, 5-12-13 and 8-15-17, useful for quick checks.
Pythagorean Theorem: changing Leg A
| Leg A | Hypotenuse | Triangle area | Angle A (degrees) | Angle B (degrees) |
|---|---|---|---|---|
| 2.4 | 4.7 | 4.8 | 31 | 59 |
| 2.7 | 4.8 | 5.4 | 34 | 56 |
| 3 (example) | 5 | 6 | 36.9 | 53.1 |
| 3.3 | 5.2 | 6.6 | 39.5 | 50.5 |
| 3.6 | 5.4 | 7.2 | 42 | 48 |
Pythagorean Theorem: compare input ranges
| Input | Tested from | To | Hypotenuse: low input | Hypotenuse: high input | Swing |
|---|---|---|---|---|---|
| Leg B | 3.6 | 4.4 | 4.7 | 5.3 | 0.639 (13%) |
| Leg A | 2.7 | 3.3 | 4.8 | 5.2 | 0.36 (7.2%) |
Pythagorean Theorem: individual input comparisons
| Input | Value | Hypotenuse | Triangle area | Angle A (degrees) | Angle B (degrees) |
|---|---|---|---|---|---|
| Leg A | 2.4 | 4.7 | 4.8 | 31 | 59 |
| 2.7 | 4.8 | 5.4 | 34 | 56 | |
| 3 | 5 | 6 | 36.9 | 53.1 | |
| 3.3 | 5.2 | 6.6 | 39.5 | 50.5 | |
| 3.6 | 5.4 | 7.2 | 42 | 48 | |
| Leg B | 3.2 | 4.4 | 4.8 | 43.2 | 46.8 |
| 3.6 | 4.7 | 5.4 | 39.8 | 50.2 | |
| 4 | 5 | 6 | 36.9 | 53.1 | |
| 4.4 | 5.3 | 6.6 | 34.3 | 55.7 | |
| 4.8 | 5.7 | 7.2 | 32 | 58 |
Pythagorean Theorem: combined input changes
| Leg A / Leg B | 3.2 | 4 | 4.8 |
|---|---|---|---|
| 2.4 | 4 | 4.7 | 5.4 |
| 2.7 | 4.2 | 4.8 | 5.5 |
| 3 | 4.4 | 5 | 5.7 |
| 3.3 | 4.6 | 5.2 | 5.8 |
| 3.6 | 4.8 | 5.4 | 6 |
Pythagorean Theorem: values and definitions
| Quantity and definition | Value used |
|---|---|
| Leg A | 3 |
| Leg B | 4 |
| Hypotenuse | 5 |
| Triangle area | 6 |
| Angle A (degrees) | 36.9 |
| Angle B (degrees) | 53.1 |
Pythagorean Theorem: half and double Leg B
| Leg B | Hypotenuse |
|---|---|
| 2 | 3.6 |
| 4 | 5 |
| 8 | 8.5 |
What is the Pythagorean theorem? In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides
How can I check a corner is square? Measure 3 units along one side and 4 along the other. If the distance between the marks is 5 units, the corner is a right angle
The theorem applies only to right triangles, and for other triangles you need the law of cosines. Measurement errors show up in the result, especially for long distances. Units must match.
In three dimensions, the space diagonal of a box extends the formula with a third term.
What is a 5-12-13 triangle?
A right triangle with legs 5 and 12 and hypotenuse 13, one of the Pythagorean triples that fit the theorem with whole numbers.
How steep is a 22 degree slope?
It rises about 0.4 for each unit of run, which is a grade of about 40%.
How do I find the angles of a right triangle?
Use the arctangent of the opposite leg over the adjacent leg for one angle, and subtract it from 90 degrees for the other.