Pythagorean Theorem Calculator
MathSolve the Pythagorean theorem to find any missing side of a right triangle. Enter two known sides to calculate the hypotenuse or a leg instantly with step-by-step working.
Hypotenuse (c)
Area
6
Perimeter
12
Right Triangle
c² = a² + b² → 3² + 4² = 5²
What is a Pythagoras?
The Pythagorean Theorem Calculator finds any missing side of a right-angled triangle when two sides are known, and additionally computes the triangle's area and perimeter. Select whether you want to find the hypotenuse (c) or one of the legs (a or b), enter the two known dimensions, and the result appears instantly with full step-by-step working.
The Pythagorean theorem — stated as c² = a² + b², where c is the hypotenuse — is one of the oldest and most verified results in mathematics, with more than 370 known proofs. It applies exclusively to right-angled triangles, where one interior angle is exactly 90°. The two shorter sides (legs a and b) are perpendicular to each other, and the hypotenuse is always opposite the right angle and always the longest side.
In Indian education, the theorem appears as early as Class 7 and forms a cornerstone of the Class 10 CBSE 'Triangles' chapter, where students must both apply and prove it. Beyond academics, the theorem is embedded in everyday construction: checking that walls meet at right angles using the 3-4-5 method, calculating the length of a staircase riser, finding the diagonal of a rectangular plot, or determining the reach of a ladder leaned against a wall.
For triangles that are not right-angled, the Triangle Calculator uses the law of cosines to solve all sides and angles from any three known values. For computing the area of a right triangle (which equals ½ × leg_a × leg_b), the Area Calculator provides additional shape options including rectangles, circles, and trapezoids.
How to use this Pythagoras calculator
Select Find Side — choose which side you want to calculate: Hypotenuse (c) if you know both legs, Leg a if you know leg b and the hypotenuse, or Leg b if you know leg a and the hypotenuse. The input fields update immediately to show the two known sides.
Enter the two known values — type the length of each known side into the input boxes or use the sliders. Use consistent units (all in metres, or all in centimetres) — the calculator does not convert units.
Read the Missing Side result — the primary result card shows the computed side. The step-by-step breakdown below shows the squared values, their sum or difference, and the final square root.
Check Area and Perimeter — the secondary result card shows the triangle area (½ × a × b) and perimeter (a + b + c). Use area for material coverage estimation and perimeter for boundary material estimation.
Verify using the visual — the right triangle diagram labels a, b, and c, with the right angle marker at the corner between the two legs. Confirm visually that the hypotenuse is the diagonal side opposite the right angle.
Formula & Methodology
Finding the hypotenuse:c = √(a² + b²) Finding leg a:a = √(c² − b²) Finding leg b:b = √(c² − a²) Area of right triangle:Area = ½ × a × b Perimeter:P = a + b + c Variable definitions: - c — hypotenuse (side opposite the right angle; always the longest side) - a — leg 1 (one of the two shorter sides forming the right angle) - b — leg 2 (the other shorter side forming the right angle) Worked example — calculating rafter length for a roof: A construction site in Pune has a roof span (width) of 8 m and a rise (height from ceiling to ridge) of 3 m. The rafter runs from the eave (bottom edge of the roof) to the ridge (top), forming the hypotenuse of a right triangle where one leg is half the span and the other is the rise. Half-span = 8 / 2 = 4 mRise = 3 m Rafter length c = √(4² + 3²) = √(16 + 9) = √25 = 5 m This is the classic 3-4-5 Pythagorean triple scaled by 1. Each rafter needs 5 m of material plus an overhang allowance. Perimeter of the right triangle = 4 + 3 + 5 = 12 mArea = ½ × 4 × 3 = 6 sq m (cross-sectional area of the triangular roof section) Assumption: The theorem applies only to flat (Euclidean) geometry and only when the angle between legs a and b is exactly 90°. On a sloped or uneven surface, the actual path length may differ from the geometric calculation.