Triangle Calculator — Area, Angles & Perimeter
Solve any triangle from three sides (SSS), two sides and the included angle (SAS), or two angles and a side (ASA/AAS) — area, perimeter and all three angles, with every step shown. The classic 3-4-5 right triangle has area 6, not 10: (3 × 4)/2 = 6, and Heron's formula agrees — s = 6, area = √(6 × 3 × 2 × 1) = 6.
Triangle Calculator: SSS, SAS & ASA/AAS
Pick the mode that matches what you already know. Calculations run in your browser.
What Is a Triangle Calculator?
A triangle calculator finds the missing pieces of any triangle. Give it three sides (SSS) and it uses Heron's formula for the area and the law of cosines for the angles; give it two sides and the angle between them (SAS) and it finds the third side with the law of cosines; give it two angles and a side (ASA/AAS) and it finds the rest with the law of sines. Every answer comes with the step-by-step working so you can verify it by hand — including the famous trap: the area of a 3-4-5 triangle is 6, not 10.
How to Use the Triangle Calculator
The tool has three modes so you can start with whatever you already know.
- Choose a mode that matches your problem (or tap a preset to load a worked example).
- Enter your numbers — sides in any unit, angles in degrees.
- Select Calculate to generate the result cards.
- Read the note under the cards for the step-by-step working and a check you can verify by hand.
The built-in check re-derives the area a second way — Heron's formula against ½ × base × height, or against ½ab·sin C — and confirms the three angles add to exactly 180°, so a wrong keystroke shows up immediately.
What Is a Triangle?
A triangle is a three-sided polygon: three straight sides meeting at three corners (vertices), with three interior angles that always add to 180°. It is the simplest polygon — and the one every other polygon is built from, since any polygon can be split into triangles. Triangles are named by their sides and by their angles: equilateral (all sides equal, all angles 60°), isosceles (two sides equal, two angles equal), scalene (no sides equal), right (one 90° angle), acute (all angles under 90°) and obtuse (one angle over 90°).
| Type | Sides | Angles | Example |
|---|---|---|---|
| Equilateral | All three equal | All 60° | 6, 6, 6 — area 15.5885 |
| Isosceles | Two equal | Two equal | 5, 5, 6 — area 12 |
| Scalene | All different | All different | 7, 8, 9 — area 26.8328 |
| Right | Hypotenuse longest | One 90° | 3, 4, 5 — area 6 |
| Acute | Any | All under 90° | 7, 8, 9 — largest angle 73.40° |
| Obtuse | Longest opposite the big angle | One over 90° | 2, 3, 4 — largest angle 104.48° |
Heron's Formula — Area From Three Sides
When you know all three sides but no height, use Heron's formula: first find the semi-perimeter s = (a + b + c)/2, then area = √(s(s − a)(s − b)(s − c)). For 3-4-5: s = 6, area = √(6 × 3 × 2 × 1) = √36 = 6. For 5-5-6: s = 8, area = √(8 × 3 × 3 × 2) = √144 = 12. For 13-14-15: s = 21, area = √(21 × 8 × 7 × 6) = √7056 = 84.
The Law of Cosines and the Law of Sines
The law of cosines finds a missing side or angle when you know two sides and the angle between them: c² = a² + b² − 2ab·cos C. It is the Pythagorean theorem with a correction term — when C = 90°, cos C = 0 and it becomes a² + b² = c². The law of sines links sides to the sines of their opposite angles: a/sin A = b/sin B = c/sin C. It is the tool for ASA/AAS: with two angles and one side, every other side follows from one division.
Triangle Calculator Worked Examples
Every row below is computed exactly — hand-verified in Python — so you can check each one by hand.
| Task | Working | Answer |
|---|---|---|
| 3-4-5 area (SSS) | (3 × 4)/2; Heron: √(6 × 3 × 2 × 1) | 6 |
| 3-4-5 angles | arcsin(3/5), arcsin(4/5), right angle | 36.87°, 53.13°, 90° |
| 5-5-6 area (SSS) | Heron: √(8 × 3 × 3 × 2) = √144 | 12 |
| 7-8-9 area (SSS) | Heron: √(12 × 5 × 4 × 3) = √720 | 26.8328 |
| 13-14-15 area (SSS) | Heron: √(21 × 8 × 7 × 6) = √7056 | 84 |
| SAS 5, 7, 60° third side | c² = 25 + 49 − 35 = 39 | 6.2450 |
| SAS 5, 7, 60° area | ½ × 5 × 7 × sin 60° | 15.1554 |
| ASA 30°, 60°, side 10 | a = 10 × sin 30° = 5; b = 10 × sin 60° | a = 5, b = 8.6603 |
| ASA 30°, 60°, side 10 area | ½ × 5 × 8.6603 × sin 90° | 21.6506 |
| 6, 6, 60° (SAS) | c² = 36 + 36 − 36 = 36 | Equilateral: c = 6, area 15.5885 |
The 3-4-5 Triangle: Why the Area Is 6, Not 10
The trap is treating the hypotenuse as a height. The area formula needs a base and the height perpendicular to that base: area = ½ × base × height. With base 3, the height is 4 (the side at right angles to it); with base 4, the height is 3. Either way: ½ × 3 × 4 = 6. Using 5 as the "height" gives ½ × 4 × 5 = 10 — but 5 is slanted, not perpendicular, so 10 is wrong. Heron's formula settles it independently: s = 6, area = √(6 × 3 × 2 × 1) = 6.
SAS: Two Sides and the Angle Between Them
Given sides 5 and 7 with a 60° angle between them, the law of cosines finds the third side: c² = 5² + 7² − 2 × 5 × 7 × cos 60° = 25 + 49 − 35 = 39, so c = 6.2450. The area needs no third side at all: ½ × 5 × 7 × sin 60° = 15.1554. Heron's formula on 5, 7, 6.2450 gives the same 15.1554 — the two routes agree, which is the calculator's built-in check.
How to Solve a Triangle Step by Step
Follow this recipe for the classic example — the 3-4-5 right triangle, SSS mode.
- Check it exists: 3 + 4 = 7 > 5, 3 + 5 = 8 > 4, 4 + 5 = 9 > 3 — the triangle inequality holds.
- Find the semi-perimeter: s = (3 + 4 + 5)/2 = 6.
- Apply Heron: area = √(6 × (6−3) × (6−4) × (6−5)) = √(6 × 3 × 2 × 1) = √36 = 6.
- Cross-check with base × height: ½ × 3 × 4 = 6 — the two methods agree.
- Find the angles: the angle opposite the 5 is 90° (check: 3² + 4² = 9 + 16 = 25 = 5²). The others are arcsin(3/5) = 36.87° and arcsin(4/5) = 53.13°.
- Check the sum: 90 + 36.87 + 53.13 = 180° ✓
Common Mistakes With Triangles
1. Using the hypotenuse as the height — the #1 trap
For a 3-4-5 triangle, ½ × 4 × 5 = 10 looks right and is wrong. The height must be perpendicular to the base. The hypotenuse is slanted, so it is never the height. The correct area is ½ × 3 × 4 = 6 — and Heron confirms it.
2. Forgetting the triangle inequality
Sides 1, 2 and 10 cannot form a triangle: 1 + 2 = 3 < 10, so the two short sides cannot even meet. Always check that each side is shorter than the sum of the other two before calculating.
3. Using the wrong angle in SAS
The SAS area formula ½ab·sin C needs the angle between sides a and b. Using a different angle gives a different (wrong) area. The law of cosines has the same rule: the angle in c² = a² + b² − 2ab·cos C is the one opposite side c.
4. Mixing up the law of sines and the law of cosines
Use the law of sines (a/sin A = b/sin B) when you know an angle and its opposite side — the ASA/AAS case. Use the law of cosines when you know two sides and the angle between them — the SAS case. Swapping them is the most common setup error.
5. Angles that do not add to 180°
If your three angles add to anything other than 180°, at least one is wrong. It is the fastest check in triangle work — run it before trusting any answer.
6. Degrees vs radians
Most calculators and code default to radians. sin(60°) = 0.8660, but sin(60 radians) = −0.3048. If your area comes out negative or wildly wrong, check the angle mode first.
Benefits and Limitations
Benefits
- Solves any triangle from SSS, SAS or ASA/AAS with area, perimeter and all three angles.
- Every answer carries the step-by-step working — Heron, law of cosines, law of sines — so homework can be checked by hand.
- The triangle-inequality check rejects impossible triangles (1, 2, 10) instead of returning nonsense.
- The angle-sum check (180°) catches wrong inputs immediately.
- 30-60-90 and 45-45-90 shortcuts are explained, not just computed.
- Responsive on phones, tablets and desktops.
Limitations
- Flat (Euclidean) triangles only — angles always sum to 180°; spherical triangles are not covered.
- Results use JavaScript floating-point arithmetic, so angles and areas are rounded to 4 decimal places.
- SSA (two sides and a non-included angle) is not included — it can have zero, one or two solutions (the ambiguous case).
Quick Definitions
| Question | Direct Answer |
|---|---|
| What is a triangle calculator? | A tool that solves a triangle from SSS, SAS or ASA/AAS — returning area, perimeter and all three angles. 3-4-5 gives area 6, perimeter 12, angles 90°, 36.87°, 53.13°. |
| What is Heron's formula? | Area = √(s(s−a)(s−b)(s−c)), where s = (a+b+c)/2 is the semi-perimeter. For 3-4-5: s = 6, area = √(6 × 3 × 2 × 1) = 6. |
| What is the area of a 3-4-5 triangle? | 6 square units: (3 × 4)/2 = 6. Not 10 — 5 is the hypotenuse, never the height. |
| What are the angles of a 3-4-5 triangle? | 90°, 36.87° and 53.13°. The right angle is opposite the longest side (5). |
| What is the law of cosines? | c² = a² + b² − 2ab·cos C. It finds a missing side from two sides and the included angle, or an angle from three sides. |
| What is the law of sines? | a/sin A = b/sin B = c/sin C. It finds missing sides from two angles and one side (ASA/AAS). |
| Do triangle angles add to 180°? | Yes — the three interior angles of any flat triangle add to exactly 180°. |
| What is the triangle inequality? | Each side must be shorter than the sum of the other two (a+b>c, a+c>b, b+c>a). Sides 1, 2, 10 fail it — no such triangle exists. |
Frequently Asked Questions
What is the area of a 3-4-5 triangle?
6 square units. Area = (3 × 4)/2 = 6. The answer is not 10 — 5 is the hypotenuse, never the height. Heron's formula agrees: s = 6, area = √(6 × 3 × 2 × 1) = 6.
How do you find the area of a triangle with three sides?
Use Heron's formula: s = (a+b+c)/2, then area = √(s(s−a)(s−b)(s−c)). For 3-4-5, s = 6 and area = √(6 × 3 × 2 × 1) = 6. For 5-5-6, s = 8 and area = √(8 × 3 × 3 × 2) = 12.
What are the angles of a 3-4-5 triangle?
90°, 36.87° and 53.13°. The right angle is opposite the longest side (5). The other two are arcsin(3/5) = 36.87° and arcsin(4/5) = 53.13° — and 90 + 36.87 + 53.13 = 180°.
How do you find the third side with SAS?
Use the law of cosines: c² = a² + b² − 2ab·cos C. For sides 5 and 7 with a 60° included angle, c² = 25 + 49 − 35 = 39, so c = 6.2450. The area is then ½ × 5 × 7 × sin 60° = 15.1554.
Do the angles of a triangle always add to 180 degrees?
Yes. The three interior angles of any flat triangle add to exactly 180°. If your three angles do not add to 180°, at least one of them is wrong — it is the fastest check in triangle work.
Why is my triangle invalid?
The triangle inequality failed. Each side must be shorter than the sum of the other two. Sides 1, 2 and 10 fail because 1 + 2 = 3, which is less than 10 — the two short sides cannot meet, so no such triangle exists.
Related Math Tools
Triangle Calculator Methodology
This calculator derives every answer from the standard triangle formulas, using JavaScript floating-point arithmetic (angles and areas rounded to 4 decimal places).
SSS mode validates the triangle inequality (a+b>c, a+c>b, b+c>a) before computing, then finds the area with Heron's formula and the angles with the law of cosines (arccos of each side combination), which avoids the ambiguous case of the law of sines. SAS mode finds the third side with the law of cosines, the area with ½ab·sin C, and the remaining angles with the law of cosines. ASA/AAS mode finds the third angle as 180° minus the two known angles, then the missing sides with the law of sines, and the area with ½ab·sin C. Every result carries the angle-sum check (A+B+C = 180°) and an independent area cross-check (Heron against base × height or ½ab·sin C). Inputs must be positive sides and angles strictly between 0° and 180°, with A+B < 180° in ASA/AAS mode; anything else is rejected before any calculation. The page is intended as an educational calculator and verification tool.
Mathematical References
Solve It, Don't Guess It
Enter your triangle above — find its area, perimeter and all three angles, with every step shown.
Use Triangle Calculator