Skip to main content

Triangles & laws of sines/cosines

Triangle Calculator: Law of Sines, Cosines & Heron

Solve any triangle from 3 values. SSS, SAS, ASA, AAS. Law of Sines, Law of Cosines, Heron's formula. Inradius, circumradius, medians.

By Jeff Beem

Updated

Triangle Calculator

Enter any 3 values (at least one side). The rest are solved using the Law of Sines and Cosines.

Angle unit
Result
Enter any 3 values (at least one side) to solve for all sides, angles, area, and geometric profile.

Understanding Triangle Geometry

Our triangle calculator solves any triangle from three known values (at least one side). Whether you have SSS, SAS, ASA, or AAS, we apply the correct law. Law of Sines, Law of Cosines, or Heron's formula, and show every step in the Step-by-Step Calculation. Trusted by students and educators for geometry homework and surveying.

Workflow Tips

Input 3 Values

Sides (a, b, c) or angles (A, B, C in degrees). At least one side is required. The dashed mint border marks system-calculated fields.

Geometric Profile

Area & perimeter, inradius (r) and circumradius (R), and medians (mₐ, mᵦ, mᵧ) appear when the triangle is solved.

Step-by-Step Tabs

Angles/Sides tab shows Law of Sines or Cosines with substitution. Area tab shows Heron's formula.

Dynamic Schematic

The SVG triangle updates to show Equilateral, Isosceles, Scalene, Right, Obtuse, or Acute based on your inputs.

Knowledge Base

Triangle properties depend on what you know. We apply Law of Cosines (SSS/SAS), Law of Sines (angle-side pairs), and Heron's formula (area from sides):

Law of Cosines: SSS or SAS, find missing angles or the third side:

c2=a2+b22abcos(C)c^2 = a^2 + b^2 - 2ab \cos(C)

Law of Sines: When you have an angle and its opposite side, the ratio is constant:

asin(A)=bsin(B)=csin(C)\frac{a}{\sin(A)} = \frac{b}{\sin(B)} = \frac{c}{\sin(C)}

Heron's Formula: Area from three sides only, no height needed. Semi-perimeter s = (a+b+c)/2, then:

Area=s(sa)(sb)(sc)\text{Area} = \sqrt{s(s-a)(s-b)(s-c)}

Triangle Calculator: Angles, Sides, Area | Law of Sines & Cosines

Free triangle calculator: solve any triangle from 3 known values. SSS, SAS, ASA, AAS. Law of Sines, Law of Cosines, Heron's formula. Inradius, circumradius, medians. Step-by-Step Calculation. Trusted by students and educators. No sign-up.

What This Triangle Calculator Does

Purpose & Use Cases

This triangle calculator solves for all sides, angles, area, perimeter, inradius, circumradius, and medians when you provide any 3 values (with at least one side). Use it to solve a triangle with 3 sides (SSS), find triangle area without height via Heron's formula, or solve SAS, ASA, and AAS cases. Ideal for geometry homework, surveying, and understanding how triangles are uniquely determined. The Step-by-Step Calculation shows every substitution so you can verify each step.
  • Input:
    Any 3 of: sides a, b, c; angles A, B, C (degrees).
  • Output:
    All 6 values, area, perimeter, inradius, circumradius, medians.

How the Math Works

The calculator selects the appropriate law based on your input combination. For SSS (all three sides known), the Law of Cosines finds each angle and Heron's formula gives the area. For SAS (two sides and the included angle), the Law of Cosines finds the third side, then the Law of Sines determines the remaining angles, and area = ½ab·sin(C). For ASA and AAS, the third angle is found from A + B + C = 180°, then the Law of Sines solves for the missing sides. SSA (ambiguous case) can produce zero, one, or two valid triangles depending on relative lengths, the calculator handles all cases automatically.
c2=a2+b22abcos(C)c^2 = a^2 + b^2 - 2ab\cos(C)
asin(A)=bsin(B)=csin(C)\frac{a}{\sin(A)} = \frac{b}{\sin(B)} = \frac{c}{\sin(C)}
Area=s(sa)(sb)(sc)\text{Area} = \sqrt{s(s-a)(s-b)(s-c)}
  • Worked example (SSS):
    Sides a = 5, b = 7, c = 9. Semi-perimeter s = (5+7+9)/2 = 10.5. Area = √(10.5 × 5.5 × 3.5 × 1.5) ≈ 17.41. Angle C = arccos((25 + 49 − 81) / (2 × 5 × 7)) = arccos(−0.1) ≈ 95.7° (obtuse triangle).
  • Worked example (SAS):
    Sides a = 8, b = 6, angle C = 60°. Third side c = √(64 + 36 − 96·cos60°) = √(100 − 48) = √52 ≈ 7.21. Area = ½ × 8 × 6 × sin(60°) ≈ 20.78.

How to Use This Calculator

Enter any three known values, sides (a, b, c) and angles (A, B, C in degrees), with at least one side. Supported combinations are SSS, SAS, ASA, AAS, and SSA. The calculator fills in all remaining sides and angles; computed fields are marked with a dashed mint border so you can distinguish them from your inputs. Below the main results, the Geometric Profile shows area, perimeter, inradius, circumradius, and medians for each side. Open the Step-by-Step Calculation to see every substitution: the Angles/Sides tab walks through the Law of Sines or Law of Cosines application with your numbers, and the Area tab shows Heron's formula or the ½ab·sin(C) derivation. The SVG diagram updates dynamically, labeling the triangle as Equilateral, Isosceles, Scalene, Right, Obtuse, or Acute based on your inputs. If your values violate the triangle inequality, an "Invalid triangle" message appears.

The Three Laws, When the Calculator Uses Each

Law of Sines

Used when you have a matching pair, an angle and its opposite side, plus one more. Establishes a constant ratio across the triangle:
asin(A)=bsin(B)=csin(C)\frac{a}{\sin(A)} = \frac{b}{\sin(B)} = \frac{c}{\sin(C)}
Applies to ASA, AAS, and some SSA cases.

Law of Cosines

Used for SSS (find angles) and SAS (find the third side). Generalizes the Pythagorean theorem:
c2=a2+b22abcos(C)c^2 = a^2 + b^2 - 2ab \cos(C)
For right triangles, cos(90°)=0, giving a² + b² = c².

Heron's Formula

When all three sides are known, we compute area without height. Semi-perimeter s = (a+b+c)/2, then:
Area=s(sa)(sb)(sc)\text{Area} = \sqrt{s(s-a)(s-b)(s-c)}
Essential for finding triangle area with 3 sides only.

When to Use Each Method

SSS (Side-Side-Side): Law of Cosines finds each angle; Heron's formula gives area. SAS (two sides and included angle): Law of Cosines finds the third side; then Law of Sines for remaining angles; area via ½ab·sin(C). ASA/AAS: Third angle from sum = 180°, then Law of Sines for sides. SSA (ambiguous case): 0, 1, or 2 triangles possible depending on values, the calculator handles this automatically.

Triangle Calculator FAQ

What combinations of sides and angles can I enter?

Enter any 3 values with at least one side: SSS (all three sides), SAS (two sides and the included angle), ASA (two angles and the included side), AAS (two angles and a non-included side), or SSA (two sides and a non-included angle). The calculator uses the Law of Sines and Law of Cosines to solve for the remaining values.

Why does it say "Invalid triangle"?

A valid triangle requires the sum of any two sides to be greater than the third (triangle inequality). If your inputs violate this, e.g., sides 1, 2, 10; no triangle can exist. Check that your values can form a real triangle.

How is area calculated?

Area uses Heron's formula when all three sides are known. First find the semi-perimeter s = (a+b+c)/2, then
Area=s(sa)(sb)(sc)\text{Area} = \sqrt{s(s-a)(s-b)(s-c)}
The calculator also shows inradius, circumradius, and medians in the Geometric Profile. For SAS cases, we use ½ab·sin(C).

What is the Law of Cosines?

The Law of Cosines generalizes the Pythagorean theorem:
c2=a2+b22abcos(C)c^2 = a^2 + b^2 - 2ab \cos(C)
Used for SSS (find angles) and SAS (find the third side). For right triangles, cos(90°)=0, so it reduces to a² + b² = c².

What is the Law of Sines?

The Law of Sines establishes a constant ratio:
asin(A)=bsin(B)=csin(C)\frac{a}{\sin(A)} = \frac{b}{\sin(B)} = \frac{c}{\sin(C)}
Used when you know an angle and its opposite side, plus one other. Combined with A+B+C=180°, it solves ASA and AAS cases.

Mathematical Reference Note

Calculation Logic: This tool uses standard mathematical algorithms. While we strive for accuracy, errors in logic or user input can result in incorrect data.

Verification: Results should be cross-checked if used for important academic, professional, or personal calculations.

Standard Terms: This tool is provided free of charge and as-is. CalcRegistry provides no warranty regarding the accuracy or fitness of these results for your specific needs.

© 2026 CalcRegistry Reference Last System Check: May 2026Free Online Utility Tools