Triangle Calculator

Solve any triangle from 3 sides (SSS), 2 sides and an angle (SAS), or 2 angles and a side (ASA). Shows area, perimeter, heights, and a diagram.

Ad
Ad

About Triangle Calculator

Solve any triangle from partial information. Enter three sides (SSS), two sides and the included angle (SAS), or two angles and the included side (ASA) to find all remaining sides, angles, area, perimeter, and heights. The calculator draws a scaled SVG diagram with labels and shows every formula step by step.

How Each Mode Works

ModeYou KnowMethod UsedExample Input
SSSAll three sidesLaw of Cosines for angles, Heron's formula for areaa=5, b=7, c=9
SASTwo sides and included angleLaw of Cosines for third side, then SSSa=5, b=7, C=60°
ASATwo angles and included sideThird angle = 180° - A - B, Law of Sines for sidesA=40°, B=70°, c=8

Triangle Formulas Reference

Law of Cosines: c² = a² + b² - 2ab cos(C)

Used when you know SSS (to find angles) or SAS (to find the third side). It generalizes the Pythagorean theorem - when C = 90°, the cos(C) term disappears and you get a² + b² = c².

Law of Sines: a/sin(A) = b/sin(B) = c/sin(C)

Used when you know ASA or AAS. Each side is proportional to the sine of its opposite angle.

Heron's formula (area from three sides):

s = (a + b + c) / 2

A = √(s(s-a)(s-b)(s-c))

SAS area formula: A = (1/2) x a x b x sin(C)

Heights: h_a = 2A / a, h_b = 2A / b, h_c = 2A / c

Worked Examples

SSS: a = 5, b = 7, c = 9

  • Find angle C: cos(C) = (5² + 7² - 9²) / (2 x 5 x 7) = (25 + 49 - 81) / 70 = -7/70 = -0.1
  • C = arccos(-0.1) = 95.74°
  • Heron's formula: s = (5 + 7 + 9) / 2 = 10.5
  • Area = √(10.5 x 5.5 x 3.5 x 1.5) = √303.1875 = 17.41
  • Perimeter = 21

SAS: a = 6, b = 8, C = 50°

  • Find c: c² = 36 + 64 - 2(6)(8)cos(50°) = 100 - 96(0.6428) = 100 - 61.71 = 38.29
  • c = √38.29 = 6.19
  • Area = (1/2)(6)(8)sin(50°) = 24(0.766) = 18.39

Triangle Classification

By SidesDefinitionProperties
EquilateralAll three sides equalAll angles 60°, maximum area for given perimeter
IsoscelesTwo sides equalTwo equal angles opposite the equal sides
ScaleneNo equal sidesAll angles different
By AnglesDefinitionProperties
AcuteAll angles less than 90°All altitudes fall inside the triangle
RightOne angle equals 90°Pythagorean theorem applies
ObtuseOne angle greater than 90°One altitude falls outside the triangle

The Triangle Inequality

Three lengths can form a triangle only if the sum of any two sides is greater than the third. Formally: a + b > c, a + c > b, and b + c > a. If any of these fail, the triangle is impossible. The calculator validates your inputs and warns you if they do not form a valid triangle.

Valid: 3, 4, 5 (3+4=7 > 5, 3+5=8 > 4, 4+5=9 > 3)

Invalid: 1, 2, 5 (1+2=3 < 5 - these cannot form a triangle)

Practical Applications

  • Construction: Calculating roof angles, rafter lengths, and triangular structural supports
  • Surveying: Triangulation uses known distances and angles to determine unknown positions
  • Navigation: Finding distances and bearings between three points
  • Design: Calculating material needed for triangular shapes (sails, banners, architectural features)

For right triangles specifically, the Pythagorean theorem calculator provides a focused tool. For deeper trigonometry work, the law of cosines calculator and law of sines calculator show detailed workings for each formula.

All calculations happen in your browser with no data sent anywhere.

Frequently Asked Questions

What is SSS, SAS, and ASA?

These describe what information you know about a triangle. SSS means you know all three sides. SAS means you know two sides and the angle between them. ASA means you know two angles and the side between them.

How does the calculator find the area?

For SSS mode, it uses Heron's formula which only needs the three side lengths. For SAS mode, it uses the formula Area = (1/2) times a times b times sin(C). For ASA, it first finds all sides using the law of sines, then calculates the area.

What makes a triangle invalid?

A triangle is invalid if the sum of any two sides is less than or equal to the third side. For example, sides 1, 2, and 5 cannot form a triangle because 1 + 2 is less than 5. The calculator will warn you if this happens.

What are the heights of a triangle?

The height (or altitude) from a side is the perpendicular distance from that side to the opposite vertex. The calculator finds all three heights using the formula h = 2 times area divided by the base length.

Can I solve a right triangle with this tool?

Yes. Enter the sides in SSS mode or use SAS with a 90-degree angle. For a dedicated right triangle tool, check out the Pythagorean Theorem Calculator.

Link to this tool

Copy this HTML to link to this tool from your website or blog.

<a href="https://toolboxkit.io/tools/triangle-calculator/" title="Triangle Calculator - Free Online Tool">Try Triangle Calculator on ToolboxKit.io</a>