Triangle Calculator

Triangles are the simplest polygon and the foundation of geometry, trigonometry, surveying, structural engineering, and game development. Given any combination of three known values — three sides (SSS), two sides and the included angle (SAS), two angles and a side (ASA / AAS), or two sides and a non-included angle (SSA) — this calculator solves the complete triangle. It computes area via Heron's formula, base-height, or the trigonometric ½ab·sin(C) method; checks the triangle inequality before computing; identifies type (acute, obtuse, right, equilateral, isosceles, scalene); and reports the inradius and circumradius. For right triangles it applies the Pythagorean theorem directly. Step-by-step solutions show every formula used. Universally applicable — the same Euclidean geometry is taught and used across the US, UK, Canada, and Australia.

star 4.9

Triangle Calculator calculator

Input Values
expand_more
Triangle Visualization
Right Triangle
a = 5 b = 4 c = 3 A B C

Measurements

Area: 6
Perimeter: 12
Height (h): 4

Angles

∠A: 90°
∠B: 53.13°
∠C: 36.87°

Triangle Type

Right scalene triangle (3-4-5 Pythagorean triple)

Area

Area: 6.0000

Method
Three Sides (SSS)
Area
6.0000
Perimeter
12.0000
Triangle Type
Scalene Right

straighten Sides

Side a
3.0000
Side b
4.0000
Side c
5.0000

change_history Angles

Angle A
36.8699°
Angle B
53.1301°
Angle C
90.0000°

height Heights

ha
4.0000
hb
3.0000
hc
2.4000
Inradius (r)
1.0000
Circumradius (R)
2.5000
functions Step-by-Step Solution
expand_more
=== Solving Triangle (SSS) ===
Given: a = 3.0000, b = 4.0000, c = 5.0000
Using Law of Cosines to find angles:
cos(A) = (b² + c² - a²) / (2bc)
cos(A) = (4.0000² + 5.0000² - 3.0000²) / (2 × 4.0000 × 5.0000)
cos(A) = 0.800000
A = 36.8699°
cos(B) = (a² + c² - b²) / (2ac) = 0.600000
B = 53.1301°
C = 180° - A - B = 90.0000°
=== Additional Calculations ===
Perimeter = a + b + c = 12.0000
Semi-perimeter (s) = 6.0000
Area (Heron's formula) = √[s(s-a)(s-b)(s-c)]
Area = 6.0000
Heights (h = 2×Area/side):
hₐ = 4.0000, hᵦ = 3.0000, hᵧ = 2.4000
Inradius (r) = Area/s = 1.0000
Circumradius (R) = abc/(4×Area) = 2.5000
Triangle type: Scalene Right

science Example: Classic 3-4-5 Right Triangle

The 3-4-5 triangle is the most famous Pythagorean triple. With sides a=3, b=4, c=5, it forms a right triangle because 3² + 4² = 9 + 16 = 25 = 5². Area = ½ × 3 × 4 = 6 square units. Perimeter = 3 + 4 + 5 = 12 units. Angles ≈ 36.87°, 53.13°, 90°.

Expected Results

Area 6
Perimeter 12
Type Right Scalene

How to Solve a Triangle: Area, Sides and Angles in 4 Steps

category

Select Known Values

Choose SSS, SAS, ASA, AAS, SSA, right triangle, or area-from-base.

edit

Enter Measurements

Input the known sides and/or angles in any consistent unit.

calculate

Calculate

The calculator validates the triangle inequality and solves for all unknown values.

visibility

View Results

See area, perimeter, all sides and angles, triangle type, and inradius/circumradius.

The Formula

Three core relationships solve any triangle. Law of Sines (a/sin A = b/sin B = c/sin C) handles ASA, AAS, and SSA. Law of Cosines (c² = a² + b² − 2ab·cos C) handles SSS and SAS. The Pythagorean theorem (a² + b² = c²) is the special case of Law of Cosines when C = 90°. Heron's formula gives area from three sides without needing a height; the ½ab·sin(C) formula gives area from two sides and the included angle.

Area = ½ × base × height = √[s(s-a)(s-b)(s-c)] = ½ab·sin(C)

lightbulb Variables Explained

  • a, b, c Lengths of the three sides
  • A, B, C Angles opposite to sides a, b, c (in degrees or radians)
  • s Semi-perimeter: (a + b + c) / 2
  • h Perpendicular height to a chosen base

tips_and_updates Pro Tips

1

Sum of angles in any triangle is exactly 180° (π radians)

2

Triangle inequality: a + b > c for all side pairs — otherwise no valid triangle exists

3

For right triangles: a² + b² = c², where c is the hypotenuse (longest side, opposite the right angle)

4

Area = ½ × base × height — use any side as the base with its perpendicular height

5

Heron's formula: Area = √[s(s−a)(s−b)(s−c)] where s = (a+b+c)/2 — works from three sides alone, no height needed

6

Law of Cosines: c² = a² + b² − 2ab·cos(C) — works for any triangle (use SSS or SAS)

7

Law of Sines: a/sin(A) = b/sin(B) = c/sin(C) — use for ASA, AAS, SSA

8

SSA is the 'ambiguous case' — depending on values, it may yield 0, 1, or 2 valid triangles

A triangle is the simplest polygon and the building block of geometry, trigonometry, structural engineering, surveying, and computer graphics. Three relationships solve every triangle. The Pythagorean theorem (a² + b² = c²) handles right triangles. The Law of Cosines (c² = a² + b² − 2ab·cos C) handles SSS and SAS — three sides, or two sides with the angle between them. The Law of Sines (a/sin A = b/sin B = c/sin C) handles ASA, AAS, and the ambiguous SSA case. Area can be computed three ways: ½ × base × height when you have a perpendicular height, Heron's formula √[s(s−a)(s−b)(s−c)] when you have only the three sides, or ½ab·sin(C) when you have two sides and the included angle. This calculator picks the right method automatically based on which values you provide, validates the triangle inequality before computing, identifies the type (acute / right / obtuse, equilateral / isosceles / scalene), and reports area, perimeter, all sides, all angles, and the inscribed and circumscribed circle radii. The same Euclidean geometry is taught and applied identically across the US (Common Core), UK (GCSE / A-Level), Canada (provincial curricula), and Australia (ACARA) — formulas are universal; only units differ. For deeper coverage of right triangles specifically, our dedicated Pythagorean Theorem Calculator handles that case in detail.

Triangle Area: Heron, Base-Height and Trigonometric Methods

Three formulas cover every situation. (1) Base-height: Area = ½ × b × h. Pick any side as the base; h is the perpendicular distance from the opposite vertex to that base (or its extension). This is the formula taught first in school and what you reach for when a height is given or easy to drop. (2) Heron's formula: Area = √[s(s−a)(s−b)(s−c)] with s = (a+b+c)/2. Use it when all three sides are known but no height — common in surveying, navigation, and any problem framed by side lengths alone. Numerically, Heron's loses precision for very thin (needle) triangles where one side nearly equals the sum of the other two; the calculator uses a numerically stable variant in those cases. (3) Trigonometric (SAS area): Area = ½ × a × b × sin(C) where C is the angle between sides a and b. Particularly compact when SAS data is given and useful in linear algebra and physics (cross-product magnitude). All three give identical results — they are different algebraic forms of the same geometric quantity.

The Triangle Inequality: When Three Lengths Cannot Form a Triangle

Not every set of three positive lengths forms a valid triangle. The Triangle Inequality states that every pair of sides must sum to strictly more than the third: a + b > c, a + c > b, and b + c > a, all simultaneously. Geometrically: if the two short sides cannot reach across the long side, no triangle exists — the short sides collapse onto the long one. Lengths like 1, 2, 4 fail (1 + 2 = 3 < 4). Lengths like 5, 5, 9 succeed (5 + 5 = 10 > 9). Equality (1 + 2 = 3 with sides 1, 2, 3) gives a degenerate triangle with zero area — three collinear points, technically not a triangle. The calculator validates the inequality before computing and shows a clear error if the sides cannot form a real triangle. Any structural-engineering or surveying use of the calculator should treat triangle-inequality validation as a sanity check on field measurements.

Solving SSS, SAS, ASA, AAS, and SSA: When Each Method Applies

Five 'congruence cases' define the combinations of three known measurements that uniquely (or nearly uniquely) determine a triangle. SSS — three sides: use Law of Cosines to solve any angle, then the third angle is 180° minus the other two. SAS — two sides and the included angle: Law of Cosines gives the third side; then Law of Sines (or Cosines again) gives the remaining angles. ASA — two angles and the side between them: third angle is 180° − (A + B); then Law of Sines gives the other two sides. AAS — two angles and a non-included side: same as ASA after computing the third angle. SSA — two sides and a non-included angle: this is the ambiguous case (next section), with possibly 0, 1, or 2 valid triangles. AAA alone (three angles, no side) determines the shape but not the size — infinitely many similar triangles satisfy it, so AAA is not solvable on its own. The calculator routes each input combination to the correct method.

The Law of Sines and the Ambiguous SSA Case

The Law of Sines: a/sin(A) = b/sin(B) = c/sin(C). The ratio of any side to the sine of its opposite angle is the same for all three pairs. Use it for ASA, AAS, and SSA. The catch is SSA: given sides a, b and angle A (opposite side a), there can be no triangle, exactly one, or two distinct triangles. The geometry: if a is shorter than the perpendicular distance from the unknown third vertex to the base, no triangle exists. If a equals that distance, exactly one (right) triangle exists. If a falls between that distance and b, two triangles exist — one acute and one obtuse for angle B. If a is longer than b, only one triangle exists. The calculator detects all three regimes and reports both solutions when SSA is ambiguous. This is where most student errors come from in introductory trigonometry — and one reason engineering practice avoids SSA framing when alternatives exist.

The Law of Cosines: When You Have SSS or SAS

Law of Cosines: c² = a² + b² − 2ab·cos(C). It generalises the Pythagorean theorem — when C = 90°, cos(C) = 0 and the formula reduces to a² + b² = c². Use it whenever Law of Sines does not apply: SSS and SAS. From SSS, solve for any angle: cos(C) = (a² + b² − c²) / (2ab), then C = arccos(...). From SAS, plug the two known sides and included angle into the formula and take the square root for the third side. Computationally, the Law of Cosines is more numerically stable than the Law of Sines for very small or very obtuse angles and is what most CAD and surveying software uses internally. The calculator picks Law of Cosines automatically for SSS and SAS inputs.

Right Triangles: Pythagorean Theorem and Special Triangles

When one angle is exactly 90°, the triangle is right-angled and the math simplifies dramatically. Pythagorean theorem: a² + b² = c², where c is the hypotenuse (the side opposite the 90° angle, always the longest). To find a leg: a = √(c² − b²). To find the hypotenuse: c = √(a² + b²). The two acute angles also become accessible by SOH-CAH-TOA: sin(A) = opposite/hypotenuse = a/c, cos(A) = adjacent/hypotenuse = b/c, tan(A) = opposite/adjacent = a/b. Two ratios are worth memorising. The 30-60-90 triangle has sides in ratio 1 : √3 : 2 — half of an equilateral triangle, ubiquitous in geometry exams and tile cutting. The 45-45-90 (right isosceles) has sides in ratio 1 : 1 : √2 — half of a square, ubiquitous in carpentry and computer graphics. For deeper right-triangle problems specifically, use our dedicated Pythagorean Theorem Calculator; this calculator covers the right-triangle case as one of seven solving modes.

Triangle Classification: By Sides and By Angles

Two parallel classification systems, used together. By sides: Equilateral (all three sides equal — automatically all 60° angles), Isosceles (exactly two sides equal — also has two equal angles, the ones opposite the equal sides), Scalene (all three sides different lengths). By angles: Acute (every angle less than 90°), Right (exactly one 90° angle), Obtuse (exactly one angle greater than 90° — the other two must be acute). Every triangle has both a side label and an angle label. A 3-4-5 is 'right scalene'. A 60-60-60 is 'acute equilateral' (the only kind possible — equilateral implies acute). A 45-45-90 is 'right isosceles'. A 100-40-40 (degrees) with two equal sides is 'obtuse isosceles'. The calculator outputs both classifications.

Pythagorean Triples: 3-4-5, 5-12-13, and Why They Matter

A Pythagorean triple is a set of three positive integers (a, b, c) satisfying a² + b² = c². They form right triangles with all-integer side lengths — useful in construction, computer graphics, and anywhere clean integer geometry helps. Primitive triples (with no common factor): 3-4-5, 5-12-13, 7-24-25, 8-15-17, 9-40-41, 11-60-61, 12-35-37, 20-21-29. Any integer multiple of a primitive triple is also a triple — so 6-8-10, 9-12-15, 30-40-50, etc. all work. Builders use the 3-4-5 method to square corners: measure 3 units along one wall, 4 along the perpendicular, and verify the diagonal is exactly 5. If it's 5.0, the corner is exactly 90°; if it's off, adjust. Euclid and the Pythagoreans catalogued these systematically, and number theorists generalised them via the Euclid formula a = m² − n², b = 2mn, c = m² + n² for integer m > n > 0.

Heron's Formula: Area From Three Sides Without a Height

Heron's formula, attributed to Hero of Alexandria (c. 60 CE), gives the area of a triangle from the three side lengths alone — no height needed: Area = √[s(s−a)(s−b)(s−c)] where s = (a+b+c)/2 is the semi-perimeter. It is the workhorse formula for SSS area problems and for any application that measures sides directly (surveying, GPS-derived distances, parts inspection). One numerical caveat: when one side is very close to the sum of the other two (a 'needle' triangle), the standard form loses floating-point precision. The numerically stable form, due to W. Kahan, is: Area = ¼ × √[(a + (b + c)) × (c − (a − b)) × (c + (a − b)) × (a + (b − c))], where a ≥ b ≥ c are sorted in decreasing order. The calculator uses the stable form internally so accuracy is preserved across all valid triangles.

Inradius, Circumradius, and Triangle Centers

Every triangle has two natural circles. The inscribed circle (incircle) is the largest circle that fits inside, tangent to all three sides — its radius is the inradius r = Area / s (semi-perimeter). The circumscribed circle (circumcircle) passes through all three vertices — its radius is the circumradius R = abc / (4 × Area), or equivalently R = a / (2·sin A) by the Law of Sines. Four classical 'centers' coincide for an equilateral triangle but differ for general triangles: incenter (where angle bisectors meet, center of incircle), circumcenter (where perpendicular bisectors of sides meet, center of circumcircle), centroid (where medians meet, center of mass), orthocenter (where altitudes meet). The Euler line connects the circumcenter, centroid, and orthocenter for any non-equilateral triangle. The calculator outputs r and R alongside basic measurements; centers themselves are coordinate-dependent and require placing the triangle in a coordinate system.

Triangle Applications: Architecture, Surveying, Navigation

Triangles are the structural primitive of the physical and digital worlds. Architecture: the triangle is the only rigid polygon — it cannot deform without changing side lengths. Roof trusses, geodesic domes, and bridge frameworks rely on this. Surveying: triangulation has been the standard for centuries — measure two angles and a baseline (ASA), and the third vertex (an inaccessible point) is solved by Law of Sines. Modern GPS and total stations still use the underlying math. Navigation: position fixing by 'three-bearing' triangulation gives a fix at the intersection of three angles to known landmarks. Aviation and marine navigation use this for backup when GPS is unavailable. Game development and computer graphics: every 3D model is rendered as a mesh of triangles, because a triangle is the simplest planar polygon and rasterizes efficiently on a GPU. The interior-point and barycentric-coordinate methods used to fill triangles on screen rely directly on Heron-style area calculations. The math you do with this calculator is the same math GPUs do millions of times per frame.

Common Triangle Calculation Mistakes and How to Avoid Them

Six recurring errors. (1) Mixing degrees and radians: most calculators (and this one) default to degrees; check the toggle. Programming languages typically default to radians. A 90° vs 90-radian mistake is dramatic. (2) Forgetting the triangle inequality: students plug in 1, 2, 5 and trust the output; the calculator now rejects this with a clear error. (3) Using the Law of Sines for SSS or SAS: these need Law of Cosines. The Law of Sines requires at least one known angle to start. (4) Missing the second SSA solution: in the ambiguous case, both triangles can be valid — exam answers often expect both. (5) Identifying the hypotenuse incorrectly: it is always the side opposite the 90° angle and the longest side — not whichever side is labelled c. (6) Confusing height with side: height is the perpendicular distance from a vertex to the opposite side (or its extension), not one of the sides. For an obtuse triangle, the height to a particular side may fall outside the triangle entirely; that is fine for the area formula.

Frequently Asked Questions

sell

Tags