How the calculator finds the missing side
Every right triangle has five interesting numbers — three sides and two acute angles — and knowing any two of them pins down the rest. Which two you know decides which tool does the job: the Pythagorean theorem when you know two sides, and the trigonometric ratios when you know a side and an angle. The calculator handles all three cases, so the only decision you have to make is which case yours is.
Case 1: you know both legs
This is the classic case, and the one the Pythagorean theorem was made for. The hypotenuse is the square root of the sum of the squares of the legs: c = √(a² + b²). With legs 3 and 4, that is √(9 + 16) = √25 = 5. The angles follow from the sides: angle A is the inverse tangent of a over b, and angle B is simply 90° minus angle A, because the two acute angles in any right triangle always add up to 90°. Builders meet this case constantly — a rectangular floor 3 metres by 4 metres has a diagonal of exactly 5 metres, which is why the 3-4-5 check is the standard way to square up a foundation or a deck frame before the concrete goes in.
Case 2: you know the hypotenuse and one leg
Here the same theorem is rearranged. Since a² + b² = c², the unknown leg is b = √(c² − a²). With a hypotenuse of 10 and a known leg of 6, that is √(100 − 36) = √64 = 8. The subtraction is the whole story: you are taking the known leg out of the hypotenuse, in squared form, and whatever is left is the other leg squared. This case has one hard rule the calculator enforces — the hypotenuse has to be longer than the leg. If you enter a hypotenuse of 6 and a leg of 10, there is no such triangle: the square root would be of a negative number, which has no real answer. The calculator says so plainly instead of printing a nonsense result.
Case 3: you know one side and one acute angle
When an angle is in the mix, the trigonometric ratios take over. Relative to angle A, leg a is the opposite side, leg b is the adjacent side, and c is the hypotenuse. Sine of A is opposite over hypotenuse, cosine of A is adjacent over hypotenuse, and tangent of A is opposite over adjacent — SOH-CAH-TOA, the mnemonic every trigonometry student learns. So if the hypotenuse is 10 and angle A is 30°, the opposite side is 10 × sin(30°) = 10 × 0.5 = 5, and the adjacent side is 10 × cos(30°) = 10 × 0.8660 = 8.66. The other acute angle is 90° − 30° = 60°. This is the case surveyors and roofers live in: measure one distance and one angle, and the rest of the triangle is arithmetic.
The formulas, in one place
Pythagorean theorem: a² + b² = c² · Hypotenuse from two legs: c = √(a² + b²) · Leg from hypotenuse and leg: b = √(c² − a²) · sin(A) = a ÷ c · cos(A) = b ÷ c · tan(A) = a ÷ b · Angle B = 90° − Angle A · Area = (a × b) ÷ 2 · Perimeter = a + b + c
Worked example 1: legs 3 and 4
Step 1 — the hypotenuse. c = √(3² + 4²) = √(9 + 16) = √25 = 5.00. Step 2 — angle A. tan(A) = a ÷ b = 3 ÷ 4 = 0.75, so A = arctan(0.75) = 36.87°. Step 3 — angle B. B = 90° − 36.87° = 53.13°. Step 4 — the rest. Area = (3 × 4) ÷ 2 = 6.00 square units, and perimeter = 3 + 4 + 5 = 12.00. This is the 3-4-5 triangle, the simplest Pythagorean triple, and it is the default the calculator loads with.
Why it matters: any rectangle whose sides are in the ratio 3 to 4 has a diagonal of 5 in the same units, which is the quickest squareness check on a building site — measure 3 along one edge, 4 along the other, and the diagonal between the marks must read 5.
Worked example 2: hypotenuse 10, leg 6
Step 1 — the missing leg. b = √(c² − a²) = √(10² − 6²) = √(100 − 36) = √64 = 8.00. Step 2 — angle A. sin(A) = a ÷ c = 6 ÷ 10 = 0.6, so A = arcsin(0.6) = 36.87°. Step 3 — angle B. B = 90° − 36.87° = 53.13°. Step 4 — the rest. Area = (6 × 8) ÷ 2 = 24.00 square units, and perimeter = 6 + 8 + 10 = 24.00. Notice the angles match example 1 exactly: 6-8-10 is the 3-4-5 triangle doubled, so it has the same shape and the same angles, only twice the size.
Why it matters: a ladder leaning against a wall is this case in disguise — the ladder is the hypotenuse, the distance from the wall is one leg, and the height it reaches is the leg you are solving for. Knowing two of the three tells you the third before anyone climbs.
Worked example 3: hypotenuse 10 with a 30° angle
Step 1 — the side opposite the angle. a = c × sin(30°) = 10 × 0.5 = 5.00. Step 2 — the side next to the angle. b = c × cos(30°) = 10 × 0.8660 = 8.66. Step 3 — the other angle. B = 90° − 30° = 60.00°. Step 4 — the rest. Area = (5 × 8.66) ÷ 2 = 21.65 square units, and perimeter = 5 + 8.66 + 10 = 23.66. The 30-60-90 triangle is a special case worth remembering: the side opposite 30° is always exactly half the hypotenuse, and the side opposite 60° is the short leg times the square root of 3, about 1.732.
Why it matters: a ramp or a roof at 30° follows this triangle exactly. If the slope surface is 10 feet long, it rises 5 feet and runs 8.66 feet horizontally — no measuring tape needed on the far side.
Pythagorean triples: whole-number triangles worth knowing
Most right triangles have at least one irrational side — the square root of a number that is not a perfect square, like √2 = 1.4142… But a few have all three sides as whole numbers, and those are called Pythagorean triples. They are useful because they let you check a right angle, or a calculation, without touching a square root. If your numbers match a triple, you can read the answer off the table instead of computing it.
| Triple (a, b, c) | Check: a² + b² | Equals c² | Angles A / B |
| 3, 4, 5 | 9 + 16 = 25 | 25 | 36.87° / 53.13° |
| 5, 12, 13 | 25 + 144 = 169 | 169 | 22.62° / 67.38° |
| 8, 15, 17 | 64 + 225 = 289 | 289 | 28.07° / 61.93° |
| 7, 24, 25 | 49 + 576 = 625 | 625 | 16.26° / 73.74° |
| 20, 21, 29 | 400 + 441 = 841 | 841 | 43.60° / 46.40° |
| 9, 40, 41 | 81 + 1600 = 1681 | 1681 | 12.68° / 77.32° |
| 12, 35, 37 | 144 + 1225 = 1369 | 1369 | 18.92° / 71.08° |
How to spot and scale them. A triple is easy to recognise once you know the trick: the two smaller numbers, squared and added, land exactly on a square number. The smallest triple, 3-4-5, is the one to memorise — it is the seed for the whole family. And every triple scales: multiply all three numbers by the same amount and you get another valid triple. Double 3-4-5 and you get 6-8-10, the triangle in worked example 2. Triple it and you get 9-12-15. Multiply by 5 and you get 15-20-25. That scaling is what makes triples practical on site: a 3-4-5 check works at any size, so a builder laying out a patio can mark 3 feet and 4 feet, or 6 feet and 8 feet, and in both cases the diagonal must read the scaled hypotenuse or the corner is not square. The angles never change when you scale — 6-8-10 has the same 36.87° and 53.13° as 3-4-5 — because scaling changes size, not shape. If your numbers are close to a triple but not exact, they are not a triple: 3, 4, and 5.1 is not a right triangle at all, and the calculator will show the angles that prove it.
Where this comes up in real life
- Squaring up a build: the 3-4-5 check is the standard way to verify a corner is truly 90° before pouring concrete, framing a deck, or laying tile. Measure along both edges, check the diagonal, and any error shows up immediately.
- Ladders and reach: a ladder is a hypotenuse. If you know how far its foot sits from the wall and how long the ladder is, the height it reaches is the missing leg — work it out on the ground instead of discovering it halfway up.
- Ramps and roofs: a roof pitch or a wheelchair ramp is usually described by one angle and one length. The rise and the run are the two legs, and the angle case of this calculator gives both from a single measurement.
- Navigation and surveying: a bearing and a distance form a right triangle with north and east. The two legs are how far north and how far east you have travelled, which is exactly how a position fix is built from a single sighting.
- Cutting and joinery: a diagonal brace across a rectangular frame, a mitre cut, or a stair stringer all reduce to a right triangle with one side missing. Cut once, to the computed length, instead of measuring twice and trimming.
- Homework and exams: right-triangle problems are the first place Pythagoras and trigonometry meet. The step-by-step working shows the method, not just the answer, so it doubles as a way to check your own working line by line.
Mistakes that give the wrong answer
The most common error is calling a leg the hypotenuse. The hypotenuse is always the longest side and always sits opposite the right angle — if your "hypotenuse" is shorter than one of your legs, the numbers describe no triangle at all, and the calculator will tell you so. The second error is mixing up opposite and adjacent: both are legs, and which is which depends entirely on which angle you are standing at. Relative to angle A, leg a is opposite and leg b is adjacent; relative to angle B, they swap. The diagram at the top of the calculator labels each side, so check your numbers against it before typing. The third error is the angle unit: the calculator takes degrees, the unit on every protractor and spirit level. If your angle came from a calculator set to radians, 0.52 radians is 30°, and entering 0.52 as degrees will give a triangle that is nearly flat. And the fourth is rounding too early — carry full precision through the steps and round only the final answer to two decimal places, which is what this calculator does. Rounding the hypotenuse to 5 before squaring it again, for instance, quietly moves the area by more than the rounding itself.
What if you know something else?
Two known values determine a right triangle, but not every pair will do. Two angles alone are not enough — they fix the shape but not the size, so a triangle with angles 36.87° and 53.13° could be 3-4-5 or 300-400-500. One side alone is not enough either, for the same reason: a leg of 4 belongs to infinitely many right triangles. And three sides are more than you need — if all three are given, the calculator's job is just to check them, which the triples table above does at a glance. If you know the area of a triangle from its coordinates instead, the area of a triangle by coordinates calculator is the right tool. If you need the distance around any shape, the perimeter calculator covers it.
For the square roots behind the Pythagorean theorem, use the square root calculator. For more geometry, browse the math calculators.
Last reviewed November 24, 2026. All calculations run in your browser — nothing you type leaves your device. Sides and angles are shown to two decimal places; the worked examples above use the same rounding.