Pythagorean Theorem Calculator: Find Any Side of a Right Triangle
This Pythagoras equation solver finds hypotenuse c, leg a, leg b, both acute angles, area, perimeter, and altitude. Includes exact radicals and builder squaring checks.
Solve for Any Missing Side
- Formula: c = √(a² + b²)
- Substitute: c = √(3² + 4²) = √(9 + 16) = √25
- Exact radical: c = 5
- Decimal value: c ≈ 5.0000
- Angle α = arctan(a / b) = arctan(3 / 4) ≈ 36.87°
- Angle β = 90° − α = 90° − 36.87° ≈ 53.13°
- Area = (a × b) ÷ 2 = (3 × 4) ÷ 2 = 6
- Perimeter = a + b + c = 3 + 4 + 5.0000 = 12.0000
- Altitude (h) = (a × b) ÷ c = (3 × 4) ÷ 5.0000 ≈ 2.4000
- Any missing side & angles
- 3-4-5 square check
- Feet-inches to 1/16"
- Steps & diagram
100% free · No sign-up · Runs in your browser, nothing is uploaded
How to Use the Pythagoras Equation Solver
This right triangle and pythagorean equation solver handles four specialized calculation workflows:
- Find a Side (Default): Select which side is unknown (hypotenuse c, leg a, or leg b) and enter the two known lengths. The solver determines the missing side, exact square root radical, decimal approximation, both interior acute angles (α and β), total area, perimeter, and altitude.
- Side + Angle Mode: Enter any one side length and one acute angle (0° to 90°). Using trigonometry, the solver calculates the remaining two sides and opposite angle.
- Is It Square? (Builder Mode): Enter the length and width of any rectangular layout (concrete slab, foundation, framing wall, or deck). Get the exact cross-corner diagonal in decimal feet and fractional inches (rounded to 1/16″), plus a scaled 3-4-5 mark suggestion.
- Check a Triangle: Input any three side lengths to classify whether the triangle is right (90°), acute (< 90°), obtuse (> 90°), or geometrically invalid.
The Pythagoras Equation (a² + b² = c²)
Formulated by the ancient Greek mathematician Pythagoras of Samos (c. 570–495 BC), the theorem establishes a geometric equivalence: the area of a square constructed upon the hypotenuse is identically equal to the sum of the areas of squares constructed upon the other two legs.
Where:
- a = length of first leg (perpendicular side)
- b = length of second leg (base side)
- c = length of hypotenuse (the longest side opposite the 90° right angle)
How to Find the Hypotenuse
To solve for the hypotenuse when both legs are known, take the square root of the sum of squared legs:
Worked Example with Exact Radicals: Suppose a right triangle has legs a = 3 and b = 6.
- Square leg a: 3² = 9
- Square leg b: 6² = 36
- Sum the squares: a² + b² = 9 + 36 = 45
- Hypotenuse: c = √45
- Simplify radical: 45 = 9 × 5 = 3² × 5 → c = 3√5 ≈ 6.7082
How to Find a Missing Leg
When the hypotenuse c and one leg are known, subtract the square of the known leg from c²:
Example: If a ladder measuring 13 feet (c = 13) reaches 12 feet up a vertical wall (b = 12), how far must its base sit from the wall?
Angles, Area, Perimeter and Altitude of a Right Triangle
A complete right triangle solution involves more than side lengths:
- Interior Angles: α = arctan(a ÷ b) and β = 90° − α. For a 3-4-5 triangle: α = arctan(3 ÷ 4) = 36.87°, β = 53.13°, and γ = 90°.
- Area: Because legs a and b are perpendicular, the area is simply (a × b) ÷ 2. For legs 3 and 4: Area = (3 × 4) ÷ 2 = 6 square units.
- Perimeter: P = a + b + c. For legs 3 and 4: 3 + 4 + 5 = 12 units.
- Altitude (h): The height perpendicular to the hypotenuse equals (a × b) ÷ c. For legs 3 and 4: (3 × 4) ÷ 5 = 2.4 units.
Pythagorean Triples (Integer Solutions)
Pythagorean triples are sets of three positive integers (a, b, c) that solve a² + b² = c² with zero remainder. Useful primitive triples include:
- (3, 4, 5): 9 + 16 = 25
- (5, 12, 13): 25 + 144 = 169
- (8, 15, 17): 64 + 225 = 289
- (7, 24, 25): 49 + 576 = 625
- (20, 21, 29): 400 + 441 = 841
Any scalar multiple of a triple is also a valid right triangle. Multiplying (3, 4, 5) by 2 yields (6, 8, 10); multiplying by 4 yields (12, 16, 20).
Squaring a Corner with the 3-4-5 Rule (Builder Layout)
In carpentry, foundation masonry, and hardscaping, ensuring formwork corners are perfectly square (90°) prevents structural misalignment.
The 3-4-5 Method:
- From the target corner, pull a tape measure along one chalk line and mark a point at 3 feet (or 3 units).
- Pull a tape measure along the perpendicular chalk line and mark a point at 4 feet (or 4 units).
- Measure the diagonal span directly between the two marks. If the span equals exactly 5 feet, the corner is 90° square. If the span is longer than 5 feet, the corner angle is greater than 90° (obtuse); if shorter, it is acute.
Checking Entire Rectangles: For a rectangular pad measuring L × W, both diagonal measurements from opposing corners must be equal:
For example, for a 10 × 14 ft deck, the diagonal must measure √(10² + 14²) = √296 ≈ 17.2047 ft, which corresponds to 17′ 2-7/16″ on a standard builder's tape measure.
Is It a Right Triangle? (Converse of the Pythagorean Theorem)
Given any three positive numbers a, b, and c where c is the longest side:
- If a² + b² = c², the angle opposite c is exactly 90° (Right Triangle).
- If a² + b² > c², all interior angles are less than 90° (Acute Triangle).
- If a² + b² < c², the angle opposite c is strictly greater than 90° (Obtuse Triangle).
For laying out foundations or calculating concrete material, pair this with our Concrete Calculator and Square Footage Calculator.
Frequently Asked Questions
The Pythagorean theorem states that in any right triangle (a triangle with one 90° angle), the square of the length of the hypotenuse (c, the side opposite the right angle) is strictly equal to the sum of the squares of the lengths of the two shorter sides (legs a and b): a² + b² = c².
To solve for the hypotenuse c given legs a and b, square both legs, add the results together, and take the positive square root: c = √(a² + b²). For example, with legs of 3 and 4: 3² + 4² = 9 + 16 = 25, and √25 = 5.
To solve for leg a given hypotenuse c and leg b, square the hypotenuse, subtract the square of leg b, and take the square root: a = √(c² − b²). Similarly, b = √(c² − a²). The hypotenuse must always be longer than either leg.
Identify the longest side as c and test whether a² + b² = c² (the Pythagorean converse). If a² + b² = c², it is a right triangle (90°). If a² + b² > c², it is an acute triangle (all angles < 90°). If a² + b² < c², it is an obtuse triangle (one angle > 90°).
A Pythagorean triple consists of three positive integers (a, b, c) that satisfy a² + b² = c². The most famous primitive triples are (3, 4, 5), (5, 12, 13), (8, 15, 17), and (7, 24, 25). Any whole-number multiple (such as 6-8-10 or 9-12-15) also forms a valid right triangle.
From the corner where two lines meet, measure 3 feet along one line and make a mark. Measure 4 feet along the perpendicular line and make a mark. Measure the direct diagonal distance between the two marks. If the diagonal measures exactly 5 feet, the corner forms an exact 90° right angle. For larger layouts, use scaled multiples such as 6-8-10 or 9-12-15.
Because a rectangle splits diagonally into two identical right triangles with legs L and W, the diagonal length equals √(L² + W²). For example, a 12 × 16 ft concrete pad has a diagonal of √(144 + 256) = √400 = 20 ft. A 10 × 14 ft deck has a diagonal of √(100 + 196) = √296 ≈ 17.2047 ft (17′ 2-7/16″).
No. The pure formula a² + b² = c² applies exclusively to right triangles (where the included angle is 90° and cos(90°) = 0). For non-right triangles, use the generalized Law of Cosines: c² = a² + b² − 2ab·cos(C).
Using basic trigonometry: angle α (opposite leg a) equals arctan(a ÷ b) in degrees. Because the three angles of any planar triangle sum to 180° and one angle is 90°, the remaining acute angle β is simply 90° − α.
In a square of side length s, the two legs are equal (a = b = s). Applying the theorem yields c = √(s² + s²) = √(2s²) = s√2. Therefore, multiplying the side length of any square by √2 (≈ 1.41421) gives its diagonal.
To simplify √n, factor out the largest perfect square factor k² such that n = k² × m. Then √n = √(k² × m) = k√m. For example, with legs 3 and 6: c² = 3² + 6² = 9 + 36 = 45. Because 45 = 9 × 5 and 9 is a square, c = √45 = 3√5.
How This Calculator Works: Formula, Defaults & Sources
Formula
- Hypotenuse: c = √(a² + b²); missing legs: a = √(c² − b²), b = √(c² − a²)
- Angles: α = arctan(a ÷ b) in degrees; β = 90° − α; right angle = 90°
- Area = (a × b) ÷ 2; Perimeter = a + b + c; Altitude to hypotenuse: h = (a × b) ÷ c
- Radical simplification: n = k² × m → k√m where k² is the largest square factor
- Triangle classification: a² + b² = c² (Right); a² + b² > c² (Acute); a² + b² < c² (Obtuse)
- Builder squareness: Diagonal = √(L² + W²); 3-4-5 rule: 3k : 4k : 5k layout checks
Default values (you can change them)
- Right triangle baseline: legs a = 3, b = 4: hypotenuse c = 5, α = 36.87°, β = 53.13°, area = 6, altitude = 2.4
- Radical example: legs 3 and 6: c = √45 = 3√5 ≈ 6.7082
- Squaring layout example: 12 × 16 ft pad: diagonal 20 ft (3-4-5 × 4); 10 × 14 ft deck: diagonal 17.2047 ft (17′ 2-7/16″)
Sources
- Euclid’s Elements, Book I, Proposition 47 — Geometric proof of the Pythagorean theorem
Results are planning estimates, not engineering advice. Confirm quantities with your supplier and follow your plans and local building code. Last updated: November 25, 2026. Spotted a wrong number? Email us or use the contact page.