ABC Triangle Calculator
Calculate all properties of any triangle: sides, angles, area, perimeter, heights, medians, inradius, circumradius, and notable points from any valid input combination.
About
Incorrect triangle dimensions propagate errors through every downstream calculation - structural loads, land surveys, CNC toolpaths, and navigation bearings all depend on precise trigonometric resolution. This calculator solves an arbitrary triangle from any valid combination of three known elements (sides a, b, c and angles A, B, C) using the Law of Cosines and the Law of Sines. It outputs all six primary elements plus derived properties: area via Heron's formula, altitudes, medians, angle bisector lengths, inradius r, circumradius R, and the coordinates of centroid, incenter, circumcenter, and orthocenter.
The tool enforces the triangle inequality (a + b > c) and validates that angles sum to 180° before solving. Ambiguous SSA cases (the "ambiguous case") are detected and both solutions are presented when they exist. Note: floating-point arithmetic limits precision to approximately 12 significant digits. For geodetic work on curved surfaces, a planar triangle solver introduces measurable error beyond baselines of roughly 10 km.
Formulas
The solver selects its algorithm based on the input combination. For three sides (SSS), it applies the Law of Cosines in angle-finding form. For combinations involving angles, it uses the Law of Sines and angle-sum property.
Law of Cosines (solving for angle):
C = arccos ( a2 + b2 − c22ab )Law of Cosines (solving for side):
c = √a2 + b2 − 2ab cos CLaw of Sines:
asin A = bsin B = csin CHeron's formula for area:
S = √s(s − a)(s − b)(s − c)Where a, b, c are sides opposite to angles A, B, C respectively. s = a + b + c2 is the semi-perimeter. S is the area. r is the inradius. R is the circumradius. ha, ma, ta are the altitude, median, and angle bisector to side a.
Reference Data
| Triangle Type | Condition | Angle Range | Special Properties |
|---|---|---|---|
| Equilateral | a = b = c | All 60° | All centers coincide; maximum area for given perimeter |
| Isosceles | Two sides equal | Two angles equal | Axis of symmetry through apex; altitude = median = bisector on base |
| Scalene | All sides different | All angles different | No symmetry; all centers distinct |
| Right | c2 = a2 + b2 | One angle = 90° | Circumcenter on hypotenuse midpoint; R = c/2 |
| Obtuse | One angle > 90° | 90° < max < 180° | Circumcenter outside triangle; orthocenter outside triangle |
| Acute | All angles < 90° | 0° < each < 90° | All centers inside triangle |
| Degenerate | a + b = c | One angle = 180° | Zero area; collinear points; not a valid triangle |
| Key Formulas & Constants | |||
| Heron's Area | S = √s(s − a)(s − b)(s − c) where s = (a + b + c)/2 | ||
| Law of Cosines | c2 = a2 + b2 − 2ab cos(C) | ||
| Law of Sines | asin A = bsin B = csin C = 2R | ||
| Inradius | r = Ss | ||
| Circumradius | R = abc4S | ||
| Height to side a | ha = 2Sa | ||
| Median to side a | ma = 12√2b2 + 2c2 − a2 | ||
| Bisector to side a | ta = 2bc cos(A/2)b + c | ||
| Euler's Relation | OI2 = R(R − 2r) where OI is distance between circumcenter and incenter | ||
| Max area (fixed perimeter) | Equilateral: Smax = √336 P2 | ||