Pythagorean Theorem Calculator - a² + b² = c²
Fill two of a, b (legs) and c (hypotenuse). See area ab/2 and whether integer sides are a 3-4-5 family. Default 3-4-5.
Two of Three Sides
Default a = 3, b = 4 solves c = 5. Fill any two positive sides. If c² ≤ a² (or b²) when solving a leg, the input is rejected.
Right-Triangle Result
What Is a Pythagorean Theorem Calculator and Why Do You Need One?
A Pythagorean theorem calculator solves a² + b² = c² for a right triangle. The legs a and b meet at the right angle. The hypotenuse c sits opposite that right angle and is strictly the longest side. Given any two of those three lengths, the third is determined. This page also reports the triangular area ab/2 and whether integer sides belong to the 3-4-5 family.
The default is a = 3, b = 4, blank c, which yields c = 5 and area 6. That triple is the usual classroom check: 9 + 16 = 25. If you instead know a hypotenuse and one leg, leave the other leg blank. If the numbers you type cannot form a right triangle - for example c = 5 and a = 5, so c² ≤ a² - the remaining leg would be zero or imaginary, and the tool errors instead of printing 0.
The identity holds only for right triangles. Acute and obtuse triangles need the law of cosines. For a general SSS/SAS/ASA solve, use the triangle calculator. For a right triangle with angles as well as sides, the right triangle calculator is the broader tool. If your “sides” are actually coordinate differences, the distance calculator is Pythagoras in disguise.
How to Use This Free Online Pythagorean Theorem Calculator
Using this a² + b² = c² solver takes four steps:
- Fill two of the three boxes. a and b are legs; c is the hypotenuse. Leave the unknown empty.
- Every known length must be positive. Zero and negatives are rejected.
- Read the missing side, area ab/2, and the 3-4-5 flag. If you fill all three, the tool checks whether a² + b² equals c² instead of solving.
- Copy or clear. The last sides stay locally for up to 30 days.
Note: this is not an SSA ambiguous-case solver and not a tool for isosceles acute triangles. Units are whatever you typed; the area is square in those units.
The Pythagorean Theorem Formula - Worked Examples
Worked example - find c from a = 3, b = 4:
- c = √(9 + 16) = √25 = 5
- Area = (3×4)/2 = 6
- Integer 3-4-5 family: yes
Worked example - find b from a = 5, c = 13:
b = √(169 − 25) = √144 = 12. That is a 5-12-13 triangle: a right triangle, but not a 3-4-5 family triple. Area = (5×12)/2 = 30. The 3-4-5 flag stays off on purpose.
Worked example - illegal c = 4, a = 5:
c² = 16, a² = 25, 16 ≤ 25. There is no real positive b. A hypotenuse cannot be shorter than a leg. The calculator rejects this rather than returning a complex square root.
What Is the Hypotenuse?
The hypotenuse is the side opposite the right angle, always the longest of the three. In this UI it is labeled c. If a word problem says “the ladder is the hypotenuse” and “the wall is a leg,” put the ladder in c. Swapping a leg into the c box will still run the algebra but will describe a different right triangle than the one you meant - or it will error if that “c” is not longest.
In a coordinate setting the hypotenuse is the distance between the two endpoints of the legs. That is why (0,0) to (3,4) is 5: the legs are axis-aligned 3 and 4.
Converse of Pythagoras and Non-Right Triangles
The converse says: if a triangle’s sides satisfy a² + b² = c² with c the longest side, then the angle opposite c is 90°. This calculator assumes you already have a right triangle and a missing side. If you type all three sides, it only checks the identity; it does not compute angles. An acute triangle has a² + b² > c² for the longest side c; an obtuse triangle has a² + b² < c². Those cases need the law of cosines, not this solver.
Do not use this page for SSA (“two sides and a non-included angle”) or for an isosceles triangle that is not right. A 6-6-6 equilateral triangle fails a² + b² = c² (36+36 ≠ 36).
What Is a 3-4-5 Triangle?
| Triple | Check | 3-4-5 family? |
|---|---|---|
| 3-4-5 | 9+16=25 | Yes (primitive) |
| 6-8-10 | 36+64=100 | Yes (×2) |
| 5-12-13 | 25+144=169 | No (different primitive) |
| 1.5-2-2.5 | ratio 3:4:5 | No (not integer sides) |
A 3-4-5 triangle has integer sides in the ratio 3:4:5, including multiples such as 6-8-10 and 9-12-15. Carpenters use it to square a corner without a protractor: 3 units along one wall, 4 along the other, 5 on the diagonal. This calculator flags that family only when all three solved sides are integers (within a tiny rounding tolerance) and reduce by gcd to 3, 4, and 5. Other primitive triples remain valid right triangles.
Right-Triangle Area ab/2
When the right angle is between legs a and b, those legs are a base and a perpendicular height, so area = ab/2. Default 3×4/2 = 6. You do not need the hypotenuse for area in this configuration. If a problem gives you a hypotenuse and one acute angle instead of both legs, this tool is the wrong input set - you would need trigonometry first.
Area units are square. Side units stay linear. Mixing them in a sentence (“the hypotenuse is 5 square metres”) is dimensionally false.
Where a² + b² = c² Shows Up in Real Work
1. Construction and layout
Squaring a foundation with a 3-4-5 tape measure. Checking a stair stringer: rise and run are legs, the stringer is close to the hypotenuse (minus nosing details this page ignores).
2. Navigation and vectors
East 3 km and north 4 km is a 5 km displacement. That is the same default triangle. Wind components and force components use the same identity for perpendicular axes.
3. Screens, ramps, and cables
A 16:9 screen’s diagonal is √(16²+9²) times the unit width, not 16+9. A ramp’s length is the hypotenuse of run and rise. A guy-wire from a point 8 m out and 6 m up is 10 m if the ground is level - a 6-8-10 triple.
4. When Pythagoras is the wrong theorem
Non-right corners, spherical triangles, and special relativity’s Minkowski “length” are different geometries. This page is Euclidean plane right triangles only.
Common Mistakes With the Pythagorean Theorem
- Putting a leg in the hypotenuse box so the longest side is mislabeled.
- Using a² + b² = c² on a non-right triangle.
- Adding a + b instead of a² + b² (3+4=7 is not 5).
- Forgetting the square root and reporting 25 as the hypotenuse.
- Assuming every integer right triangle is 3-4-5 (5-12-13 exists).
How to Find a Missing Leg When You Know the Hypotenuse
Rearrange a² + b² = c² to a = √(c² − b²) or b = √(c² − a²). The hypotenuse must be strictly larger than the known leg. A ladder 10 m long leaning against a wall with its foot 6 m from the base has height √(100 − 36) = √64 = 8 m, a 6-8-10 triangle (3-4-5 doubled). If the foot were 10 m from the wall, c would equal the “leg” and the ladder would be lying on the ground; this calculator errors instead of returning height 0, because a degenerate stick is not a triangle.
Numerical caution: when c is only slightly larger than a, c² − a² is a small difference of large squares and can lose digits in IEEE-754. For homework-sized numbers it is fine. For surveying-scale sides that are almost collinear, use higher precision or a rearranged identity; this page does not implement compensated arithmetic.
You cannot recover a unique triangle from the hypotenuse alone. Infinitely many right triangles share c = 10 (any a in (0, 10) with b = √(100 − a²)). That is why the tool insists on two knowns.
Integer Pythagorean Triples vs the 3-4-5 Family
Primitive Pythagorean triples can be generated by integers m > n > 0 of opposite parity, not both odd: a = m² − n², b = 2mn, c = m² + n² (or a and b swapped). m = 2, n = 1 yields 3-4-5. m = 3, n = 2 yields 5-12-13. m = 4, n = 1 yields 15-8-17. This calculator does not generate triples from m and n; it only flags when a solved integer triangle reduces to 3-4-5. A 20-21-29 triangle is right and integer and will not get the 3-4-5 badge, which is correct.
Multiples of 3-4-5 (k = 2, 3, 4, …) are 6-8-10, 9-12-15, 12-16-20, and so on. Carpenters like them because whole centimetres or inches close exactly. A 5-12-13 multiple such as 10-24-26 is also exact but is a different family. Non-integer sides in ratio 3:4:5, such as 1.5-2-2.5, satisfy Pythagoras and have area 1.5, but they fail the integer-side test this page uses for the badge.
Ladders, Walls, and Ground - A Classic Application
A ladder of length c, a wall of height a, and a gap b along the ground form a right triangle if the wall is plumb and the ground is level. Real floors have baseboard, and real ladders have thickness; the geometric c is the centreline. Safety standards also care about the angle, which this page does not compute (angle = arctan(a/b) if you want it elsewhere). The theorem still gives the missing length under those idealizations.
A guy-wire from a point 8 m out from a 6 m mast is 10 m if the ground is flat - another 6-8-10. If the mast sits on a slope, the angle is no longer 90° between “along ground” and “up the mast” in that vertical plane, and Pythagoras on those two measured lengths would be the wrong model.
Honest Limits of This Pythagorean Theorem Calculator
- Right triangles only, with c the hypotenuse.
- No angles and no trig ratios.
- 3-4-5 flag is integer sides only, after reducing by gcd.
- No unit conversion.
- IEEE-754 roots. Huge sides can overflow.
Frequently Asked Questions (FAQ) - Pythagorean Theorem
What is the Pythagorean theorem formula?
For a right triangle with legs a and b and hypotenuse c (the side opposite the right angle), a² + b² = c². This calculator solves for whichever one of a, b, or c you leave blank. Default a = 3, b = 4 gives c = 5.
What is the hypotenuse?
The hypotenuse is the longest side of a right triangle, opposite the right angle. It is labeled c here. You cannot have a hypotenuse shorter than a leg: if you enter c and a with c² ≤ a², the remaining leg would not be a real positive length.
What is the converse of Pythagoras?
If a triangle’s sides satisfy a² + b² = c² (with c the longest side), then the angle opposite c is a right angle. This tool assumes you already have a right triangle and are missing a side. It does not test an arbitrary triangle’s angles; use a general triangle solver for that.
What is a 3-4-5 triangle?
A 3-4-5 triangle has integer sides in the ratio 3:4:5, including multiples such as 6-8-10. They are right triangles. This calculator flags the 3-4-5 family when the solved sides are integers in that ratio. Other Pythagorean triples such as 5-12-13 are right triangles but not 3-4-5.
Does the Pythagorean theorem work for every triangle?
No. a² + b² = c² holds only for right triangles, and only when c is the side opposite the right angle. An acute triangle has a² + b² > c² for the longest side c; an obtuse triangle has a² + b² < c². Do not use this solver for SSA or non-right cases.
Does this Pythagorean theorem calculator upload my numbers?
No. Solving for the missing side, the area ab/2, and the 3-4-5 check all run in your browser. Nothing is sent to a server. After the page loads, the tool still works if the network drops. The last two sides are stored only in localStorage on this device for up to 30 days.
Why Choose Our Pythagorean Theorem Calculator?
- Free, no account. Solve any one of a, b, or c.
- Private. Sides never leave this browser.
- Rejects impossible hypotenuses (c² ≤ a² or b²).
- Area ab/2 shown with the sides.
- 3-4-5 family flag for integer triples, without pretending 5-12-13 is 3-4-5.
- Works offline after the first page load.
Related Tools
Discover more free developer tools that might interest you.
Area Calculator
Calculate area of squares, rectangles, triangles, circles, and more
Use ToolAverage Calculator
Calculate mean, median, mode, and range from a list of numbers
Use ToolBasic Calculator
Add, subtract, multiply, and divide with a free online calculator
Use ToolBig Number Calculator
Add, subtract, multiply, and divide integers too large for a standard calculator
Use ToolBinary Calculator
Add, subtract, and convert binary numbers to decimal and hex
Use ToolCircle Calculator
Find radius, diameter, circumference, area, arc length, and sector area
Use ToolRelated guides
Read the how-to, then come back to this tool when you are ready to run it locally.