CalcMountain

Triangle Calculator

Enter the three sides of any triangle to find its area (Heron's formula), perimeter, and all three interior angles (law of cosines). Works for any valid triangle.

A triangle is the simplest polygon — three sides, three angles, three vertices. Despite this simplicity, triangles underpin nearly all of geometry, trigonometry, and computer graphics. Every polygon can be decomposed into triangles; every 3D surface (in computer graphics) is approximated by a triangle mesh; every navigational triangulation rests on triangle geometry.

Triangles are classified by: **Angles:** - **Acute**: all angles < 90°. - **Right**: one angle = 90°. - **Obtuse**: one angle > 90°.

**Sides:** - **Equilateral**: all sides equal (and all angles 60°). - **Isosceles**: two sides equal. - **Scalene**: all sides different.

Given any three sides (SSS case), this calculator finds: - **Area**: using Heron's formula A = √(s(s-a)(s-b)(s-c)), where s = (a+b+c)/2. - **Perimeter**: P = a + b + c. - **All three angles**: using Law of Cosines.

A valid triangle requires the **triangle inequality**: each side must be less than the sum of the other two. If sides are 3, 4, 9: not valid (3 + 4 = 7 < 9).

Common applications: land surveying (triangulation), engineering (truss design, structural analysis), navigation, computer graphics (triangle meshes), astronomy (parallax measurements), construction (roof rafters, geometric design), and any geometry involving three-sided shapes.

Inputs

Results

Area

6 sq units

Perimeter

12

Semi-Perimeter

6

Angle A

36.8699°

Angle B

53.1301°

Angle C

90°

Last updated:

Formula

**Triangle from three sides (SSS):** **Heron's formula (area):** Let s = (a + b + c) / 2 (semi-perimeter). A = √(s × (s-a) × (s-b) × (s-c)) **Perimeter:** P = a + b + c **Law of Cosines (find angles):** cos(A) = (b² + c² - a²) / (2bc) cos(B) = (a² + c² - b²) / (2ac) cos(C) = (a² + b² - c²) / (2ab) Then angle = arccos(value). **Worked example: 3-4-5 right triangle** s = (3 + 4 + 5) / 2 = 6. A = √(6 × 3 × 2 × 1) = √36 = 6. Perimeter: 3 + 4 + 5 = 12. Angles: cos(A) = (16 + 25 - 9)/(2 × 4 × 5) = 32/40 = 0.8. A = arccos(0.8) ≈ 36.87°. cos(B) = (9 + 25 - 16)/(2 × 3 × 5) = 18/30 = 0.6. B = arccos(0.6) ≈ 53.13°. cos(C) = (9 + 16 - 25)/(2 × 3 × 4) = 0/24 = 0. C = arccos(0) = 90°. Verify: 36.87 + 53.13 + 90 = 180° ✓ **Worked example: equilateral triangle (s = 5)** A = √(7.5 × 2.5 × 2.5 × 2.5) = √(117.19) ≈ 10.83. Or formula: A = (√3/4) × s² = (√3/4) × 25 ≈ 10.83. ✓ All angles 60°. **Triangle inequality:** For valid triangle: each side < sum of other two. For a = 3, b = 4, c = 5: 3 < 4+5 ✓, 4 < 3+5 ✓, 5 < 3+4 ✓. Valid. For a = 3, b = 4, c = 9: 9 > 3+4 = 7. Invalid. No such triangle. **Triangle classifications:** By angles: - Acute: a² + b² > c² (and similar for others). - Right: a² + b² = c² (Pythagorean theorem). - Obtuse: a² + b² < c² (where c is longest). By sides: - Equilateral: a = b = c. All angles 60°. - Isosceles: at least two sides equal. Base angles equal. - Scalene: all sides different. **Common triangles:** | Triangle | Sides | Area | Angles | |---|---|---|---| | 3-4-5 right | 3, 4, 5 | 6 | 37°, 53°, 90° | | 5-12-13 right | 5, 12, 13 | 30 | 23°, 67°, 90° | | Equilateral (1) | 1, 1, 1 | √3/4 ≈ 0.43 | 60, 60, 60° | | Equilateral (10) | 10, 10, 10 | 43.30 | 60, 60, 60° | | Isosceles 5-5-6 | 5, 5, 6 | 12 | 73.7°, 73.7°, 53.13° | | Random scalene | 7, 8, 9 | 26.83 | 48°, 58°, 73° | **Pythagorean triples:** Integer right triangle sides: 3-4-5, 5-12-13, 7-24-25, 8-15-17, 9-40-41, 20-21-29. Useful for clean-number geometry problems. **Centroid:** The centroid (geometric center) is the intersection of three medians (lines from vertex to opposite side midpoint). Coordinates: ((x₁+x₂+x₃)/3, (y₁+y₂+y₃)/3). Centroid divides each median in 2:1 ratio. **Incircle (inscribed circle):** Largest circle inscribed in triangle. Radius: r = A / s (area / semi-perimeter). For 3-4-5: r = 6/6 = 1. Centered at incenter. **Circumcircle (circumscribed circle):** Smallest circle through all three vertices. Radius: R = (abc) / (4A). For 3-4-5: R = 60/24 = 2.5. Centered at circumcenter. **Triangle areas by other formulas:** - **Base and height**: A = (1/2) × base × height. - **Two sides and included angle**: A = (1/2) × a × b × sin(C). - **Coordinates** (Shoelace): A = (1/2) × |x₁(y₂-y₃) + x₂(y₃-y₁) + x₃(y₁-y₂)|. - **Vectors**: A = (1/2) × |v₁ × v₂| (cross product magnitude). **Triangle angle sum:** A + B + C = 180° (always). Find third angle from other two. **Special triangles:** **30-60-90 triangle:** Sides in ratio 1 : √3 : 2. For shortest side x: other sides x√3 and 2x. **45-45-90 (isosceles right):** Sides in ratio 1 : 1 : √2. Two legs equal, hypotenuse √2 times leg. **Triangle inequality applications:** - **Land plots**: ensure triangle is valid before computing. - **Truss design**: members must satisfy inequality. - **Navigation**: triangulating positions. - **Game design**: collision detection with triangles. **Common applications:** - **Surveying**: triangulating land. - **Navigation**: bearing-based position fixing. - **Engineering**: truss analysis. - **Architecture**: roof rafters, structural elements. - **Computer graphics**: 3D meshes are triangles. - **Astronomy**: stellar parallax. - **Photography**: triangulating focus. - **Robotics**: forward kinematics. **Numerical example: triangulation** Surveyor measures from two known points A and B (distance d = 200 m apart) to point C. Distances: AC = 150 m, BC = 180 m. To find triangle area: s = (200 + 150 + 180) / 2 = 265. A = √(265 × 65 × 115 × 85) ≈ √(168,251,875) ≈ 12,971 m². Hmm, but actually: Wait, this is a much smaller triangle. Let me redo: Actually for points where the distance from observation points are 150 and 180 with baseline 200, the triangle has these specific dimensions. A = √(265 × 65 × 115 × 85) ≈ √(168,251,875) ≈ 12,971 m² (~1.3 hectares). **Software:** - **CAD**: built-in triangle tools. - **Excel**: Heron's formula in cell. - **GIS**: triangle/polygon calculations. - **Programming**: simple math. - **Trigonometry calculators**: usually have triangle solvers. **Pitfalls:** - **Triangle inequality**: verify validity. - **Sides as angles**: don't confuse. - **Right vs obtuse**: check Pythagorean inequality. - **For very thin triangles**: numerical precision issues. - **Heron's formula precision**: subtraction near-equal can lose precision for thin triangles. **Educational notes:** Triangle properties form: - 5th-6th grade: classification. - 7th-9th grade: area, perimeter, Pythagorean. - High school: law of sines/cosines, trig. - College: vector treatment, computer graphics. Fundamental geometric shape; foundation for trigonometry. **Programming:** import math def heron_area(a, b, c): s = (a + b + c) / 2 return math.sqrt(s * (s-a) * (s-b) * (s-c)) def angle_from_sides(a, b, c): # angle opposite side a return math.degrees(math.acos((b**2 + c**2 - a**2) / (2*b*c))) Trivial in any language. **Pitfalls (continued):** - **For thin triangles**: small angles produce numerical issues. - **For very large triangles**: floating-point precision. - **For coordinate-based**: Shoelace formula works for any polygon. - **For 3D triangles**: use vector cross product method.

How to use this calculator

  1. Enter three side lengths.
  2. Calculator returns area (Heron's formula), perimeter, and three angles.
  3. Verify triangle inequality: each side < sum of others.
  4. For right triangle check: a² + b² = c² where c is longest.
  5. Sum of angles always 180°.
  6. For specific triangles: 3-4-5, 5-12-13 are right triangles.

Worked examples

Classic 3-4-5 right triangle

**Scenario:** Triangle with sides 3, 4, 5. Area and angles? **Calculation:** s = 6. A = √(6×3×2×1) = √36 = 6. Angles: arccos((16+25-9)/40) = 37°; arccos((9+25-16)/30) = 53°; arccos((9+16-25)/24) = 90°. **Result:** Area = 6, angles ~37°, 53°, 90° (right triangle). The 3-4-5 Pythagorean triple is the most famous integer right triangle. Used since ancient times for "squaring" corners in construction.

Equilateral triangle

**Scenario:** Triangle with sides 10, 10, 10. All sides equal. **Calculation:** s = 15. A = √(15×5×5×5) = √(1875) ≈ 43.30. Alternative formula: A = (√3/4) × 100 ≈ 43.30. All angles 60° (equilateral). **Result:** Area ≈ 43.3 sq units. Perimeter = 30. All angles 60°. Equilateral triangles have unique properties — maximum symmetry, simplest tessellation, foundation of triangular grids.

Land plot triangle

**Scenario:** Triangular lot: 50 m, 75 m, 90 m. **Calculation:** s = 107.5. A = √(107.5 × 57.5 × 32.5 × 17.5) ≈ √(3,510,000) ≈ 1873 m². **Result:** ~1873 m² area (~0.19 hectares, ~0.46 acre). Verify triangle inequality: 50+75=125 > 90 ✓; 50+90=140 > 75 ✓; 75+90=165 > 50 ✓. Valid triangle. Used in real estate, land surveying for irregular plots.

When to use this calculator

**Use triangle calculator for:**

- **Land surveying**: triangulated plot calculations. - **Engineering**: truss member analysis. - **Architecture**: roof rafter geometry. - **Construction**: framing angles, structural elements. - **Computer graphics**: mesh calculations. - **Astronomy**: parallax measurements. - **Navigation**: triangulation from known points. - **Geometry homework**: area and angle problems.

**Three sides given (SSS):**

This case uniquely determines a triangle (given triangle inequality holds).

For two sides + angle: see Law of Cosines (SAS) or Law of Sines. For two angles + side: Law of Sines. For three angles: not unique (similar triangles possible).

**Triangle validity check:**

Triangle inequality: largest side < sum of other two.

If sides are 5, 6, 12: 12 > 5+6 = 11. Invalid — no such triangle exists.

Always verify before computing.

**Common applications:**

- **Land surveying**: irregular plots as triangles. - **Civil engineering**: bridge truss analysis. - **Architecture**: roof gables, triangular facades. - **Computer graphics**: 3D modeling. - **Game development**: collision detection. - **GPS triangulation**: position from satellites. - **Photography**: rule of thirds, compositions.

**Pythagorean triples:**

Integer right triangle sides: - 3-4-5 (most famous) - 5-12-13 - 7-24-25 - 8-15-17 - 9-40-41 - 20-21-29

And their multiples (6-8-10, etc.).

**Right triangle check from sides:**

If a² + b² = c² (where c is longest): right triangle. For 3-4-5: 9 + 16 = 25 ✓. For 7-24-25: 49 + 576 = 625 ✓.

**Triangle classifications:**

**By angles:** - Acute: all < 90°. Pythagorean inequality: a² + b² > c² for longest c. - Right: one = 90°. Pythagorean equality. - Obtuse: one > 90°. Pythagorean: a² + b² < c².

**By sides:** - Equilateral: a = b = c. - Isosceles: at least two sides equal. - Scalene: all sides different.

**Software:**

- **Excel**: implement Heron's formula manually. - **Python (numpy)**: import math; use formulas. - **CAD**: built-in triangle tools and area calculation. - **GIS**: polygon area for any shape. - **Triangle solvers**: dedicated calculators online.

**Pitfalls:**

- **Triangle inequality**: always verify before computing. - **For very thin triangles**: numerical precision issues. - **Heron's for thin triangles**: can lose precision (use alternative). - **Sides vs angles**: keep separate. - **For SSA case**: ambiguous (use Law of Sines). - **For 3D triangles**: use vector methods.

**Educational notes:**

Triangle properties appear in: - 5th-6th grade: classification. - 7th-9th grade: area, perimeter, Pythagorean. - High school geometry: detailed properties. - Trigonometry: solving any triangle. - Calculus: derived areas, optimization. - Computer graphics: foundational.

**Pitfalls (continued):**

- **For very small or large triangles**: precision matters. - **For complex polygon triangulation**: many small triangles. - **For mixed unit calculations**: ensure consistency. - **Heron's vs coordinate methods**: choose based on input.

Common mistakes to avoid

  • Triangle inequality violation: sides given that can't form a triangle.
  • Confusing sides with angles in problems.
  • For right triangle identification: not checking Pythagorean inequality.
  • For very thin triangles: numerical precision issues with Heron's.
  • Mixing units between sides.
  • For SSS case: forgetting to verify validity.
  • Computing angles in wrong units (radians vs degrees).
  • Triangle area without correct height (must be perpendicular).

Frequently Asked Questions

Sources & further reading

SponsoredShop Top Deals on AmazonSupport CalcMountain — browse top-rated products at no extra cost to you.

Related Calculators