Enter any two sides of a right triangle and instantly solve for the missing side, area, perimeter, and both non-right angles — with full step-by-step working.
Choose which side to solve for. The other two are inputs.
Hypotenuse c
Area
6
½ × a × b
Perimeter
12
a + b + c
Angle A
36.87°
opposite side a
Angle B
53.13°
opposite side b
| Triple | Sides | Description |
|---|---|---|
| (3, 4, 5) | a=3, b=4, c=5 | smallest primitive |
| (5, 12, 13) | a=5, b=12, c=13 | classroom favourite |
| (8, 15, 17) | a=8, b=15, c=17 | primitive triple |
| (7, 24, 25) | a=7, b=24, c=25 | primitive triple |
| (20, 21, 29) | a=20, b=21, c=29 | primitive triple |
| (9, 40, 41) | a=9, b=40, c=41 | primitive triple |
The Theorem
For any right-angled triangle, the square built on the hypotenuse (side c, opposite the right angle) has area equal to the combined areas of the squares built on the two legs (a and b). Algebraically this is a² + b² = c². To find a missing side, square the two you know and either add (for the hypotenuse) or subtract (for a leg), then take the square root. The two non-right angles follow from inverse trig and must sum to 90°.
Working for your triangle
About This Tool
The Pythagorean theorem calculator is the simplest way to solve a right triangle. Enter any two of the three sides — two legs, or one leg and the hypotenuse — and the tool returns the missing side, the area, the perimeter, and both non-right angles, plus the full working you would write out by hand.
The theorem itself, a² + b² = c², has been known for at least 2,500 years and predates Pythagoras in Babylonian and Indian mathematics. It is the foundation of Euclidean geometry, the source of the distance formula in coordinate geometry, and the basis of how trigonometry, vector magnitudes, and 3D distance calculations work.
Practically, it shows up in construction and carpentry (checking corners are square with a 3-4-5 triangle), navigation (computing straight-line distance from two perpendicular legs), architecture (roof pitch and diagonal bracing), computer graphics (pixel distances), and physics (resolving perpendicular force components).
Use this free Pythagorean theorem calculator for homework, exam revision, DIY projects, or any time you need the missing side of a right triangle. All computation runs locally in your browser — no sign-up, no tracking.
Solve Any Side
Pick which side is unknown — a, b or c — and the calculator handles the rest.
Area & Perimeter
Both are reported automatically alongside the missing side.
Both Angles
The two non-right angles in degrees, summed always to 90°.
Step-by-Step Working
Every squaring, addition and root — exactly as you'd write it out.
100% Free & Private
No account, no tracking — every calculation runs locally in your browser.
Triple Recognition
Flags classic Pythagorean triples like 3-4-5 or 5-12-13.
Two inputs, one click, every piece of the right triangle solved.
Choose whether you're solving for the hypotenuse c or one of the legs (a or b). The selected side becomes read-only and is computed for you.
Type the two measurements you already have. Any positive number works — integer or decimal. If you pick a leg as unknown, the hypotenuse must be larger than the other leg.
The headline number is your missing side, computed from a² + b² = c². The meta line shows the squaring and addition (or subtraction) used.
The stat tiles show the area (½ × a × b) and perimeter (a + b + c) without any extra input.
Both non-right angles are computed via inverse trig and reported in degrees. They always sum to 90° — a built-in sanity check.
Open the formula card to see every squaring, addition, and root extraction laid out — perfect for showing your work in a homework answer.
Everything you need to know about the Pythagorean theorem and right triangles.
In a right-angled triangle, the square of the hypotenuse (the side opposite the right angle, labelled c) equals the sum of the squares of the other two sides (the legs a and b): a² + b² = c². It is one of the oldest and most fundamental results in geometry, attributed to Pythagoras around 500 BCE — though Babylonian tablets show it was known a thousand years earlier.
Rearrange the theorem: a = √(c² − b²) or b = √(c² − a²). The hypotenuse c must be the largest side, so when solving for a leg, the value under the square root must be positive — otherwise no real triangle exists with those measurements.
A Pythagorean triple is three positive integers (a, b, c) satisfying a² + b² = c². Classic examples are (3, 4, 5), (5, 12, 13), (8, 15, 17), and (7, 24, 25). Any positive multiple of a triple is also a triple (so 6-8-10 and 9-12-15 are scaled versions of 3-4-5). A triple is called primitive if the three numbers share no common factor.
Yes — strictly. For triangles that are not right-angled, use the law of cosines: c² = a² + b² − 2ab·cos(C). The Pythagorean theorem is exactly this formula in the special case where angle C = 90° (cos 90° = 0, so the last term vanishes). For oblique triangles, also see our Triangle Calculator.
Once all three sides are known, use inverse trigonometry: angle A = arcsin(a / c) = arctan(a / b), and similarly for B. The two non-right angles always sum to 90°, since the angle sum of any triangle is 180° and one corner is already 90°. This calculator returns both angles automatically.
Area = (1/2) × a × b — half the product of the two legs. The legs meet at the right angle and so serve directly as base and height, no perpendicular projection required. (For non-right triangles you need Heron's formula or ½·base·height with a measured perpendicular.)
If you're solving for a leg, the hypotenuse must be larger than the other leg — otherwise c² − b² is negative and its square root is not a real number. Check that you've assigned the longest side as c (the hypotenuse). If you accidentally entered c smaller than a or b, swap them.
The Pythagorean theorem appears constantly. Carpenters use 3-4-5 triangles to check whether a corner is truly square. Surveyors use it to compute straight-line distances. The distance formula in coordinate geometry — d = √((x₂−x₁)² + (y₂−y₁)²) — is just Pythagoras. In 3D, the diagonal of a box is √(l² + w² + h²), and in physics, the magnitude of a 2D vector is exactly √(vₓ² + vᵧ²).
Yes — any positive real number works. The calculator accepts decimals directly. For fractions, convert first (e.g. 3/4 = 0.75). Results are reported to 4 decimal places by default. Most "neat" results — like √2 ≈ 1.4142 or √5 ≈ 2.2361 — are irrational and have non-terminating decimal expansions.
Yes. The converse of the Pythagorean theorem states that if a² + b² = c² for the three sides of a triangle, then the triangle is right-angled (with the right angle opposite c). This is what makes the 3-4-5 trick work for builders — measure three sides and check the equation; if it holds, your corner is square to a tolerance of your measurement.
The result was almost certainly known to Babylonian and Indian mathematicians long before Pythagoras (c. 570–495 BCE). A Babylonian clay tablet (Plimpton 322, c. 1800 BCE) lists Pythagorean triples. Pythagoras (or his school) is credited with the first known proof of the result in the western tradition. Today there are over 400 distinct proofs, including a particularly elegant one by James Garfield (later US president) in 1876.
Yes. The 3D distance between two points is d = √((Δx)² + (Δy)² + (Δz)²) — Pythagoras applied twice. The space diagonal of a rectangular box with sides ℓ, w, h is √(ℓ² + w² + h²). More generally, in n-dimensional space, the Euclidean distance is the square root of the sum of squared coordinate differences.