Triangle Calculator

Free triangle calculator. Find all sides, angles, area and perimeter of any triangle using Law of Cosines and Law of Sines.

Free Tool Formerly CalcSolver No Sign-up Instant Results

Triangle Calculator

Enter any 3 known values (at least one must be a side). Leave unknowns empty.

Comprehensive Trigonometric Guide to Solving Triangles

Master Euclidean triangle laws, the Law of Sines and Cosines, ambiguous SSA configurations, Heron's formula, and engineering triangulation.

1

Euclidean Foundations & The Triangle Inequality Theorem

The triangle is the most fundamental polygon in Euclidean geometry. Consisting of three coplanar line segments intersecting at three non-collinear vertices, it is the only two-dimensional polygon that is structurally rigid: its shape cannot deform without changing the physical length of its sides.

1. The Interior Angle Sum Theorem

In standard flat Euclidean space, the sum of the three interior angles of any triangle is an invariant constant:

∠A + ∠B + ∠C = 180° = π radians

2. The Triangle Inequality Theorem

Not every combination of three arbitrary numbers can form a valid geometric triangle. The shortest path connecting any two vertices is the straight line segment between them. Therefore, the sum of the lengths of any two sides must strictly exceed the length of the third side:

a + b > c   and   a + c > b   and   b + c > a

If $a + b = c$, the vertices collapse into a degenerate flat line segment. If $a + b < c$, the segments fail to connect in the plane.

3. Taxonomy of Triangles

  • By Side Lengths:
    • Equilateral: All three sides equal ($a = b = c$); all three angles equal $60^\circ$.
    • Isosceles: Exactly two sides equal ($a = b \ne c$); angles opposite equal sides are congruent.
    • Scalene: All three sides have distinct lengths ($a \ne b \ne c$); all interior angles are unequal.
  • By Interior Angles:
    • Acute: All three interior angles measure strictly less than $90^\circ$.
    • Right: Exactly one interior angle equals $90^\circ$ ($\frac{\pi}{2}\,\text{rad}$), satisfying the Pythagorean Theorem $a^2 + b^2 = c^2$.
    • Obtuse: Exactly one interior angle exceeds $90^\circ$ ($90^\circ < \theta < 180^\circ$).
2

Trigonometric Frameworks: Law of Cosines & Law of Sines

Solving a triangle means computing all unknown side lengths and angle measures from a set of known initial elements. The mathematical choice between the Law of Sines and the Law of Cosines depends on the information provided:

1. The Law of Cosines

The Law of Cosines generalizes the Pythagorean theorem to oblique (non-right) triangles by incorporating a correction term for non-orthogonal geometry:

c² = a² + b² - 2ab · cos(C)
b² = a² + c² - 2ac · cos(B)
a² = b² + c² - 2bc · cos(A)

When angle $C = 90^\circ$, $\cos(90^\circ) = 0$, directly recovering $c^2 = a^2 + b^2$.

To solve for an angle when all three sides are known (SSS), isolate the cosine term:

cos(C) = (a² + b² - c²) / (2ab)   ⟹   C = arccos[ (a² + b² - c²) / (2ab) ]

2. The Law of Sines

The Law of Sines states that the ratio of any side length to the sine of its opposite angle is constant across all three vertices, and equals the diameter ($2R$) of the triangle's circumscribed circle:

a / sin(A) = b / sin(B) = c / sin(C) = 2R

Solvability Cases Reference

Given Condition Primary Solving Method Solution Uniqueness
SSS (3 Sides) Law of Cosines to find largest angle, then Law of Sines. 1 unique triangle (if Triangle Inequality holds).
SAS (2 Sides, Included Angle) Law of Cosines to find 3rd side, then Law of Sines. 1 unique triangle.
ASA / AAS (2 Angles, 1 Side) Angle Sum (180° - A - B), then Law of Sines. 1 unique triangle.
SSA (Ambiguous Case) Law of Sines to find second angle: $\sin(B) = \frac{b \sin(A)}{a}$. 0, 1, or 2 valid triangles possible.
AAA (3 Angles) None (sides undetermined). Infinitely many similar triangles.
3

Comprehensive Triangle Area Formulations

Depending on the initial geometric constraints known, area ($A$) can be computed via several rigorous formulations:

  • Standard Base-Altitude Formula: $A = \frac{1}{2}bh$, where $h$ is strictly perpendicular to base $b$.
  • Trigonometric Side-Angle-Side (SAS) Formula: When two sides and their included angle are known:
    A = ½ × a × b × sin(C) = ½ × b × c × sin(A) = ½ × a × c × sin(B)
  • Heron's Formula (SSS): Discovered by Hero of Alexandria in 60 CE, this formula calculates area directly from side lengths without computing altitudes or angles:
    s = (a + b + c) / 2   (Semi-perimeter)
    A = √[ s × (s - a) × (s - b) × (s - c) ]
  • Equilateral Triangle Formula: For an equilateral triangle with side $s$: $A = \frac{\sqrt{3}}{4}s^2$.
  • Incircle Radius Formulation: For incircle radius $r$: $A = r \times s$.
4

Comprehensive Step-by-Step Worked Case Studies

Case Study 1: Solving an SSS Triangle via Law of Cosines

Problem Statement: A triangular structural truss has side lengths $a = 7\,\text{m}$, $b = 10\,\text{m}$, and $c = 12\,\text{m}$. Find all three interior angles and verify that their sum equals $180^\circ$.

Step 1: Check Triangle Inequality. $7 + 10 = 17 > 12$; $7 + 12 = 19 > 10$; $10 + 12 = 22 > 7$. The triangle is valid.

Step 2: Solve for largest angle $C$ (opposite longest side $c = 12$):

cos(C) = (a² + b² - c²) / (2ab) = (7² + 10² - 12²) / (2 × 7 × 10)
cos(C) = (49 + 100 - 144) / 140 = 5 / 140 = 0.035714
C = arccos(0.035714) ≈ 87.95°

Step 3: Solve for angle $A$ using Law of Cosines:

cos(A) = (b² + c² - a²) / (2bc) = (10² + 12² - 7²) / (2 × 10 × 12)
cos(A) = (100 + 144 - 49) / 240 = 195 / 240 = 0.8125
A = arccos(0.8125) ≈ 35.66°

Step 4: Solve for angle $B$:

B = 180° - A - C = 180° - 35.66° - 87.95° = 56.39°

Verification: $35.66^\circ + 56.39^\circ + 87.95^\circ = 180.00^\circ$. The solution is exact.


Case Study 2: Solving an SAS Configuration

Problem Statement: A civil engineer surveys a boundary with side $a = 25\,\text{m}$, side $b = 36\,\text{m}$, and included angle $C = 52.0^\circ$. Compute the missing side $c$ and the total parcel area.

Step 1: Compute missing side $c$ using Law of Cosines:

c² = a² + b² - 2ab · cos(C)
c² = 25² + 36² - 2(25)(36) · cos(52°)
c² = 625 + 1296 - 1800 · (0.61566) = 1921 - 1108.19 = 812.81
c = √812.81 ≈ 28.51 m

Step 2: Compute Area using SAS formula:

Area = ½ × a × b × sin(C) = ½ × 25 × 36 × sin(52°)
Area = 450 × 0.78801 ≈ 354.60 m²

Case Study 3: Navigating the Ambiguous SSA Case

Problem Statement: Given angle $A = 30^\circ$, side $a = 7\,\text{cm}$, and side $b = 10\,\text{cm}$, determine how many valid triangles can be constructed.

Step 1: Compute the perpendicular altitude $h$:

h = b · sin(A) = 10 · sin(30°) = 10 · 0.5 = 5.0 cm

Step 2: Compare side $a$ with $h$ and $b$:

h (5.0 cm) < a (7.0 cm) < b (10.0 cm)

Because $h < a < b$, exactly two distinct valid triangles exist: one acute triangle and one obtuse triangle:

  • Triangle 1: $\sin(B_1) = \frac{b \sin(A)}{a} = \frac{5}{7} \approx 0.7143 \implies B_1 = \arcsin(0.7143) \approx 45.58^\circ$, yielding $C_1 = 180^\circ - 30^\circ - 45.58^\circ = 104.42^\circ$.
  • Triangle 2: $B_2 = 180^\circ - B_1 = 180^\circ - 45.58^\circ = 134.42^\circ$, yielding $C_2 = 180^\circ - 30^\circ - 134.42^\circ = 15.58^\circ$.
5

Engineering, Surveying & Computer Graphics Applications

Triangular mathematics is central to computational and physical sciences:

  • Structural Rigidity in Civil Engineering: Architectural trusses (e.g., Warren and Pratt trusses on railway bridges) partition space exclusively into triangles because external shearing forces cannot distort a triangle without buckling one of its structural steel members.
  • Geodesy & GPS Trilateration: Global Positioning System receivers compute your latitude, longitude, and elevation by measuring time-of-flight distances to four orbiting GPS satellites, calculating the intersection of spheres via 3D spherical trigonometry.
  • 3D Mesh Graphics & Rasterization: GPUs in modern gaming hardware and CAD applications represent complex surfaces as millions of connected triangles (triangular meshes). Shaders interpolate lighting and textures across surfaces using barycentric coordinates ($P = \alpha A + \beta B + \gamma C$, where $\alpha + \beta + \gamma = 1$).
6

Common Geometric Fallacies & Calculator Pitfalls

Be vigilant against these standard errors when solving triangles:

  • Degree vs. Radian Mode: Entering trigonometric values into calculators set to Radians when values are expressed in Degrees (e.g., $\sin(30\,\text{rad}) \approx -0.988$ vs $\sin(30^\circ) = 0.5$).
  • Overlooking the Obtuse Law of Sines Case: For SSA configurations, $\arcsin$ only returns acute angles ($0^\circ \le \theta \le 90^\circ$). You must manually evaluate the supplement $180^\circ - \theta$ to test for an obtuse second triangle.
  • Assuming Base is Always Horizontal: Any of the three sides can serve as the triangle's base, provided the altitude is measured perpendicular to that specific side.
7

Frequently Asked Questions About Triangle Calculation

What information is needed to solve a triangle completely?

A triangle has six primary elements: three sides (a, b, c) and three interior angles (A, B, C). To solve a triangle uniquely, you must know at least three elements, with the critical constraint that at least one known element must be a side length. Knowing three angles (AAA) only determines shape and proportion (similarity), not absolute size.

What is the Triangle Inequality Theorem?

The Triangle Inequality Theorem states that for any geometrically valid triangle, the sum of the lengths of any two sides must be strictly greater than the length of the remaining side: a + b > c, a + c > b, and b + c > a. If the sum of two shorter sides equals or is less than the third side, the segments cannot form a closed triangular polygon.

When should you use the Law of Cosines versus the Law of Sines?

Use the Law of Cosines (c² = a² + b² - 2ab·cos(C)) when you know all three sides (SSS) or two sides and their included angle (SAS). Use the Law of Sines (a/sin(A) = b/sin(B) = c/sin(C)) when you know two angles and any side (ASA or AAS), or two sides and a non-included angle (SSA).

What is the Ambiguous Case (SSA) in trigonometry?

The Ambiguous Case occurs when you are given two side lengths and an angle opposite one of them (Side-Side-Angle). Depending on the height h = b·sin(A) relative to side a, there may be zero solutions (if a < h), exactly one right triangle solution (if a = h), two distinct valid triangles (an acute and an obtuse triangle, if h < a < b), or one unique triangle (if a ≥ b).

How does Heron's Formula calculate triangle area?

Heron's Formula computes the exact area of any triangle given only its three side lengths a, b, and c, without requiring angles or altitudes: Area = √[s(s - a)(s - b)(s - c)], where s is the semi-perimeter: s = (a + b + c) / 2.