Find the hypotenuse or a missing leg of a right triangle, with every step of the calculation shown.
The Pythagorean theorem says that, in a right triangle, the square built on the hypotenuse has the same area as the two squares built on the legs: a² + b² = c². It is the oldest formula most people still use after leaving school, and it holds only for triangles with a 90° angle — the hypotenuse being the side opposite that angle, and always the longest of the three. Two operations come out of it, and this calculator performs both: c = √(a² + b²) when you know the two legs, and a = √(c² − b²) when you know the hypotenuse and one leg.
Which side gets calculated is decided by the field you leave empty, so there is no mode to pick. The tool reads decimals written with either a comma or a dot, refuses sides that are zero or negative, and, in the missing-leg case, refuses a hypotenuse that is not longer than the leg you typed — that triangle cannot exist. Next to the missing side it shows the arithmetic with your own numbers, the area (a × b ÷ 2), the perimeter, and the two acute angles obtained from the arctangent of the legs. Those angles always add up to 90°, which doubles as a sanity check on what you entered.
A few right triangles have three whole-number sides and are worth memorising: 3-4-5, 5-12-13, 8-15-17, 7-24-25 and 20-21-29, plus every multiple of them (6-8-10, 9-12-15, and so on). These Pythagorean triples are why builders still square a corner with the 3-4-5 method — measure 3 units along one wall, 4 along the other, and adjust until the diagonal reads exactly 5. The same theorem gives the diagonal of a TV or a sheet of plywood, the true length of a ramp or a roof rafter, and the straight-line distance between two points on a map or a screen. Everything is computed in JavaScript on your device: the numbers you type never leave the browser.
a² + b² = c², where c is the hypotenuse (the side opposite the right angle). Hypotenuse: c = √(a² + b²). Missing leg: a = √(c² − b²). Valid only for right triangles — for any other triangle, the general version is the law of cosines.
Square each leg, add the two results and take the square root. With legs 3 and 4: 9 + 16 = 25, and √25 = 5. Leave the hypotenuse field empty and the calculator does exactly that, showing each step.
Subtract instead of adding: leg = √(c² − b²). With hypotenuse 13 and leg 5, that is 169 − 25 = 144, and √144 = 12. Leave the leg field empty to get it.
3-4-5, 5-12-13, 8-15-17, 7-24-25 and 20-21-29 are the classics, and any multiple of a triple is also a triple — 6-8-10 and 9-12-15 both come from 3-4-5.
No. It only holds when one of the angles is exactly 90°. If you fill in all three sides, the tool tells you whether that condition is met; for triangles without a right angle, use the law of cosines instead.
No. The whole calculation runs in JavaScript on your device — nothing is sent to a server, stored or logged.
Vai.la turns any URL into a short link with click statistics, QR Code and your own biolink.
Vai.la is not responsible for how the tools are used or for decisions made based on their results.