Triangle Calculator

Area6.0000
Perimeter12.0000
Side a3.0000
Side b4.0000
Side c5.0000
Angle A36.87deg
Angle B53.13deg
Angle C90.00deg

Give this calculator enough of a triangle and it solves the rest. From three sides (SSS), two sides and the included angle (SAS), or two angles and the included side (ASA), it returns the area, the perimeter, and all three sides and angles, using Heron’s formula, the law of cosines, and the law of sines as needed.

Formula

Area (SSS) = √(s(s−a)(s−b)(s−c)), s = (a+b+c)/2 ; Area (SAS) = ½·a·b·sin(C)

a, b, c
The three side lengths
s
The semi-perimeter, (a + b + c) / 2
C
The angle included between sides a and b (used in SAS)

How it works

  1. Choose the input mode: SSS (three sides), SAS (two sides plus the angle between them), or ASA (two angles plus the side between them). Angles are entered in degrees.
  2. In SSS mode the area comes from Heron’s formula and each angle from the law of cosines. In SAS mode the third side is found with the law of cosines and the area from ½·a·b·sin(C). In ASA mode the third angle is 180° minus the two given, and the law of sines scales the remaining sides.
  3. The result shows area, perimeter, and the complete set of three sides and three angles. Non-positive sides, or angles that cannot form a triangle, return no result.

Worked examples

Solve a triangle with sides 3, 4, and 5 (SSS mode).

  1. Semi-perimeter s = (3 + 4 + 5) / 2 = 6.
  2. Area = √(6 × (6−3) × (6−4) × (6−5)) = √(6 × 3 × 2 × 1) = √36 = 6.
  3. The law of cosines gives angles of about 36.87°, 53.13°, and 90° — a right triangle.

Area = 6, perimeter = 12, angles ≈ 36.87°, 53.13°, 90°

Solve a triangle with sides a = 5, b = 7, and included angle C = 45° (SAS mode).

  1. Third side c = √(5² + 7² − 2·5·7·cos45°) ≈ √24.50 ≈ 4.950.
  2. Area = ½ × 5 × 7 × sin45° ≈ 17.5 × 0.7071 ≈ 12.374.
  3. Remaining angles follow from the law of cosines: A ≈ 45.58°, B ≈ 89.42°.

Area ≈ 12.37, perimeter ≈ 16.95, third side ≈ 4.95

Frequently asked questions

What do SSS, SAS, and ASA mean?
They name which parts of the triangle you know: SSS is all three sides, SAS is two sides with the angle between them, and ASA is two angles with the side between them. Each combination uniquely determines a triangle, so the calculator can solve for everything else.
Why does it use Heron’s formula for three sides?
Heron’s formula finds the area directly from the three side lengths without needing a height or an angle. It uses the semi-perimeter s = (a+b+c)/2 and computes √(s(s−a)(s−b)(s−c)), which is ideal when only the sides are known.
When does the calculator return no result?
It returns nothing when the inputs cannot form a real triangle — for instance a non-positive side length, an angle of 0° or 180°, or three sides that violate the triangle inequality (where one side is longer than the other two combined).
Are angles in degrees or radians?
All angles are entered and returned in degrees. Internally the calculator converts to radians for the trigonometric functions, but you never need to do that conversion yourself.