Ihsabha
AREN
IhsabhaMathematics › Triangle Calculator

🔺 Triangle Calculator

Solve a triangle's angles, area, and perimeter from three sides (SSS) or two sides and an included angle (SAS).

📖 Law of Cosines & Heron's Formula
🛡️ Reviewed by: Ihsabha editorial team · Method: Standard geometric formulas for area, volume, and distance (the Pythagorean theorem, Euclidean shape formulas) · Last updated: August 2, 2026

How to use this tool

Fill in the fields on the left with your information, then press Calculate to see your result instantly. No sign-up required, and no data is sent anywhere — everything is calculated right in your browser.

About this calculator

The triangle calculator fully solves a triangle starting from two common types of available information. In the "three sides" (SSS) case, the Law of Cosines is used to calculate each angle from the three sides, and Heron's Formula is used to calculate the area directly from the sides without needing to know the height. In the "two sides and an included angle" (SAS) case, the Law of Cosines is also used to calculate the unknown third side, then the remaining angles and area are calculated. The calculator also verifies that the entered measurements actually form a valid triangle before performing any calculation. Heron's Formula is particularly useful because it sidesteps a common obstacle in triangle geometry: many real triangles do not have an easily measurable height, and finding one indirectly would otherwise require extra trigonometric steps before the area could even be calculated. The calculator's validity check guards against exactly this kind of bad input, since three side lengths where one is longer than the sum of the other two cannot form a real triangle at all.

Solving a Triangle From Just Three Sides: Heron's Formula and the Law of Cosines

The familiar area formula from school, half of base times height, is often impossible to apply directly to a real triangle: measuring a triangle's height usually requires first drawing a perpendicular line to a base, something that is easy on paper but rarely convenient with a physical object or a purely numerical set of side lengths. Heron's Formula solves this problem entirely, calculating a triangle's area directly from its three side lengths alone, with no height measurement required at any step.

Heron's Formula works by first calculating the triangle's 'semi-perimeter' (half of the total perimeter, commonly labeled s), then computing the square root of s multiplied by each of the three differences between s and a side length. Despite looking unrelated to the familiar base-times-height formula, Heron's Formula produces exactly the same area — it is simply a more algebraically involved route to the identical answer, one that happens to require only the three side lengths as input.

The Law of Cosines generalizes the Pythagorean theorem to triangles that are not right triangles. Where the Pythagorean theorem only applies when one angle is exactly 90 degrees, the Law of Cosines works for any triangle, of any shape, by adding a correction term involving the cosine of the included angle. When that angle happens to be exactly 90 degrees, cosine of 90 degrees equals zero, and the Law of Cosines correction term vanishes entirely — reducing exactly back to the familiar Pythagorean theorem, which is a special case rather than a separate, unrelated rule.

Given three side lengths (the SSS case), the Law of Cosines can be rearranged to solve for each of the triangle's three angles individually, fully 'solving' the triangle — determining every angle and every side. Given two sides and the angle between them (the SAS case), the same law directly calculates the length of the third, unknown side, after which the remaining two angles can be found.

Before performing any of these calculations, a valid triangle must actually be checked for: three side lengths only form a real triangle if each side is shorter than the sum of the other two — a rule known as the triangle inequality. Surveying, navigation, construction layout, and any field-measurement problem involving distances and angles that cannot be measured directly all rely on exactly these same tools to reconstruct a complete triangle from partial, practically measurable information.

Frequently asked questions

What does SSS and SAS mean?

SSS means you know all three sides of the triangle, while SAS means you know two sides and the angle directly between them.

Why does the calculator reject some side combinations?

Not every three lengths can form a real triangle — the triangle inequality requires that the sum of any two sides be greater than the third.

Can this calculator handle a right triangle?

Yes, entering sides like 3, 4, and 5 in SSS mode correctly identifies a 90° angle along with the other two angles.