Triangle Calculator
Solve any triangle from SSS, SAS, ASA, AAS or SSA, with law of sines and cosines steps and the ambiguous case.
This Pythagorean theorem calculator finds the missing side of a right triangle with , so the hypotenuse is .
Hypotenuse c
c = 5
A = 36.86989765°, B = 53.13010235°, C = 90°
The legs are 3 and 4 and the hypotenuse is 5. The acute angles are 36.86989765° and 53.13010235°, the area is 6 and the altitude to the hypotenuse is 2.4.
Angles are in degrees. The two acute angles always add up to 90°.
3, 4 and 5 are whole numbers, so they form a Pythagorean triple.
| Part | Value | Source |
|---|---|---|
| Leg a | 3 | Given |
| Leg b | 4 | Given |
| Hypotenuse c | 5 | Calculated |
| Angle A | 36.86989765° | Calculated |
| Angle B | 53.13010235° | Calculated |
| Angle C | 90° | Right angle |
Label the triangle
The right angle is C, the hypotenuse c is opposite it, and legs a and b are opposite angles A and B. Given: a = 3, b = 4.
Pythagorean theorem for the hypotenuse
TOA: tangent gives angle A
tan A = opposite / adjacent = a / b.
The acute angles add up to 90°
Area and perimeter
Check with the Pythagorean theorem
Add an angle to solve the whole right triangle with SOH-CAH-TOA, or enter three sides to check for a right angle.
Pythagorean theorem
Plain-text formula: a^2 + b^2 = c^2, c = √(a^2 + b^2), a = √(c^2 − b^2), b = √(c^2 − a^2)
The square of the hypotenuse equals the sum of the squares of the legs. Rearrange it to find whichever side is missing: add the squares for the hypotenuse, subtract them for a leg.
SOH-CAH-TOA
Plain-text formula: sin A = a/c, cos A = b/c, tan A = a/b
Sine is opposite over hypotenuse, cosine is adjacent over hypotenuse, tangent is opposite over adjacent. Use them when a side and an angle are known, or the inverse functions to find an angle from two sides.
Area, altitude and radii
Plain-text formula: K = (ab)/2, h_c = (ab)/c, r = (a + b − c)/2, R = c/2
The legs are perpendicular, so they serve as base and height. The circumscribed circle has the hypotenuse as its diameter.
Check that the answer makes sense: the hypotenuse is always the longest side, the larger acute angle is opposite the longer leg, and A + B = 90°.
When the sides are whole numbers, decimals or fractions, the side found with the Pythagorean theorem is also shown in exact form. For legs 1 and 1, a 45-45-90 triangle, the hypotenuse is exactly √2 ≈ 1.414213562, not a rounded decimal.
In feet or inches the sides are also listed in feet and inches, rounded to the nearest 1/16 inch, which is what a tape measure shows. For triangles that are not right-angled, use the triangle calculator, which applies the laws of sines and cosines.
Label the sides first: the hypotenuse c is opposite the right angle, and the legs a and b form the right angle. Then square the two sides you know.
To find the hypotenuse, add the squares and take the square root. For legs 6 and 8: , so .
To find a leg, subtract the square of the known leg from the square of the hypotenuse. For c = 13 and b = 5: , so .
With one side and an angle, use SOH-CAH-TOA instead. For c = 10 and A = 30°: and , and B = 90° − 30° = 60°.
On a handheld calculator, type the squares and the square root in that order, for example √(6² + 8²), or use the scientific calculator with sqrt(6^2+8^2).
A Pythagorean triple is three whole numbers that fit . Any multiple of a triple is also a triple, so 3-4-5 gives 6-8-10, 9-12-15 and 30-40-50. Type any row below into the calculator to see the angles. For the full list up to 1,000, a checker and Euclid’s formula, see the Pythagorean triples calculator.
| Legs a and b | Hypotenuse c | Check | Smaller acute angle |
|---|---|---|---|
| 3, 4 | 5 | 9 + 16 = 25 | 36.86989765° |
| 5, 12 | 13 | 25 + 144 = 169 | 22.61986495° |
| 8, 15 | 17 | 64 + 225 = 289 | 28.07248694° |
| 7, 24 | 25 | 49 + 576 = 625 | 16.26020471° |
| 20, 21 | 29 | 400 + 441 = 841 | 43.60281897° |
| 9, 40 | 41 | 81 + 1600 = 1681 | 12.68038349° |
Builders use the converse of the Pythagorean theorem to check that a corner is square. Measure 3 units along one wall and 4 along the other; if the diagonal between the marks is exactly 5, the corner is 90°. Scale it up for accuracy: 6-8-10 or 9-12-15 feet on a deck or slab.
For a whole rectangle, measure both diagonals; they are equal only when every corner is square. To find the diagonal you should get, enter the length and width as the two legs. A 12 ft by 16 ft room has a diagonal of exactly 20 ft.
With feet and inches, choose feet as the unit and type sides such as 9' 6" and 12' 3 1/2". The calculator gives the diagonal as 15 ft 6 7/16 in, to the nearest 1/16 inch.
How high up the wall does the ladder reach, and what angle does it make with the ground?
Answer: The ladder reaches about 5.81 m up the wall and makes an angle of about 75.5° with the ground.
Enter both legs. The hypotenuse is ; for legs 3 and 4 it is .
Enter the hypotenuse and the other leg. Then ; for c = 13 and b = 12 the missing leg is a = 5.
Yes. 3-4-5 is the smallest whole-number solution of , since . Builders use it, through the converse of the theorem, to check that a corner is exactly 90°.
In a 30-60-90 triangle the sides are in the ratio . The side opposite 30° is half the hypotenuse, and the side opposite 60° is times that.
Square the two shorter sides and add them. If the total equals the square of the longest side, the triangle is right-angled; if it is larger the triangle is acute, and if smaller it is obtuse. Enter all three sides above to check.
Yes. Sides accept fractions such as 3/4 and mixed numbers such as 5 1/2. Choose feet or inches as the unit to type lengths such as 5' 6 1/2"; the answers are listed in feet and inches to the nearest 1/16 inch.
SOH-CAH-TOA as side ratios only works in a right triangle. For other triangles, the laws of sines and cosines use the same functions; the triangle calculator applies them.
Solve any triangle from SSS, SAS, ASA, AAS or SSA, with law of sines and cosines steps and the ambiguous case.
Pythagorean triples listed to 1,000, a checker with working, Euclid’s formula and triples for any side.
All six trig functions of an angle, or the angle from a ratio, with exact values, quadrant and steps.
Polar ↔ rectangular (Cartesian) conversion with steps, quadrant reasoning, exact values and exponential form.
DMS to decimal degrees and back for latitude and longitude, with N/S/E/W, DDM, radians and every step.
Type or tap expressions with exact fractions, memory, variables, constants and complex mode.
Learn more: To find a side or an angle by hand with SOH CAH TOA, read how to use sin, cos and tan.
Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?