Home Math Triangle Calculator

Triangle Calculator

Solve a triangle from two sides and the angle between them: the third side, the area, the perimeter and the other two angles.

Advertisement

How it works

Enter two sides and the angle between them (this case is called SAS). The third side comes from the law of cosines, the area from half the product of the two sides times the sine of the angle, and the remaining angles from the law of sines and the fact that a triangle's angles add up to 180°.

Advertisement

Formula

Third side: c = sqrt(a² + b² − 2·a·b·cos C).
Area = a × b × sin C ÷ 2.
Perimeter = a + b + c.
Angle A from the law of sines: sin A ÷ a = sin C ÷ c.
Angle B = 180° − A − C.

Example

Example in plain words. Sides a = 5 and b = 6, with 60° between them.

Third side: c = sqrt(25 + 36 − 2 × 5 × 6 × cos 60°) = sqrt(31) = 5.568.

Area: 5 × 6 × sin 60° ÷ 2 = 12.99. Perimeter: 5 + 6 + 5.568 = 16.568.

Angles: A = 51.05°, B = 180 − 60 − 51.05 = 68.95°.

Frequently asked questions

What is the law of cosines?

It links the three sides and one angle: c² = a² + b² − 2·a·b·cos C. When C is 90° it becomes the Pythagorean theorem.

Can any positive sides and angle make a triangle?

With two sides and the angle strictly between 0° and 180°, yes, exactly one triangle exists.

Advertisement

Related calculators

Percentage Calculator

Find a percent of a number, what percent one number is of another, and percent change, all at once.

Fraction Calculator

Add, subtract, multiply and divide fractions, with the answer simplified.

Scientific Calculator

Online scientific calculator with trig, logs, powers, roots, factorial and degree or radian mode.

Quadratic Formula Calculator

Solve ax² + bx + c = 0, with the discriminant and the vertex.