Pythagorean Theorem Calculator
Solve for any side of a right triangle using the Pythagorean theorem, or validate whether three given lengths form a right triangle. Great for construction, navigation, and geometry practice.
About this calculator
The Pythagorean theorem states that in any right triangle, the square of the hypotenuse c equals the sum of the squares of the two legs a and b: a² + b² = c². To find the hypotenuse, use c = √(a² + b²). To find a missing leg, rearrange: a = √(c² − b²) or b = √(c² − a²). The theorem holds exclusively for right triangles — those containing a 90° angle. To validate three side lengths, check whether a² + b² = c² (within a small tolerance for floating-point arithmetic). The theorem is a cornerstone of Euclidean geometry and underpins trigonometry, coordinate geometry, and distance calculations in any number of dimensions.
How to use
Example 1 — find the hypotenuse: set a = 3, b = 4. c = √(3² + 4²) = √(9 + 16) = √25 = 5 units. Example 2 — find a missing leg: set c = 13, b = 5. a = √(13² − 5²) = √(169 − 25) = √144 = 12 units. Example 3 — validate: enter a = 5, b = 12, c = 13; check 5² + 12² = 25 + 144 = 169 = 13². The calculator confirms this is a valid right triangle. Select your desired 'Solve For' option, enter the two known values, and set decimal places for the precision you need.
Frequently asked questions
How do you use the Pythagorean theorem to find a missing side of a right triangle?
Identify which side is missing. If the hypotenuse c is unknown, use c = √(a² + b²). If a leg is unknown, rearrange to a = √(c² − b²). Always ensure the hypotenuse is the longest side (opposite the right angle). For example, with a = 8 and b = 15, the hypotenuse is c = √(64 + 225) = √289 = 17. The theorem only works for right triangles; for other triangles you need the law of cosines.
What are common Pythagorean triple examples and why are they useful?
A Pythagorean triple is a set of three positive integers (a, b, c) satisfying a² + b² = c². The most common examples are (3, 4, 5), (5, 12, 13), (8, 15, 17), and (7, 24, 25). Multiples also work: (6, 8, 10) and (9, 12, 15) are both derived from (3, 4, 5). These triples are extremely useful in construction and carpentry because they allow builders to verify right angles without measuring angles directly — simply lay out sides in a 3:4:5 ratio to guarantee a perfect 90° corner.
When does the Pythagorean theorem not apply and what should I use instead?
The Pythagorean theorem applies only to right triangles in flat (Euclidean) geometry. For non-right triangles, use the law of cosines: c² = a² + b² − 2ab × cos(C), which reduces to the Pythagorean theorem when angle C is 90°. On curved surfaces such as the Earth's surface, spherical trigonometry must be used instead. Additionally, in three-dimensional space, the straight-line distance between two points uses an extended version: d = √(Δx² + Δy² + Δz²), which is still rooted in the same Pythagorean principle.