Triangle Calculator
Enter three positive side lengths in the same unit to calculate perimeter, Heron area, all three angles and side-based classification. The triangle inequality is checked before a result appears.
Enter the three side lengths
Confirm the triangle inequality, side units and required measurement precision before using the area or angles.
Conditions for three sides to form a triangle
Each side must be positive, and every pair of sides must add to more than the remaining side. This triangle inequality prevents a collapsed line or an impossible gap. If 2, 3 and 5 are entered, 2 + 3 equals 5, so the shape has zero area and is not a proper triangle. The page requires a strict inequality and reports which comparison failed.
Measurements close to the boundary are sensitive to error. Three rounded lengths may appear valid even if the underlying points are nearly collinear. For construction or surveying, use instrument precision and the applicable tolerance rather than treating a tiny positive calculated area as proof of a robust physical triangle.
Perimeter and semiperimeter
Perimeter is a + b + c. It carries the same linear unit as the sides. The semiperimeter s is half of that total and appears in Heron’s formula. It is an intermediate value, not another edge length. With sides 3, 4 and 5, perimeter is 12 and semiperimeter is 6.
Perimeter can estimate edging or boundary length, but a real order may need overlaps, joints, waste and minimum pack sizes. If the three lengths are in metres, report perimeter in metres. Mixing millimetres and metres without conversion produces a number with no coherent unit even when the arithmetic runs.
Area from Heron’s formula
Heron’s formula calculates area as the square root of s(s−a)(s−b)(s−c). It needs only the three side lengths, making it useful when no height is given. For the 3–4–5 triangle, s = 6 and the product is 6×3×2×1 = 36, so area is 6 square units.
The area unit is squared: metres become square metres, centimetres become square centimetres. Converting area requires squaring the length conversion. One metre equals 100 centimetres, but one square metre equals 10 000 square centimetres. Apply conversion before entry or convert the final area with the correct squared factor.
Angles from the cosine rule
Angle A sits opposite side a. Rearranging the cosine rule gives cos A = (b² + c² − a²)/(2bc). The calculator applies the corresponding formula to A and B, then uses 180° − A − B for C. Small floating-point deviations are clamped to the valid cosine interval from −1 to 1.
The largest angle lies opposite the longest side. This provides a fast check on ordering. If side c is clearly the longest but angle C is not reported as the largest, the side labels or copied result are wrong. All three interior angles should total 180 degrees apart from display rounding.
Side and angle classifications
An equilateral triangle has three equal sides and three 60-degree angles. An isosceles triangle has at least two equal sides, while a scalene triangle has no equal sides. Because decimal measurements can differ by microscopic floating-point amounts, the script uses a small tolerance relative to the largest side for classification.
By angles, an acute triangle has every angle below 90 degrees, a right triangle has one 90-degree angle, and an obtuse triangle has one angle above 90 degrees. The default 3–4–5 sides form a scalene right triangle. Classification is a description of the entered values, not a guarantee that a physical build meets a regulated tolerance.
Right-triangle cross-check
When the longest side is c, a right triangle satisfies a² + b² = c². For 3, 4 and 5, 9 + 16 = 25. If the left side is greater than c², the largest angle is acute; if it is less, the largest angle is obtuse. This relation can cross-check the angle classification without evaluating inverse cosine.
The Pythagorean test requires the longest side to be treated as the hypotenuse candidate. Applying it to arbitrary label order without identifying the maximum can lead to a false conclusion. The page’s cosine calculation does not assume that side c is always longest.
Measurement and reporting practice
Use the same unit and keep more precision during calculation than in the final report. A side measured to the nearest centimetre should not lead to an area presented as exact to eight decimal places. The display offers detail for checking, but the user must round to the precision supported by the measurements.
For property boundaries, structural work, fabrication or compliance, coordinate geometry and professional survey or design standards may control. Curved ground, non-planar points and map projections can make a simple planar triangle inappropriate. The calculator handles Euclidean plane geometry only.
Finding a missing height
Once area K and a chosen base are known, the perpendicular height to that base follows from K = base × height / 2. Rearranging gives height = 2K/base. The height must meet the extended base at a right angle and is not generally equal to either remaining side. For an obtuse triangle, the perpendicular from an acute vertex can meet the extension of the opposite side outside the drawn segment.
The page does not display all three altitudes, but Heron area provides the shared numerator for each. Dividing twice the area by a, b or c gives the corresponding perpendicular height. Keep the same linear unit as the sides.
Similar triangles and scale
Similar triangles have equal corresponding angles and proportional corresponding sides. Multiplying every side by a scale factor k multiplies the perimeter by k and area by k². A drawing enlarged by a factor of 3 therefore has nine times the area, not three times. The angles and side-based classification remain unchanged.
This relationship is a strong check on calculator output. Double all three default sides from 3, 4 and 5 to 6, 8 and 10: perimeter doubles from 12 to 24, while area increases from 6 to 24. If only one side is changed, the triangles are not generally similar and that shortcut does not apply.
Coordinates and diagonal checks
If a triangle is defined by coordinates rather than measured sides, calculate each side with the distance formula before using this calculator. Coordinate units must match and map coordinates may require an appropriate projection. In a rectangular layout, the diagonal should satisfy the Pythagorean relationship with the two perpendicular edges; comparing diagonal measurements is a common squareness check.
A matching diagonal does not by itself confirm every construction tolerance. Instrument calibration, level, material movement and the specified standard remain relevant.
Near-degenerate triangles
When the two shorter sides add to only slightly more than the longest, the area is small and one angle is close to 180 degrees. Heron’s factors then include a very small difference, making relative error more noticeable. Re-measure and avoid over-interpreting the last displayed digits. For robust design, geometry that depends on a nearly collapsed triangle may need a larger margin from the boundary.
Questions that affect this result
Why are sides 2, 3 and 5 rejected?
The two shorter sides add exactly to the longest, creating a collapsed line with zero area. A proper triangle needs each pair to sum to more than the remaining side.
Which angle corresponds to side a?
Angle A is opposite side a. The same opposite-side convention applies to B and b, and C and c.
Can I mix centimetres and metres?
No. Convert all three sides to one unit first. The perimeter keeps that unit and area uses the unit squared.
Why can displayed angles add to 179.9999 or 180.0001?
Each angle is rounded for display. The calculation retains more precision, and tiny displayed differences are normal floating-point rounding.
Is the calculated area suitable for a land survey?
It is planar geometry from three lengths. Legal boundaries and large sites can require coordinates, projection methods and a registered professional survey.