Triangle Calculator

Right Triangle Calculator

Enter any 2 values to solve the right triangle (a, b = legs; c = hypotenuse; A, B = angles in degrees).

🔺 Types of Triangles

Triangle Formulas

Area Formulas

Base & Height: Area = (1/2) × base × height
Heron's Formula: s = (a+b+c)/2
Area = √(s(s-a)(s-b)(s-c))
SAS: Area = (1/2) × a × b × sin(C)
Equilateral: Area = (√3/4) × a²

Pythagorean Theorem

a² + b² = c² (right triangle only)

Finding hypotenuse: c = √(a² + b²)
Finding leg: a = √(c² - b²)

Pythagorean triples: 3-4-5, 5-12-13,
8-15-17, 7-24-25, 20-21-29

Law of Cosines

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

Finding angle: cos(C) = (a² + b² - c²) / (2ab)

Law of Sines

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

Finding side: a = b × sin(A) / sin(B)
Finding angle: sin(A) = a × sin(B) / b

Also equals 2R (where R = circumradius)

Perimeter & Other Properties

Perimeter: P = a + b + c
Semi-perim: s = P/2
Inradius: r = Area / s
Circumradius: R = (abc) / (4 × Area)
Height (ha): ha = 2×Area / a
Median (ma): ma = (1/2)√(2b²+2c²-a²)

Angle Sum & Exterior Angles

Interior angles: A + B + C = 180°
Exterior angle = sum of 2 non-adjacent interior angles

Right triangle: A + B = 90° (complementary angles)
sin(A) = cos(B), cos(A) = sin(B), tan(A) = a/b

Frequently Asked Questions

These are the five triangle-solving cases based on which values you already know. SSS = 3 sides given → use Law of Cosines to find angles. SAS = 2 sides + the angle between them → Law of Cosines for third side. ASA = 2 angles + the side between them → angle sum for third angle, then Law of Sines. AAS = 2 angles + a non-included side → angle sum, then Law of Sines. SSA = 2 sides + non-included angle → the ambiguous case that can produce 0, 1, or 2 valid triangles. This calculator identifies which case applies and uses the correct formula automatically.
Law of Cosines: c² = a² + b² − 2ab·cos(C). It generalises the Pythagorean theorem to any triangle. Use it for SSS (to find any angle: cos(C) = (a²+b²−c²)/(2ab)) and SAS (to find the third side). When C = 90°, cos(90°) = 0, so the formula reduces exactly to the Pythagorean theorem c² = a² + b². The Law of Cosines works for any triangle - acute, obtuse, or right.
Law of Sines: a/sin(A) = b/sin(B) = c/sin(C) = 2R (where R is the circumradius). Use it for ASA (two angles + included side), AAS (two angles + non-included side), and SSA (the ambiguous case). It relates each side to the sine of its opposite angle. Limitation: for SSA, sin(B) = b·sin(A)/a can produce two valid angles (B and 180°−B) - you must check both for triangle validity.
Heron's formula calculates triangle area from all three sides, with no height required: Area = √(s(s−a)(s−b)(s−c)), where s = (a+b+c)/2 is the semi-perimeter. Example: triangle with sides 5, 6, 7. s = (5+6+7)/2 = 9. Area = √(9×4×3×2) = √216 ≈ 14.70. Heron's formula is especially useful when you know all three sides but no angles or heights - for example, when solving SSS triangles or verifying area after solving with the Law of Cosines.
SSA (two sides and a non-included angle) is called ambiguous because the given information can describe zero, one, or two different triangles. Using Law of Sines: sin(B) = b·sin(A)/a. If sin(B) > 1: no triangle exists (impossible). If sin(B) = 1: exactly one right triangle. If sin(B) < 1 and angle A is acute: two possible triangles - B₁ = arcsin(sin(B)) and B₂ = 180°−B₁. Both are potentially valid; check that B₂ + A < 180° for the second solution to exist. If angle A is obtuse: at most one triangle (B must also be less than 90° for A+B < 180°).
The inradius (r) is the radius of the incircle - the largest circle that fits completely inside the triangle, tangent to all three sides. Formula: r = Area ÷ s, where s is the semi-perimeter. The centre of the incircle (the incentre) is equidistant from all three sides. For a 3-4-5 right triangle: Area = 6, s = 6, r = 1. For an equilateral triangle with side a: r = a/(2√3) = a·√3/6.
The circumradius (R) is the radius of the circumcircle - the unique circle that passes through all three vertices of the triangle. Formula: R = (a × b × c) ÷ (4 × Area). By the Law of Sines: a/sin(A) = 2R. For any right triangle, R equals exactly half the hypotenuse - because the right angle inscribes the hypotenuse as a diameter of the circumcircle. For a 3-4-5 right triangle: R = (3×4×5)/(4×6) = 2.5 = 5/2.
No - the Triangle Inequality must be satisfied. All three conditions must hold: a+b > c, a+c > b, and b+c > a. In plain terms: the sum of any two sides must be strictly greater than the third side. If any condition fails, no triangle can be formed. Examples: (3, 4, 5) → 3+4=7>5 ✓, 3+5=8>4 ✓, 4+5=9>3 ✓ → valid (right triangle). (1, 2, 10) → 1+2=3 < 10 ✗ → no triangle possible. (5, 5, 10) → 5+5=10, not strictly greater → degenerate (flat line, not a real triangle).

Triangle Calculator - Solve Any Triangle with Step-by-Step Workings

Every triangle problem reduces to one question: what do you already know, and what do you need to find? This calculator covers all five standard input combinations - SSS, SAS, ASA, AAS and SSA - and applies the correct formula automatically. You get not just the answer, but the full step-by-step working so you can understand and reproduce the solution, not just copy a number.

Which mode to choose: Know all 3 sides SSS (Law of Cosines) · Know 2 sides + included angle SAS (Law of Cosines) · Know 2 angles + included side ASA (Law of Sines) · Know 2 angles + non-included side AAS (Law of Sines) · Know 2 sides + non-included angle SSA (ambiguous case) · Know only right angle + 2 values Right Triangle tab

The Core Triangle Formulas - What Each One Does

Area Formulas

  • Base and height: Area = ½ × b × h. Simplest - but height must be perpendicular to the base
  • Heron's formula (3 sides): Area = √(s(s−a)(s−b)(s−c)), s = (a+b+c)/2. No height needed
  • SAS (2 sides + included angle): Area = ½ × a × b × sin(C)
  • Right triangle: Area = ½ × leg₁ × leg₂
  • Equilateral (side s): Area = (√3/4) × s²

🔺 Solving Formulas

  • Law of Cosines: c² = a² + b² − 2ab·cos(C). Use for SSS and SAS
  • Law of Sines: a/sin(A) = b/sin(B) = c/sin(C). Use for ASA, AAS, SSA
  • Pythagorean theorem: a² + b² = c² (right triangles only)
  • Angle sum: A + B + C = 180°. Always - find the third angle once two are known
  • Inradius: r = Area ÷ s (s = semi-perimeter)
  • Circumradius: R = (a × b × c) ÷ (4 × Area)

How to Solve Each Triangle Type - Step by Step

SSS (three sides known): Use the Law of Cosines to find any one angle first: cos(C) = (a² + b² − c²) / (2ab). Then use the Law of Sines for the second angle: sin(B)/b = sin(C)/c. Third angle from A + B + C = 180°. Area from Heron's formula.

SAS (two sides and included angle): Use Law of Cosines to find the third side: c² = a² + b² − 2ab·cos(C). Then use Law of Sines for the remaining angles. Area = ½ × a × b × sin(C).

ASA (two angles and included side): Find third angle: C = 180° − A − B. Use Law of Sines to find remaining sides: a = c × sin(A)/sin(C) and b = c × sin(B)/sin(C). Area from Heron's or base-height method.

AAS (two angles and non-included side): Same start as ASA - find third angle first. Then Law of Sines to find remaining two sides. Area from any method once all sides are known.

SSA - the ambiguous case: Two sides and a non-included angle can produce zero, one, or two valid triangles. Use Law of Sines to find sin(B): sin(B) = b × sin(A) / a. If sin(B) > 1: no triangle exists. If sin(B) = 1: one right triangle. If sin(B) < 1 and A is acute: potentially two triangles - B₁ = arcsin(sin(B)) and B₂ = 180° − B₁. Always check both solutions for validity.

Triangle Types - Classification by Sides and Angles

  • Equilateral: All three sides equal. All three angles = 60°. Area = (√3/4)s². Most symmetric triangle type.
  • Isosceles: Two sides equal. The angles opposite the equal sides are also equal. A common exam and real-world shape.
  • Scalene: All three sides different lengths. All three angles different. The general triangle case.
  • Right triangle: One angle exactly 90°. Satisfies the Pythagorean theorem: a² + b² = c². The hypotenuse is always the longest side, opposite the right angle.
  • Obtuse triangle: One angle greater than 90°. The Law of Cosines gives a negative value for that angle's cosine. Only one obtuse angle is possible (angles must sum to 180°).
  • Acute triangle: All three angles less than 90°. All cosines are positive. The most common triangle type in geometry problems.

The Inradius and Circumradius - What They Mean

Every triangle has two notable circles associated with it:

  • Incircle (inradius r): The largest circle that fits entirely inside the triangle, touching all three sides. The centre (incentre) is equidistant from all three sides. Formula: r = Area ÷ s, where s is the semi-perimeter. For a 3-4-5 right triangle: s = 6, Area = 6, r = 6/6 = 1.
  • Circumcircle (circumradius R): The circle that passes through all three vertices of the triangle. The centre (circumcentre) is equidistant from all three vertices. Formula: R = (a × b × c) ÷ (4 × Area). By the Law of Sines: a/sin(A) = 2R. For a 3-4-5 right triangle: R = (3×4×5)/(4×6) = 60/24 = 2.5 - which equals half the hypotenuse (correct for all right triangles).

A useful relationship: for any right triangle, the circumradius always equals exactly half the hypotenuse. This is because a right angle always inscribes a semicircle - the hypotenuse is a diameter of the circumcircle.

Where Triangle Geometry Appears in the Real World

  • Construction and architecture: Roof trusses, bridge supports and structural frames are triangulated because triangles are the only polygon that is inherently rigid - no other shape maintains its form under load without additional internal supports
  • Navigation and GPS: Triangulation uses known distances between reference points (satellites or towers) to determine an unknown position - the same Law of Sines and Cosines used here
  • Surveying: Land boundaries and elevation maps are measured using triangulation from known baseline distances
  • Physics: Force vectors are resolved into components using right triangle geometry. Any two forces combine into a resultant calculated by the parallelogram (triangle) law
  • Computer graphics: All 3D objects in games and animation are built from triangulated meshes - every surface is broken into triangles because a triangle is always flat (three points define a unique plane)
  • Astronomy: Stellar parallax uses the triangle formed by Earth's orbit and a nearby star to calculate the star's distance - the same principle as surveying but on an astronomical scale

How this calculator works, and where the numbers come from

The Triangle Calculator applies the standard formula for this calculation to the values you enter and updates the result as you type. The calculation itself happens in your browser, and the page explains the method so you can check any result by hand.

Please note: Results are provided for general information and are calculated from the values you enter.

Sources and further reading

Last reviewed: by the CalcQube Editorial Team. See our editorial policy for how we build and check calculators, or report an error.