Triangle Calculator

Solve any triangle by entering known sides and angles. Instantly calculate missing measurements, area, perimeter, heights, medians, radii, coordinates, and more.

Enter any 3 values

Provide 3 values with at least one side. Combinations supported: SSS, SAS, ASA, AAS, SSA.

units
units
units
°
°
°

Extra triangle tools

Degrees ↔ Radians

°
rad

60° × (π / 180)

Angle sum checker

°
°
°

Sum = 180° — valid triangle.

Triangle inequality checker

Forms a valid triangle (each pair sums above the third).

Missing side finder (SAS)

°

Third side ≈ 4.950003

What is a triangle?

A triangle is the simplest closed polygon — three straight sides meeting at three vertices to enclose a region of the plane. Every triangle has exactly three interior angles that always sum to 180°, no matter how the sides are arranged, and every pair of sides obeys the triangle inequality: the sum of any two side lengths must exceed the third.

Out of those constraints come the formulas that govern just about every measurement in plane geometry: the Law of Sines, the Law of Cosines, Heron's formula, and the three classical centres — the centroid, incenter, and circumcenter — each defined by a different intersection of lines drawn through the vertices.

This calculator solves any triangle from any valid combination of three measurements (sides and/or angles), and returns sides, angles, area, perimeter, altitudes, medians, inradius, circumradius, vertex coordinates, and full step-by-step working.

How the triangle solver works

Pick three knowns

Enter any 3 of the 6 measurements — a, b, c for the sides and A, B, C for the angles opposite each side. At least one side is required (three angles alone underdetermine size).

Choose your case

The solver recognises every classical case: SSS (three sides), SAS (two sides + included angle), ASA / AAS (one side + two angles), and SSA (two sides + a non-included angle, the ambiguous case).

Apply the right law

Law of Cosines handles SSS and SAS by solving for missing sides or angles algebraically. Law of Sines handles ASA, AAS, and SSA by pairing each side with the sine of its opposite angle.

Derive everything else

Once all six measurements are known, Heron's formula gives the area, h = 2·Area / side gives each altitude, the median formula gives each median, and r = Area/s, R = a / (2·sin A) give the inradius and circumradius.

Ways to use this calculator

1

Find missing sides

Give two sides and the angle between them, and the calculator returns the third side via the Law of Cosines together with the remaining two angles.

2

Find missing angles

Enter all three sides and the solver inverts the Law of Cosines to recover each angle to four decimal places, then classifies the triangle as acute, right, or obtuse.

3

Compute area

Give any valid combination — three sides, two sides + included angle, or vertex coordinates — and the calculator returns the area via Heron's formula, ½·ab·sin C, or the shoelace formula.

4

Plot triangle centres

Vertex coordinates are placed in a canonical frame (A at origin, B on the x-axis) and the four classical centres — centroid, incenter, circumcenter, orthocenter — are computed exactly.

5

Classify a triangle

The solver labels the triangle by sides (Equilateral, Isosceles, Scalene) and by angles (Acute, Right, Obtuse) in a single label like "Right Scalene Triangle".

6

Step-through worked solutions

Every calculation expands into a numbered sequence of formulas and substituted values — useful for homework, tutoring, and self-checking.

Best practices

Always supply one side

Three angles fix the shape but not the size — without at least one length, you can scale the triangle freely. The solver enforces this.

Watch the triangle inequality

If a + b ≤ c (or any cyclic permutation), no triangle exists. The calculator flags this with a clear error rather than producing nonsense.

Use radians for advanced inputs

Toggle the angle unit and you can type expressions like pi/3 or 2pi/5 directly.

Beware of the SSA ambiguous case

Two sides + a non-included angle can yield zero, one, or two valid triangles. The solver returns the acute solution — re-check the obtuse alternative when applicable.

Why triangles matter

Triangles are the structural unit of nearly every visual and engineering discipline. Architecture uses triangulated trusses because three points are the smallest set that defines a rigid plane; surveying relies on triangulation to fix landmarks from distance measurements; navigation uses spherical triangles to find positions on the globe; and computer graphics represents every 3D surface as a mesh of triangles because GPUs can interpolate over them efficiently.

Inside mathematics, every polygon can be decomposed into triangles, every circle can be approximated by an inscribed or circumscribed polygon of triangles, and every trigonometric identity ultimately traces back to a relationship between the sides and angles of a triangle.

Tricky cases to watch

SSA — two sides and an opposite angle

Depending on whether the given angle is acute or obtuse and how long the opposite side is, this can produce no triangle, one triangle, or two. The solver returns the acute solution; check both whenever the input side is shorter than the side opposite the given angle.

Degenerate triangles

When a + b is only slightly greater than c, the triangle collapses to nearly a line and the area approaches zero. Angles A and B become very small while C approaches 180°.

Right-triangle special cases

If one angle is exactly 90°, the side opposite is the hypotenuse and the Pythagorean theorem applies — use the Right Triangle Calculator for trigonometric ratios and direct hypotenuse solving.

Equilateral and isosceles shortcuts

All-equal-sides triangles have closed-form area (√3/4)·a² and height (√3/2)·a; isosceles triangles drop a perpendicular to the base to give a fast height computation. See the Isosceles & Equilateral tab.

Core triangle formulas

Law of Sines

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

Each side over the sine of its opposite angle equals twice the circumradius.

Law of Cosines

c² = a² + b² − 2ab·cos(C)

Solves the third side from two sides and the included angle (SAS).

Heron's formula

Area = √[s(s−a)(s−b)(s−c)]

Uses only the three side lengths, where s = (a+b+c)/2.

Area (base × height)

Area = ½ · base · height

Area (SAS)

Area = ½ · a · b · sin(C)

Altitude

h_a = 2·Area / a

Median

m_a = ½ · √(2b² + 2c² − a²)

Inradius

r = Area / s

Circumradius

R = a / (2·sin A) = abc / (4·Area)

Angle sum

A + B + C = 180°

Common mistakes

  • Mixing degrees and radians

    Calculator and spreadsheet trig functions default to radians. Always confirm your angle unit before substituting — a 60 you meant as degrees is 0.95 in radians.

  • Wrong correspondence between side and opposite angle

    Side a is opposite vertex A, not adjacent to it. Mislabelling causes the Law of Cosines to return the wrong angle.

  • Forgetting the absolute value in coordinate area

    The shoelace formula yields a signed area — negative if vertices are listed clockwise. Always wrap in |·|.

  • Using base × height without the right base–altitude pair

    An altitude must be perpendicular to its own base. Don't multiply side a by altitude h_b.

Sources and accuracy

All formulas implemented here are standard Euclidean-geometry identities — Law of Sines, Law of Cosines, Heron's formula, the standard median and altitude expressions, and the canonical placements for the centroid, incenter, circumcenter, and orthocenter. Floating-point results are rounded to four decimal places by default; internal precision is double (≈15 significant digits).

References: Geometry Revisited by Coxeter and Greitzer; CRC Standard Mathematical Tables; Wikipedia: Triangle; Wikipedia: Law of Cosines.

Frequently asked questions

Given any three independent measurements — at least one of them a side — the calculator returns every other measurement: the three sides, the three angles, the area (via Heron's formula), the perimeter, the semiperimeter, the three altitudes (h_a, h_b, h_c), the three medians (m_a, m_b, m_c), the inradius and circumradius, the vertex coordinates, and the four classical centres (centroid, incenter, circumcenter, orthocenter). It also classifies the triangle as Equilateral / Isosceles / Scalene by sides and Acute / Right / Obtuse by angles.

These are the five ways three measurements can fix a triangle. SSS = three sides (the Law of Cosines recovers each angle). SAS = two sides and the angle between them (Law of Cosines finds the third side, then Law of Sines or Cosines finds the remaining angles). ASA / AAS = one side plus two angles (the third angle is 180° minus the others, then Law of Sines scales the remaining sides). SSA = two sides plus an angle not between them — the ambiguous case, which can have zero, one, or two valid solutions. This calculator handles all five cases and clearly flags the ambiguous SSA scenario.

It's a consequence of Euclid's parallel postulate. Draw a line through any vertex parallel to the opposite side; the three angles at that vertex equal the three interior angles of the triangle and together they form a straight line — which is 180°. On a sphere or hyperbolic surface the rule breaks (the sum exceeds or falls below 180°), but on the flat plane every triangle obeys A + B + C = 180°.

For any triangle with sides a, b, c, the sum of any two sides must exceed the third: a + b > c, b + c > a, and a + c > b. If even one of these inequalities fails (or holds with equality), the three lengths cannot form a triangle — they collapse to a line or fail to close. The calculator checks all three before solving and returns a clear error if they are violated.

By Heron's formula: compute the semiperimeter s = (a + b + c) / 2, then Area = √[s · (s − a) · (s − b) · (s − c)]. No angles needed. For instance, a (3, 4, 5) right triangle has s = 6 and Area = √[6·3·2·1] = √36 = 6. For triangles where you already know an angle, the SAS form ½·a·b·sin C is often faster.

An altitude from a vertex is the perpendicular line segment from that vertex to the line containing the opposite side. A median from a vertex is the line segment from the vertex to the midpoint of the opposite side. They coincide only in equilateral and isosceles triangles. Altitudes intersect at the orthocenter; medians intersect at the centroid (the triangle's centre of mass).

The inradius r is the radius of the largest circle that fits inside the triangle and touches each side once — its centre is the incenter, equidistant from all three sides. The formula is r = Area / s, where s is the semiperimeter. The circumradius R is the radius of the unique circle that passes through all three vertices — its centre is the circumcenter, equidistant from all three vertices. R = a / (2 · sin A) = abc / (4 · Area).

When you give two sides and an angle opposite one of them, the Law of Sines may yield two valid angles (an acute one and an obtuse one) whose sines are equal. Depending on the side lengths this gives zero, one, or two real triangles. This calculator returns the acute solution by default; you should always sanity-check whether the obtuse alternative is geometrically possible (it is when the given side is shorter than the side opposite the given angle).

Yes — toggle the angle unit at the bottom of the input card. In radians mode you can type expressions like pi/3, 2*pi/5, or numeric radians like 1.047. The calculator converts internally and labels the displayed angles back in your chosen unit.

The vertex coordinates use a canonical frame — A at the origin, B on the positive x-axis at (c, 0), C in the upper half-plane — so all four centres (centroid, incenter, circumcenter, orthocenter) come out as definite (x, y) pairs. You can drop them straight into CAD, drafting, or graphics software, or use them to verify geometric identities like the Euler line (centroid, circumcenter, and orthocenter are colinear with the centroid dividing the segment 1:2).