CalculatorSwitch
Calculator Switch
Math

Triangle Calculator

Last updated:

How to Use This Calculator

Step 1: Fill any 3 of the 6 fields (sides a, b, c and angles A, B, C). At least one field must be a side — angles alone don't fix the triangle's size.

Step 2: Switch the angle unit to radians if you want to enter values like `pi/2` or `pi/4`. Degrees is the default.

Step 3: Click Calculate. The calculator auto-detects which case applies (SSS, SAS, ASA, AAS, or SSA) and returns area, perimeter, all sides, all angles, and the triangle's type.

Triangle Basics

A triangle is a three-sided polygon with three angles that always sum to 180 degrees. Triangles are classified by their sides (equilateral, isosceles, scalene) and by their angles (acute, right, obtuse).

Triangles are the simplest polygon and the most rigid — they cannot be deformed without changing side lengths. This makes them essential in structural engineering: bridges, roof trusses, and geodesic domes rely on triangular shapes for stability.

Knowing any three independent measurements (three sides, or two sides and an angle, etc.) fully determines a triangle.

Triangle Formulas

Base-height area: A = ½ × base × height

Heron's formula (three sides):
s = (a + b + c) / 2
A = √[s(s−a)(s−b)(s−c)]

Law of cosines (angle opposite side a):
cos(A) = (b² + c² − a²) / (2bc)

Example: Sides 5, 6, 7
s = 9
Area = √[9 × 4 × 3 × 2] = √216 ≈ 14.697

Triangle Classification

TypeBy SidesBy Angles
EquilateralAll sides equalAll 60°
IsoscelesTwo sides equalTwo angles equal
ScaleneAll sides differentAll angles different
RightOften 3-4-5One 90° angle
AcuteVariesAll angles < 90°
ObtuseVariesOne angle > 90°

Examples

Example 1: Sides 3, 4, 5 → area 6, perimeter 12, type Scalene Right (classic Pythagorean triple).

Example 2: Sides 6, 6, 6 → area 15.588, perimeter 18, type Equilateral (all angles 60°).

Example 3: Base 10 and height 4 → area 20 (base-height mode).

Tips

Triangle inequality: Each side must be less than the sum of the other two.

Heron's formula works for any triangle when you know three sides.

Angles always sum to 180° — useful check.

Equilateral = all angles 60°. Quickest to spot.

Frequently Asked Questions

What is the triangle inequality?
The triangle inequality states that the sum of any two sides of a triangle must be greater than the third side. If you try to construct a triangle where this fails — say, sides 2, 3, and 10 — the two shorter sides cannot physically reach to meet, so no triangle exists. The calculator checks this automatically and shows an error for impossible side combinations.
How does Heron's formula work?
Heron's formula lets you compute a triangle's area from just its three side lengths, without needing to know any angles or heights. First compute the semi-perimeter s, which is half the perimeter. Then the area equals the square root of s times (s minus a) times (s minus b) times (s minus c). The formula dates to around 60 CE and is credited to Hero of Alexandria, though it was likely known earlier.
Why do the angles of a triangle always sum to 180 degrees?
This is a fundamental property of Euclidean (flat) geometry. You can visualize it by drawing a line through one vertex parallel to the opposite side — the angles on either side of that line, together with the angle at the vertex, form a straight line of 180 degrees. Note that this only applies to triangles on flat surfaces. On a sphere (like Earth), triangle angles sum to more than 180 degrees; on a saddle shape, less.
What is the difference between an isosceles and equilateral triangle?
An equilateral triangle has all three sides equal (and therefore all three angles equal at 60 degrees). An isosceles triangle has at least two sides equal, which also makes two angles equal. Every equilateral triangle is technically isosceles (since all three sides are 'at least two equal'), but the terms are usually used exclusively in practice: isosceles means two equal sides, equilateral means three.
How do I find the height of a triangle when I only know the sides?
First use Heron's formula to find the area. Then the height relative to any chosen base is simply: height equals (2 times area) divided by base. For example, a triangle with sides 5, 6, and 7 has area about 14.697. The height measured from the side of length 7 is 2 times 14.697 divided by 7, which is about 4.199. Each of the three sides has a different height associated with it.
What is the Law of Cosines and how is it different from Pythagoras?
The Law of Cosines is a generalization of the Pythagorean theorem that works for any triangle, not just right triangles. It states c squared equals a squared plus b squared minus 2ab times the cosine of the angle C opposite side c. When angle C is 90 degrees, cosine equals zero and the formula reduces to the familiar c squared equals a squared plus b squared. This calculator uses the Law of Cosines to compute angles from the three side lengths.

Related Calculators

Was this useful?