HomeCalculatorsMathPythagorean Theorem Calculator

Pythagorean Theorem Calculator

Math

Solve 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.

Find Side
Leg a
0.1500
Leg b
0.1500

Hypotenuse (c)

0

Area

6

Perimeter

12

Right Triangle

abc
Leg a3
Leg b4
Hypotenuse c5

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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.
Frequently Asked Questions
What is the Pythagorean theorem?
The Pythagorean theorem states that in any right-angled triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides: c² = a² + b². It is attributed to the ancient Greek mathematician Pythagoras and is one of the most fundamental results in Euclidean geometry, with applications spanning construction, navigation, and physics.
How does the Pythagorean Theorem Calculator work?
Select which side you want to find — the hypotenuse (c) or one of the legs (a or b) — then enter the two known sides. The calculator applies the Pythagorean theorem to compute the missing side, and also displays the triangle's area (½ × a × b) and perimeter (a + b + c). Step-by-step working is shown below the result so you can follow the calculation.
What is the hypotenuse of a right triangle?
The hypotenuse is the longest side of a right-angled triangle and always lies opposite the right angle (90°). Its length is always greater than either of the two legs. In the classic 3-4-5 right triangle, the hypotenuse is 5 units. Given legs a and b, the hypotenuse is c = √(a² + b²).
How do I find leg a or leg b using the Pythagorean theorem?
Rearrange the formula to isolate the unknown leg: a = √(c² − b²) or b = √(c² − a²). The hypotenuse must be longer than the other known side for a valid triangle; if c ≤ b, the difference c² − b² is non-positive and no real triangle exists. Our calculator flags this automatically and shows zero for invalid inputs.
What are the most common Pythagorean triples used in Indian school mathematics?
Pythagorean triples are sets of three positive integers (a, b, c) satisfying a² + b² = c². The most commonly used triples in Indian school mathematics are (3, 4, 5), (5, 12, 13), (8, 15, 17), (7, 24, 25), and (9, 40, 41). Multiples of these also work — for example, (6, 8, 10) is a multiple of (3, 4, 5). These triples appear frequently in CBSE Class 10 and competitive exam problems.
How to use the Pythagorean theorem in construction and engineering?
The Pythagorean theorem is used to verify that corners are square (right-angled) in construction — the '3-4-5 method' involves measuring 3 units along one wall, 4 units along the adjacent wall, and checking that the diagonal is exactly 5 units. It also calculates rafter lengths for roofs, diagonal bracing lengths for structural frames, and cable lengths for towers. In India, civil engineers and masons routinely apply this method on building sites.
What is the difference between the Pythagorean theorem and the law of cosines?
The Pythagorean theorem applies only to right-angled triangles and gives c² = a² + b². The law of cosines generalises this to any triangle: c² = a² + b² − 2ab cos(C), where C is the angle between sides a and b. When C = 90°, cos(90°) = 0 and the formula reduces to the Pythagorean theorem. Use the [Triangle Calculator](/triangle-calculator/) for non-right-angled triangles where the law of cosines is needed.
How to find the area of a right triangle using the Pythagorean theorem?
The area of a right triangle is ½ × leg_a × leg_b, since the two legs are perpendicular and serve as base and height. Once you know both legs (using the theorem if one was unknown), the area calculation is straightforward. For example, a right triangle with legs 3 m and 4 m has area = ½ × 3 × 4 = 6 sq m. Our calculator computes and displays this area automatically.
Is the Pythagorean theorem part of the CBSE Class 10 syllabus?
Yes — the Pythagorean theorem is covered in the CBSE Class 10 Mathematics syllabus under the chapter 'Triangles' (Chapter 6), specifically as Theorem 6.8 (Pythagoras' theorem) and its converse (Theorem 6.9). It is also a prerequisite concept for trigonometry and coordinate geometry chapters. Students should be able to prove the theorem as well as apply it to find missing sides.
Can the Pythagorean theorem be used to check if a triangle is right-angled?
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 at the vertex opposite side c. This is used in surveying and construction to verify squareness. If a² + b² > c², the angle opposite c is acute; if a² + b² < c², the angle is obtuse.
How to calculate the diagonal of a rectangle using the Pythagorean theorem?
The diagonal of a rectangle with length l and width w is d = √(l² + w²), since the diagonal and two sides form a right triangle. For a room 8 m long and 6 m wide, the diagonal = √(64 + 36) = √100 = 10 m. This calculation is useful in carpentry (cutting diagonal braces), interior design (checking furniture fits through diagonal space), and construction. See the [Area Calculator](/area-calculator/) to also compute the floor area of the same room.