Mathematics · Updated 2026

Triangle Calculator

Solve any triangle using SSS, SAS, ASA, AAS, or right triangle mode. Find all sides, angles, area, perimeter, and height. Law of cosines and sines shown step by step.

Last updated

SSS, SAS, ASA, AAS
Right Triangle Mode
Area, Perimeter, Height
Law of Sines & Cosines
Our networkdiscount5Fresh deals. Five at a time.Price drops and coupon codes, ending soonest first.See today’s deals
Triangle Calculator
SSS · SAS · ASA · AAS · SSA · Right Triangle
A B C a b c α β γ
Quick Examples
SSS: 3-4-5
a=3, b=4 (5), c=5
SAS: incl. angle
a=10, b=14, C=60°
ASA: two angles
A=45°, c=10, B=60°
Right triangle
legs: a=3, b=4

Choose a mode and enter the known values to solve the triangle.

How to Solve Any Triangle

The three angles of any triangle add up to 180°, and three measurements that include at least one side are enough to solve it: the Law of Cosines for SSS and SAS, the Law of Sines for ASA, AAS and SSA. Pick a mode above, enter what you know, and the calculator returns every side and angle, the three heights, the area and the triangle type.

Every triangle has three sides (a, b, c) and three angles (A, B, C). The angles always sum to 180°. Given any three values (with at least one side), this calculator finds the rest using the Law of Sines or Law of Cosines.

Law of Cosines (SSS/SAS)

c² = a² + b² − 2ab·cos(C). Generalizes the Pythagorean theorem. Use when you know all 3 sides, or 2 sides and the included angle.

Law of Sines (ASA/AAS)

a/sin(A) = b/sin(B) = c/sin(C). Use when you know two angles and one side. All three ratios are equal and equal the diameter of the circumscribed circle.

Heron's Formula (Area)

s = (a+b+c)/2. Area = √(s(s−a)(s−b)(s−c)). Computes area from three sides without needing height. Works for any triangle.

Triangle Inequality

Any two sides must sum to more than the third: a+b>c, a+c>b, b+c>a. Violating this means no valid triangle can exist with those dimensions.

Which Method for Which Case

CaseYou knowFirst stepTriangles
SSSthree sidescos A = (b² + c² − a²) ÷ 2bcone, if every pair of sides is longer than the third
SAStwo sides and the angle between themc² = a² + b² − 2ab cos Calways one
ASAtwo angles and the side between themC = 180° − A − B, then Law of Sinesone, if A + B < 180°
AAStwo angles and a side not between themsame as ASAone, if A + B < 180°
SSAtwo sides and an angle not between themsin B = b sin A ÷ anone, one or two
AAAthree angles onlynoneendless similar triangles, size unknown

The SSA Ambiguous Case

With two sides and an angle that is not between them, side a can swing into place in two different spots, one spot, or not reach at all. The deciding length is the height h = b × sin A. The rows below all use b = 10 and A = 40°, so h = 6.428.

Side aRuleResult
5a < hno triangle
6.428 (exactly h)a = hone right triangle, B = 90°
8h < a < btwo triangles: B = 53.46°, C = 86.54°, c = 12.42, or B = 126.54°, C = 13.46°, c = 2.90
12a ≥ bone triangle: B = 32.39°, C = 107.61°, c = 17.79

When A is 90° or more, there is one triangle if a > b and none otherwise. In SSA mode the calculator shows the first triangle in full and lists the second one in the Method box whenever two exist.

Worked Examples

SSS: sides 7, 8 and 9

cos A = (64 + 81 − 49) ÷ (2 × 8 × 9) = 0.6667, so A = 48.19°. In the same way B = 58.41°, and C = 180° − 48.19° − 58.41° = 73.40°. Heron’s formula with s = 12 gives an area of √(12 × 5 × 4 × 3) = 26.83.

SAS: a = 10, b = 14, C = 60°

c² = 100 + 196 − 2 × 10 × 14 × 0.5 = 156, so c = 12.49. Area = ½ × 10 × 14 × sin 60° = 60.62.

ASA: A = 45°, B = 60°, c = 10

C = 75°. Then a = 10 × sin 45° ÷ sin 75° = 7.32 and b = 10 × sin 60° ÷ sin 75° = 8.97. Area = 31.70.

An obtuse triangle: sides 5, 6 and 10

5² + 6² = 61 is less than 10² = 100, so the angle opposite the 10 side is obtuse: C = 130.54°. The area is 11.40.

Special Triangles and Common Mistakes

TriangleAnglesExample sidesArea
Equilateral60°, 60°, 60°10, 10, 10 (height 8.66)43.30
Right isosceles45°, 45°, 90°5, 5, 7.0712.50
Half equilateral30°, 60°, 90°5, 8.66, 1021.65
  • Calculator in radians. sin 30 in radian mode is −0.988, not 0.5. Angles here are always in degrees.
  • Stopping at one SSA answer. The inverse sine only returns angles up to 90°. Always test 180° minus that angle too.
  • Sides that cannot close. 1, 2 and 10 fail the triangle inequality because 1 + 2 is less than 10.
  • Rounding too early. Carry full precision through the Law of Sines and round only the final answers.
  • Using the Pythagorean theorem on a non-right triangle. It only holds when one angle is exactly 90°. For right triangles alone, the Pythagorean theorem calculator is quicker.
Method and sources. Methods: Law of Cosines, Law of Sines, Heron’s formula (area) and h = 2 × area ÷ side (heights), with the angle sum of 180° from Euclidean geometry. SSA solutions follow the standard ambiguous case test with h = b sin A. Every figure on this page was computed with node using the same formulas as the calculator.

Triangle Questions

These abbreviations describe which triangle measurements you know: S = Side, A = Angle. SSS (three sides): use Law of Cosines to find angles. SAS (two sides + included angle): use Law of Cosines for the third side, then Law of Sines for remaining angles. ASA (two angles + included side): the third angle = 180° minus the other two, then Law of Sines. AAS (two angles + non-included side): same as ASA once you find the third angle. AAA (three angles) is the only case that doesn't uniquely determine a triangle: infinitely many similar triangles satisfy three angles.

The Law of Cosines states: c² = a² + b² − 2ab·cos(C). It generalizes the Pythagorean theorem: when C = 90°, cos(90°) = 0 and it reduces to c² = a² + b². Three equivalent forms: a² = b² + c² − 2bc·cos(A), b² = a² + c² − 2ac·cos(B), c² = a² + b² − 2ab·cos(C). To find an angle given three sides: cos(A) = (b² + c² − a²) / (2bc). The Law of Cosines works for any triangle, including obtuse triangles.

The Law of Sines states: a/sin(A) = b/sin(B) = c/sin(C). This common ratio equals the diameter of the triangle's circumscribed circle (circumradius × 2). Use it when you know: two angles and any side (ASA or AAS). Example: A = 30°, B = 70°, a = 5. C = 180° − 30° − 70° = 80°. b = a × sin(B)/sin(A) = 5 × sin(70°)/sin(30°) ≈ 9.40. Caution: when given two sides and a non-included angle (SSA), the Law of Sines can produce two solutions (the ambiguous case).

Several methods: (1) Base × height / 2: Area = ½ × b × h. (2) Two sides and included angle: Area = ½ × a × b × sin(C). (3) Heron's formula (three sides): s = (a+b+c)/2, Area = √(s(s−a)(s−b)(s−c)). (4) Coordinates: if vertices are (x₁,y₁), (x₂,y₂), (x₃,y₃), Area = ½|x₁(y₂−y₃) + x₂(y₃−y₁) + x₃(y₁−y₂)|. This calculator uses all three methods depending on which values are available.

An obtuse triangle has one angle greater than 90°. The Law of Cosines still applies, but the cosine of an obtuse angle is negative, so c² = a² + b² − 2ab·cos(C) gives a smaller value when the included angle is obtuse. When using the Law of Sines in the SSA case, check whether the second solution is valid: if B is the angle the Law of Sines gives, 180° − B is a second valid answer whenever A + (180° − B) < 180°. The Pythagorean theorem only applies to right triangles; for obtuse triangles, the longest side is always opposite the obtuse angle and c² > a² + b².

In Euclidean (flat) geometry, the interior angles of any triangle sum to exactly 180°. Proof: draw a line parallel to one side through the opposite vertex. The two alternate interior angles equal the base angles (by parallel line properties). The three angles together form a straight line = 180°. In non-Euclidean geometry (curved surfaces), this is not true: on a sphere, triangle angles sum to more than 180°; on a saddle surface (hyperbolic geometry), they sum to less. GPS triangulation must account for Earth's curved surface.

The triangle inequality states that the sum of any two sides must be greater than the third side: a+b > c, a+c > b, and b+c > a. If any condition fails, no valid triangle can be formed. Examples: sides 3, 4, 5: 3+4=7>5, 3+5=8>4, 4+5=9>3, valid triangle. Sides 1, 2, 10: 1+2=3<10, invalid. This theorem also applies to vectors and distances in more abstract mathematical settings (metric spaces).

Heron's formula calculates triangle area from three sides without needing height. Named after Hero of Alexandria (c. 60 AD): s = (a+b+c)/2 (semi-perimeter). Area = √(s(s−a)(s−b)(s−c)). Example: sides 3, 4, 5. s = (3+4+5)/2 = 6. Area = √(6×3×2×1) = √36 = 6 square units. Cross-check: right triangle with legs 3 and 4. Area = ½×3×4 = 6. Both methods agree. Heron's formula is especially useful in surveying and cartography when a triangle's vertices are known but no direct height measurement is available.

By sides: Equilateral (all sides equal, all angles 60°), Isosceles (two sides equal, two angles equal), Scalene (all sides different, all angles different). By angles: Acute (all angles < 90°), Right (one angle = 90°, satisfies a²+b²=c²), Obtuse (one angle > 90°). A triangle can be simultaneously classified by both: e.g., a right isosceles triangle has two equal legs and angles 45°-45°-90°. Special right triangles: 30°-60°-90° (sides in ratio 1:√3:2) and 45°-45°-90° (sides in ratio 1:1:√2).

A triangle has three heights (altitudes), one from each vertex perpendicular to the opposite side. Height on base a: hₐ = 2×Area/a. Height on base b: hᵇ = 2×Area/b. Height on base c: hᶜ = 2×Area/c. Alternatively using trigonometry: hₐ = b×sin(C) = c×sin(B). All three altitudes of any triangle meet at a single point called the orthocenter. For an acute triangle the orthocenter is inside; for a right triangle it is at the right-angle vertex; for an obtuse triangle it is outside the triangle.

It is the SSA case: two sides and an angle that is not between them. The data can fit two different triangles, one, or none. With b = 10 and A = 40°, side a = 8 gives two triangles (B = 53.46° or 126.54°), a = 12 gives one, and a = 5 gives none because it is shorter than the height b sin A = 6.43. The SSA mode above reports both answers when two exist.

Subtract the other two from 180°: C = 180° − A − B. If A = 45° and B = 60°, then C = 75°. This works for every flat triangle, whatever its shape or size. If the two angles you have already add up to 180° or more, no triangle is possible.

No. An obtuse angle is more than 90°, so two of them would already add up to more than 180°, leaving nothing for the third angle. A triangle can have at most one obtuse angle or one right angle, and at least two of its angles are always acute.