Pythagorean Theorem Calculator
A right triangle with legs of 3 and 4 has a hypotenuse of 5, because 3² + 4² = 9 + 16 = 25 = 5². Enter any two sides to find the third, or all three to check for a right angle.
Hypotenuse c
5 ft
- Angles
- α 36.87° (36°52′12″) · β 53.13° · 90°
- Area
- 6 ft²
- Perimeter
- 12 ft
- Height to the hypotenuse
- 2.4 ft
- Inradius · circumradius
- 1 · 2.5 ft
- Pythagorean triple
- 3-4-5
How it’s calculated
- Hypotenuse c√(3² + 4²) = √25 = 5 ft
- Angle α (opposite a)atan(3 ÷ 4) = 36.87°
- Area3 × 4 ÷ 2 = 6 ft²
Updates as you typeNo sign-upShare the link and your numbers travel with it
The theorem and its three forms
| To find | Formula | Example |
|---|---|---|
| Hypotenuse c | c = √(a² + b²) | a 3, b 4 → c = 5 |
| Leg a | a = √(c² − b²) | b 12, c 13 → a = 5 |
| Leg b | b = √(c² − a²) | a 5, c 13 → b = 12 |
The legs a and b meet at the right angle; the hypotenuse c is opposite it and is always the longest side. If you try to find a leg with a “hypotenuse” shorter than the other leg, there is no such triangle, and the calculator says so. Besides the missing side, the result gives both acute angles (α opposite a, β opposite b), the area ab ÷ 2, the perimeter and the height from the right angle to the hypotenuse, ab ÷ c.
Exact roots and Pythagorean triples
When a² + b² is a perfect square, the sides are whole numbers — a Pythagorean triple. The best known are 3-4-5, 5-12-13, 8-15-17 and 7-24-25, and any multiple works: 7.5-10-12.5 is 2.5 times 3-4-5, which the result points out. Otherwise the hypotenuse is a square root that never ends, so the calculator also shows the exact form for math homework: legs of 1 and 1 give √2, legs of 10 and 10 give 10√2. A 48 × 27-inch TV screen has a diagonal of √3033 = 3√337 ≈ 55.07 inches, which is why it is sold as a 55-inch set.
From one side and an angle
When you know one side and one of the acute angles instead of two sides, trigonometry finishes the triangle. With α the angle opposite leg a: c = a ÷ sin α, b = a ÷ tan α; from leg b, c = b ÷ cos α and a = b × tan α; from the hypotenuse, a = c × sin α and b = c × cos α. A ramp 12 ft long rising at 5° climbs 12 × sin 5° = 1.05 ft and covers 12 × cos 5° = 11.95 ft of floor. Choose All sides, from one side and an angle to get every side, both angles, the area and the perimeter.
Squaring a corner: the 3-4-5 rule
Builders lay out square corners for foundations, decks, patios and tile with the theorem. From the corner, mark 3 feet along one side and 4 feet along the other; the diagonal between the marks should be exactly 5 feet. For larger layouts use 6-8-10 or 9-12-15 to reduce the error. Or measure the two sides of any rectangle and compare the diagonal with √(length² + width²): a 12 × 15-foot room should measure 19.21 feet corner to corner, and the two diagonals should match. Use Check with three measurements to see how far a corner is off — 6, 8 and 10.2 feet make an angle of 92.4°, not 90°. For lengths in feet and inches, add and subtract them first with the feet and inches calculator.
Ladders, ramps and roofs
- Ladders: OSHA’s rule puts the base about one quarter of the working length out from the wall. A 12-foot ladder with its base 3 feet out reaches √(144 − 9) = 11.62 feet up.
- Ramps: a ramp that rises 30 inches over a 360-inch run is a 1:12 slope, and its surface is √(30² + 360²) = 361.2 inches, about 30.1 feet long.
- Roof rafters: a 6-in-12 roof rises 6 inches for every 12 of run, so each foot of run needs √(6² + 12²) = 13.42 inches of rafter.
For the area of the floor or the roof those triangles sit on, see the square footage calculator.
Why it works
Draw squares on each side of a right triangle. The two smaller squares together have exactly the area of the large one on the hypotenuse — the statement a² + b² = c². The theorem is named after Pythagoras, but Babylonian clay tablets list triples centuries earlier, and there are hundreds of proofs. It also gives the distance between two points on a map or a graph: √((x₂ − x₁)² + (y₂ − y₁)²). For squares and roots on their own, use the scientific calculator.
Frequently asked questions
What is the Pythagorean theorem?
How do I find the hypotenuse?
How do I find a missing leg?
What is the 3-4-5 rule in construction?
Why is the answer sometimes a square root like √2?
Can I use the theorem on a triangle without a right angle?
Related calculators
- Scientific CalculatorTrig, logs, powers and roots in degrees or radians, with history and keyboard input.
- Square Footage CalculatorTotal square feet for several rooms of any shape, with cut-outs, waste and boxes.
- Feet and Inches CalculatorAdd, subtract, multiply and divide feet and inches with fractions, rounded to the nearest 1/16 inch.
- Circle CalculatorArea, circumference, diameter and radius of a circle from any one of them, with square feet and acres for round yards and patios.
- Area CalculatorArea of a rectangle, triangle, circle, semicircle, ellipse, trapezoid and six more shapes, in square feet, square meters and acres.
- Distance CalculatorDistance between two places by latitude and longitude, in miles and kilometers, or between two points in 2D or 3D.