# Pythagorean Theorem Calculator — Solve a Right Triangle

> Solve a right triangle with a²+b²=c². Find the hypotenuse or a missing leg, plus perimeter, area and whether the sides form a Pythagorean triple.

- **Category:** Math
- **Interactive calculator:** https://youcalc.com/en/math/pythagorean-theorem-calculator/
- **Price:** Free, no sign-up required

## Overview

The Pythagorean theorem links the three sides of a right triangle: the square of the hypotenuse (the long side, opposite the right angle) equals the sum of the squares of the two shorter sides, written a² + b² = c². This calculator solves the triangle either way. Give it the two legs and it returns the hypotenuse; give it the hypotenuse and one leg and it finds the missing leg. Alongside the unknown side it reports the perimeter, the area and whether the three sides form a Pythagorean triple. Every side is in the length unit you pick — millimetres, centimetres, metres, inches or feet — and the theorem itself works the same in any of them.

## How to read your result

The large figure is the side you asked for: the hypotenuse when you start from two legs, or the missing leg when you start from the hypotenuse. Below it sit all three sides together, plus the perimeter (a + b + c) and the area (½ × a × b, because the two legs meet at a right angle and act as base and height). A short verdict tells you whether the sides form a Pythagorean triple — three whole numbers, like 3-4-5 or 5-12-13, that satisfy the theorem exactly. The “same triangle in other units” panel restates the hypotenuse and area in every other length unit, so a side typed in inches can be read off in centimetres without retyping.

## Method

For a right triangle with legs a and b and hypotenuse c, a² + b² = c². To find the hypotenuse from the two legs, c = √(a² + b²). To find a missing leg from the hypotenuse and the other leg, leg = √(c² − other²); this requires c to be strictly longer than the known leg, because the hypotenuse is always the longest side — if it is not, the inputs do not describe a real right triangle and the calculator asks you to correct them rather than returning an impossible value. The perimeter is a + b + c and the area is ½ × a × b. A set of three sides is a Pythagorean triple when all three are whole numbers that satisfy the theorem exactly.

## Example

- **Setup:** Two legs of 3 cm and 4 cm, solving for the hypotenuse.
- **Result:** The hypotenuse is √(3² + 4²) = √25 = 5 cm. The perimeter is 12 cm and the area is ½ × 3 × 4 = 6 cm². Because all three sides (3, 4, 5) are whole numbers, this is a Pythagorean triple.

## Frequently asked questions

### How do I find the hypotenuse from the two legs?

Square each leg, add the squares, then take the square root: c = √(a² + b²). With legs of 3 and 4, that is √(9 + 16) = √25 = 5. Enter the two legs and the calculator returns the hypotenuse instantly, in the unit you chose.

### Can I find a missing leg if I only know the hypotenuse and one leg?

Yes. Switch to “A leg”, enter the hypotenuse and the leg you know, and the calculator computes the other leg as √(c² − leg²). For example, a hypotenuse of 5 and a leg of 3 give √(25 − 9) = √16 = 4. The hypotenuse must be longer than the known leg, otherwise the sides cannot form a right triangle.

### What is a Pythagorean triple?

A Pythagorean triple is a set of three whole numbers a, b and c with a² + b² = c² — for example 3-4-5, 5-12-13 and 8-15-17. The calculator flags whether your sides form one. A right triangle whose hypotenuse is √2 (from two legs of 1) is perfectly valid but is not a triple, because √2 is not a whole number.

### Does the unit I choose change the answer?

No. The theorem is unit-agnostic, so a 3-4-5 triangle is a 3-4-5 triangle whether the sides are in centimetres, inches or metres. The unit is simply carried through to the result and used to restate the answer in the other units, where lengths convert by the exact international definitions (1 inch = 2.54 cm, 1 foot = 0.3048 m) and areas by the square of that factor.

## Related calculators

- [Area Calculator](https://youcalc.com/en/math/area-calculator/)
- [Volume Calculator](https://youcalc.com/en/math/volume-calculator/)
- [Circle Calculator](https://youcalc.com/en/math/circle-calculator/)
- [Triangle Solver](https://youcalc.com/en/math/triangle-solver/)
- [Quadratic Equation Solver](https://youcalc.com/en/math/quadratic-equation/)

## Sources

- https://mathworld.wolfram.com/PythagoreanTheorem.html
- https://en.wikipedia.org/wiki/Pythagorean_theorem

---

Interactive version: https://youcalc.com/en/math/pythagorean-theorem-calculator/ · From YouCalc — https://youcalc.com
