Math & Education

Triangle Calculator

Pythagorean theorem, Law of Cosines, Heron's formula. Find missing sides, angles, area, and triangle type.

For a right triangle, c (hypotenuse) = √(a² + b²)

Triangle

Scalene · Right
Side a
3.000
Side b
4.000
Side c
5.000
Angle A
36.87°
Angle B
53.13°
Angle C
90.00°
Area
Square units
6.000
Perimeter
12.000

Triangle types: equilateral, isosceles, scalene

  • Equilateral: all three sides equal. All three angles equal 60°.
  • Isosceles: exactly two sides equal. The two angles opposite those sides are also equal.
  • Scalene: all three sides different. All three angles different.

By angle: acute, right, obtuse

  • Acute: all three angles less than 90°.
  • Right: one angle equals exactly 90°. The side opposite the right angle is the “hypotenuse.”
  • Obtuse: one angle greater than 90° (and less than 180°).

A triangle's three angles always sum to 180°. The two classifications combine: a triangle is “equilateral acute” or “isosceles right” etc.

Pythagorean theorem

The most-known geometry result: in any right triangle, c² = a² + b², where c is the hypotenuse. Used since at least 1800 BCE in Babylonian texts; named after the 6th-century BCE Greek philosopher Pythagoras.

The 3-4-5 triangle is the smallest integer right triangle. Other Pythagorean triples: 5-12-13, 8-15-17, 7-24-25, 20-21-29. There are infinitely many. Useful in carpentry — to make sure a corner is square, measure 3 ft along one wall, 4 ft along the perpendicular wall; the diagonal between them should be exactly 5 ft.

Law of Cosines

Generalizes Pythagorean to any triangle: c² = a² + b² − 2ab·cos(C). When C = 90°, cos(C) = 0, and you get back to Pythagorean. For obtuse angles (C > 90°), cos(C) is negative, making c² larger. For acute angles (C < 90°), cos(C) is positive, making c² smaller.

Used in SAS mode (you know two sides and the included angle, want the third side) and SSS mode (rearranged to find an angle from three sides).

Law of Sines

a/sin(A) = b/sin(B) = c/sin(C) = 2R, where R is the circumradius (radius of the circle through all three vertices). Useful when you know an angle-side opposite pair plus another piece (ASA, AAS, SSA).

SSA is the “ambiguous case” — sometimes there are two valid triangles for the same inputs. The calculator focuses on Pythagorean / SSS / SAS, which all have unique solutions.

Heron's formula

Area from three sides only: A = √(s(s-a)(s-b)(s-c)) where s = (a+b+c)/2. Heron of Alexandria, ~60 CE. Beautiful because it doesn't need any angle or height — just the sides.

For 3-4-5: s = 6, area = √(6 × 3 × 2 × 1) = √36 = 6 (verify: half × base × height = 0.5 × 3 × 4 = 6 ✓).

When triangle calculations are useful

  • Carpentry and construction: roof rafters, stair stringers, square corners (3-4-5 method), gable framing.
  • Land surveying: triangulation to find distances and elevations.
  • Navigation: triangulation from known reference points.
  • Computer graphics: every 3D model is built from triangles.
  • Engineering: trusses, bracing, anything that resists deformation.
  • Astronomy: parallax measurement, stellar distance.

For other geometry tools: Square Footage Calculator for areas of common shapes, Unit Converter for measurement conversions.

Frequently Asked Questions

How do I find the third side of a right triangle?
Pythagorean theorem: c² = a² + b², where c is the hypotenuse (the longest side, opposite the right angle). So c = √(a² + b²). For a 3-4-5 triangle: c = √(9 + 16) = √25 = 5. Only works for right triangles.
How do I find an angle if I know all three sides?
Law of Cosines, rearranged: cos(A) = (b² + c² − a²) / (2bc). Compute, then take the arccos to get the angle in radians (multiply by 180/π for degrees). The calculator does this automatically in SSS mode.
What's the triangle inequality?
For three positive numbers to form a triangle: each must be less than the sum of the other two. So 3-4-5 works (3+4>5, 4+5>3, 3+5>4). 1-2-10 doesn't work (1+2 < 10). The calculator checks this and shows "invalid" when it fails.
When does Pythagorean theorem apply?
Only to right triangles (one 90° angle). For other triangles, use Law of Cosines: c² = a² + b² − 2ab·cos(C). When C = 90°, cos(C) = 0, and the formula reduces to Pythagorean.
How do I find the area of any triangle?
Several formulas: (1) (1/2) × base × height when you know perpendicular height; (2) Heron's formula when you know all three sides: √(s(s-a)(s-b)(s-c)) where s is the semi-perimeter; (3) (1/2) × a × b × sin(C) when you have two sides and the included angle.

Related Calculators