Pythagorean Theorem Calculator
c (hypotenuse)
5
Perimeter
12
Area
6
How to Use
Choose which side to solve for: c (the hypotenuse — the longest side, opposite the right angle) or either leg (a or b). Fill in the two known side lengths. The answer updates instantly, along with the triangle's perimeter and area. The unknown side's input is disabled while being solved; toggle the mode to switch which side you want to compute.
The Pythagorean Theorem
In a right triangle — a triangle with one 90° angle — the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². This identity has been known since antiquity and named for Pythagoras of Samos (~570-495 BCE), though it appears in Babylonian mathematics centuries earlier. It underlies much of Euclidean geometry, trigonometry, and the distance formula.
Formulas Used
Hypotenuse: c = √(a² + b²). Leg: a = √(c² − b²) and b = √(c² − a²). When solving for a leg, c must be greater than the other leg; otherwise no real solution exists. Area = (a × b) / 2. Perimeter = a + b + c. All outputs round display values to six decimal places but the underlying precision is IEEE 754 double.
Common Use Cases
- Students verifying homework answers in geometry or trigonometry classes.
- Carpenters and DIY builders computing diagonal bracing, stair runs, and squared corners (3-4-5 rule).
- Surveyors and architects checking right angles on plots and plans.
- Graphics programmers computing 2D distances via the distance formula (a special case of this theorem).
- Anyone verifying a Pythagorean triple (e.g., 3-4-5, 5-12-13, 8-15-17).
Tips
- The 3-4-5 rule is the easiest way to check a right angle in the field: if a 3-4-5 triangle fits, the corner is 90°.
- Common Pythagorean triples: (3,4,5), (5,12,13), (8,15,17), (7,24,25), (20,21,29). All multiples are also valid.
- The hypotenuse is always the longest side. If your known c is not greater than a and b, the triangle cannot exist.
- For non-right triangles, use the Law of Cosines: c² = a² + b² − 2ab·cos(C).
- The theorem extends to 3D as the distance formula: d = √(x² + y² + z²).
Privacy
All calculations happen in your browser. The values you enter are never sent to any server or stored anywhere.
FAQ
What is the difference between the hypotenuse (c) and the legs (a, b)?
The hypotenuse c is the side opposite the right angle and is always the longest side of a right triangle. The legs a and b are the two sides that form the right angle and are shorter than c. You can switch modes to solve for c, or for either leg a or b.
Are the side lengths I enter sent to a server?
No. All calculations run entirely in your browser, and the values you enter are never sent to or stored on a server. You can safely enter design or survey measurements.
Does it also compute the hypotenuse, perimeter, and area at the same time?
Yes. When you enter the two known sides, it computes the unknown side plus the perimeter (a + b + c) and area ((a × b) / 2). Display values are rounded to six decimal places, while the internal math uses IEEE 754 double precision.
What happens if c is too short when solving for a leg?
When solving for leg a (or b), the hypotenuse c must be greater than the other leg. Otherwise c² − b² becomes negative and no real solution exists. Inputs that violate the rule that the hypotenuse is always the longest side do not form a valid triangle.
How can I use it to check a right angle in the field?
The 3-4-5 rule is handy: enter a = 3 and b = 4 and the hypotenuse c comes out to 5. If a 3-4-5 ratio triangle fits the corner exactly, the angle is 90°. Other Pythagorean triples like 5-12-13 and 8-15-17 work the same way.