Pythagorean theorem and triangle calculator. Compute sides, angles, area, and perimeter of any triangle.
Four tabs: Pythagorean theorem (find the missing side), triangle type (equilateral, isosceles, right, acute, obtuse), area and perimeter (Heron’s formula), and SVG visualization.
Calculator information
📋 How to use this calculator
- Pick the calculation type: Pythagorean theorem (find a side of a right triangle), triangle classification, or area/perimeter.
- For the Pythagorean theorem, enter two known sides in the same units (in, cm, ft, m) and specify which one is the hypotenuse.
- For triangle classification, enter all three sides (a, b, c) to determine whether it is equilateral, isosceles, scalene, right, acute, or obtuse.
- For area and perimeter, enter the three sides; the calculator uses Heron's formula for scalene triangles, or base x height / 2 if the height is known.
- View the results plus an SVG triangle visualization labeled with side lengths and angles.
- Tip: Confirm the three sides satisfy the triangle inequality (a+b > c, b+c > a, a+c > b); otherwise no triangle can be formed.
🧮 Pythagorean Theorem and Heron's Formula
Pythagoras: c^2 = a^2 + b^2 (for right triangles) | Hypotenuse: c = sqrt(a^2 + b^2) | Leg: a = sqrt(c^2 - b^2) | Heron's area: A = sqrt(s(s-a)(s-b)(s-c)) with s = (a+b+c)/2 | Perimeter = a + b + c
- a, b = legs of the right triangle (positive lengths)
- c = hypotenuse, the longest side
- s = semi-perimeter (half the perimeter)
- A = area of the triangle (square units)
- Pythagoras only applies to right triangles (one angle = 90 degrees)
Triangle inequality: the sum of any two sides must exceed the third. If a^2 + b^2 = c^2 the triangle is right; if a^2 + b^2 > c^2 it is acute; if a^2 + b^2 < c^2 it is obtuse.
💡 Worked example: Find the hypotenuse and area of a 3-4-5 right triangle
Given:- Leg a = 3 cm
- Leg b = 4 cm
- Find: hypotenuse c, type, area, and perimeter
Steps:- Compute c via Pythagoras: c^2 = 3^2 + 4^2 = 9 + 16 = 25
- Hypotenuse: c = sqrt(25) = 5 cm
- Check type: 3^2 + 4^2 = 25 = 5^2, so the triangle is right (the classic Pythagorean triple)
- Perimeter: 3 + 4 + 5 = 12 cm
- Area via base x height / 2: (3 x 4) / 2 = 6 cm^2
- Verify with Heron: s = 12/2 = 6, A = sqrt(6 x 3 x 2 x 1) = sqrt(36) = 6 cm^2
Result: Hypotenuse 5 cm, right triangle, perimeter 12 cm, area 6 cm^2.
❓ Frequently asked questions
What is the Pythagorean theorem?
The Pythagorean theorem states that in a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: c^2 = a^2 + b^2. It is credited to the ancient Greek mathematician Pythagoras (570-495 BCE), though evidence of its use predates him in Babylonian and Indian mathematics. The theorem is foundational to Euclidean geometry and trigonometry.
What are some examples of Pythagorean triples?
A Pythagorean triple is a set of three positive integers satisfying a^2 + b^2 = c^2. Classic examples: (3, 4, 5), (5, 12, 13), (8, 15, 17), (7, 24, 25), and (20, 21, 29). Multiples are also valid, e.g. (6, 8, 10), (9, 12, 15), or (30, 40, 50). Pythagorean triples are useful in construction for laying out precise right angles without a protractor.
How do you classify a triangle from its side lengths?
For a triangle with sides a, b, c (c longest): if a^2 + b^2 = c^2 it is a right triangle; if a^2 + b^2 > c^2 it is acute (all angles < 90 degrees); if a^2 + b^2 < c^2 it is obtuse (one angle > 90 degrees). By side lengths: equilateral (3 equal sides), isosceles (2 equal sides), scalene (all sides different).
What is Heron's formula and when is it used?
Heron's formula computes the area of a triangle from only the three side lengths, without needing a height. It states: A = sqrt(s(s-a)(s-b)(s-c)) where s = (a+b+c)/2 is the semi-perimeter. Named after Heron of Alexandria (10-70 CE), it is especially useful in land surveying, navigation, and any scalene triangle whose height is not easily measured.
How is the Pythagorean theorem applied in everyday life?
It is used in construction to confirm 90-degree corners, in GPS navigation for shortest-distance calculations, in photography to find frame diagonals, in sports to measure field diagonals, and in engineering for structural stress. Carpenters often use the 3-4-5 method: measure 3 ft on one side, 4 ft on a perpendicular side; if the diagonal is exactly 5 ft, the corner is square.
📚 Sources & references
Last updated: May 11, 2026