Σ CALCULATOR Wizard
Math

Triangle Calculator

Solve any triangle — find sides, angles, area, perimeter, and height. Supports SSS, SAS, ASA, AAS, right triangles, and equilateral triangles with step-by-step solutions.

Case type
SSS (3 sides) SAS (2 sides, angle) ASA (2 angles, side) AAS (2 angles, side) SSA (ambiguous)
Enter all three sides to find angles, area, and perimeter.
Triangle Area
Perimeter
Type
Height (a)
Side a
units
Side b
units
Side c
units
Angle A
degrees
Step-by-step solution

Enter any two values of a right triangle (legs a, b or hypotenuse c) and solve for everything else. Angle C is always 90°.

Quick examples
3-4-5 5-12-13 Isosceles 45-45-90 30-60-90 Custom
Shorter leg
Longer leg
Longest side (opposite 90°)
Angle opposite leg a
Hypotenuse
Area
Perimeter
Angle A
Leg a
units
Leg b
units
Hypotenuse c
units
Angle B
degrees
Step-by-step (Pythagorean theorem)

Calculate triangle area from different combinations of known values — no need to know all sides or angles.

Area formula
Base & Height Heron's (3 sides) SAS (2 sides & angle) Coordinates
Triangle Area
Calculation steps

Triangle Calculator — How to Solve Any Triangle

A triangle has six measurements: three sides (a, b, c) and three angles (A, B, C), where each angle is opposite its corresponding side. Knowing any three of these — provided at least one is a side — is sufficient to determine the other three completely. This is what mathematicians call "solving the triangle."

The Four Triangle Cases

SSS (Side-Side-Side): All three sides are known. Use the Law of Cosines to find any angle: cos(A) = (b² + c² − a²) ÷ 2bc. Once one angle is found, use the Law of Sines or repeat for others. This is the most common construction scenario — you measure all three sides on a job site and need the angles.

SAS (Side-Angle-Side): Two sides and the included angle (between them) are known. Use the Law of Cosines to find the third side, then the Law of Sines for remaining angles. Common in navigation and surveying when two legs of a path and the turning angle are measured.

ASA (Angle-Side-Angle): Two angles and the included side are known. The third angle = 180° − A − B. Then use the Law of Sines: a/sin(A) = b/sin(B) = c/sin(C). Used frequently in land surveying with theodolite measurements.

AAS (Angle-Angle-Side): Two angles and a non-included side. Same approach as ASA — find third angle first, then Law of Sines for remaining sides.

💡 Pro Tip — The SSA Ambiguous Case: When you know two sides and an angle not between them (SSA), there may be zero, one, or two valid triangles. This is called the "ambiguous case." If side a < b·sin(A), no triangle exists. If a = b·sin(A), exactly one right triangle. If b·sin(A) < a < b, two triangles are possible. If a ≥ b, exactly one triangle. Always check which case you're in before assuming a unique solution.

Law of Sines and Law of Cosines

LawFormulaWhen to Use
Law of Sinesa/sin(A) = b/sin(B) = c/sin(C)ASA, AAS, SSA (after checking ambiguity)
Law of Cosines (find side)c² = a² + b² − 2ab·cos(C)SAS — find the third side
Law of Cosines (find angle)cos(A) = (b² + c² − a²) ÷ 2bcSSS — find angles from all three sides
Pythagorean Theoremc² = a² + b²Right triangles only (special case of Law of Cosines)
Heron's FormulaArea = √(s(s−a)(s−b)(s−c)), s=(a+b+c)/2SSS — area from three sides
SAS AreaArea = ½·a·b·sin(C)Two sides and included angle

Triangle Types by Angles

TypeDefinitionProperties
AcuteAll angles < 90°All altitudes inside triangle
RightOne angle = 90°Pythagorean theorem applies; a² + b² = c²
ObtuseOne angle > 90°Two altitudes fall outside triangle
EquilateralAll angles = 60°, all sides equalArea = (√3/4)·a²; height = (√3/2)·a
IsoscelesTwo equal sides and two equal anglesBase angles are equal; altitude from apex bisects base
ScaleneAll sides different lengthsAll angles different; most general case

Triangle Calculations in Construction & Engineering

Triangles are the foundation of structural engineering. Unlike rectangles and other quadrilaterals, triangles are inherently rigid — the only polygon that cannot change shape without changing the length of its sides. This is why trusses, bridge designs, and roof structures rely entirely on triangulated members. Any rectangular frame can be stabilized by adding a single diagonal, which divides it into two triangles.

Roof Pitch and Rafter Length

Roof pitch is expressed as rise over run — a 6/12 pitch means the roof rises 6 inches for every 12 inches of horizontal run. This forms a right triangle where the run is the base (leg b), the rise is the height (leg a), and the rafter length is the hypotenuse. For a 24-foot span with 6/12 pitch: half-span = 12 feet (run), rise = 12 × (6/12) = 6 feet, rafter = √(12² + 6²) = √(144 + 36) = √180 = 13.42 feet. Always add the eave overhang to the calculated rafter length.

Triangulation in Land Surveying

Surveyors use triangulation to measure distances indirectly. A baseline of known length is established, then angles to a distant target point are measured from each end of the baseline. With two angles and the baseline (ASA case), the Law of Sines gives the distance to the target. This technique was used to map entire continents before GPS — the Great Trigonometric Survey of India (1802–1871) used triangulation to measure the height of Mount Everest from 150 miles away, getting within 26 feet of today's accepted value.

💡 Pro Tip — Construction Layout: To lay out a perfect right angle on a large slab or foundation, the 3-4-5 method works for any scale. For a 60-foot building pad: mark 30 feet along one string line, 40 feet along the perpendicular string line. If the diagonal between those marks is exactly 50 feet, the corner is square. Use the largest triangle possible — measurement errors are proportionally smaller. The 8-15-17 triple (×4 = 32-60-68) works well for large parcels.

Special Triangle Angle Relationships

AnglesSide Ratiotan(A)Common Use
30° - 60° - 90°1 : √3 : 2tan(30°) = 0.577Half of equilateral triangle
45° - 45° - 90°1 : 1 : √2tan(45°) = 1.000Square diagonal; isosceles right
36° - 72° - 72°1 : φ : φ (golden ratio)tan(36°) = 0.727Golden gnomon; pentagram
Equilateral 60-60-601 : 1 : 1tan(60°) = 1.732Strongest arch form

Triangle Inequality and Its Implications

The triangle inequality theorem states that the sum of any two sides must strictly exceed the third — this is not just a mathematical curiosity but a fundamental constraint that determines what shapes can exist in physical space. This has real implications: if you're building a triangular frame with two members of 6 feet and 8 feet, the connecting member must be strictly between 2 feet and 14 feet. At the extreme values, the triangle collapses to a straight line (degenerate triangle) with zero area. Engineers apply this principle constantly. In structural engineering, triangles are designed with generous proportions — highly obtuse triangles (one angle close to 180°) transmit forces poorly and are avoided in truss design.

Triangle Formulas Reference Guide

Area Formulas

The most common triangle area formula is Area = ½ × base × height, where the height must be perpendicular to the chosen base. For construction, the base is typically a measured horizontal distance and the height is the vertical rise. When height isn't directly measurable, Heron's Formula uses all three sides: with semi-perimeter s = (a+b+c)/2, Area = √(s·(s−a)·(s−b)·(s−c)). For SAS situations, Area = ½·a·b·sin(C) where C is the angle between sides a and b.

Real-World Applications

Triangles are fundamental in construction, navigation, and surveying. A carpenter uses the 3-4-5 right triangle to ensure corners are square — measure 3 feet along one wall, 4 feet along the adjacent wall, and if the diagonal is exactly 5 feet, the corner is a perfect 90°. A roofer uses triangle calculations to determine the roof pitch and rafter length from the span and rise. Land surveyors use triangulation — measuring angles from known baseline distances — to determine positions of distant points without directly measuring to them.

In navigation, the triangle formed by two bearings from different positions to the same landmark (called a "fix") is solved with the Law of Sines to find position. GPS systems still use this fundamental principle, just with satellites as the known points. Structural engineers use triangles because they are the only rigid polygon — adding a diagonal to any rectangular frame converts it into two triangles and prevents racking.

Common 30-60-90 and 45-45-90 Triangles

Triangle TypeAnglesSide RatiosExample (hyp = 10)
30-60-9030°, 60°, 90°1 : √3 : 2a=5, b=8.66, c=10
45-45-90 (Isosceles right)45°, 45°, 90°1 : 1 : √2a=7.07, b=7.07, c=10
3-4-5 (Pythagorean triple)36.87°, 53.13°, 90°3 : 4 : 5a=6, b=8, c=10
5-12-1322.62°, 67.38°, 90°5 : 12 : 13a=3.85, b=9.23, c=10
8-15-1728.07°, 61.93°, 90°8 : 15 : 17a=4.71, b=8.82, c=10
Equilateral60°, 60°, 60°1 : 1 : 1Area = (√3/4)·s²
How do I find the area of a triangle without the height?
Use Heron's Formula when you know all three sides. First calculate the semi-perimeter: s = (a + b + c) ÷ 2. Then: Area = √(s · (s−a) · (s−b) · (s−c)). Example: sides 5, 7, 8. s = (5+7+8)/2 = 10. Area = √(10·5·3·2) = √300 = 17.32 square units. If you know two sides and the included angle, use: Area = ½ · a · b · sin(C). Example: sides 6 and 8 with included angle 40°. Area = ½ · 6 · 8 · sin(40°) = 24 · 0.6428 = 15.43 square units.
What is the Law of Cosines used for?
The Law of Cosines (c² = a² + b² − 2ab·cos(C)) solves triangles when you have either all three sides (SSS) or two sides and the included angle (SAS). It's a generalization of the Pythagorean theorem — when angle C = 90°, cos(90°) = 0 and the formula reduces to c² = a² + b². Use it to find the third side when you know two sides and the angle between them, or to find any angle when you know all three sides. After finding one angle with the Law of Cosines, you can use the simpler Law of Sines for the remaining angles.
How do I check if three sides form a valid triangle?
Any set of three lengths forms a valid triangle if and only if each side is shorter than the sum of the other two. This is the Triangle Inequality: a + b > c, a + c > b, and b + c > a. Equivalently, the longest side must be shorter than the sum of the other two. Example: sides 3, 4, 8 — check 3 + 4 = 7 < 8, so this fails and no triangle can be formed. Sides 3, 4, 6 — check 3 + 4 = 7 > 6 ✓, 3 + 6 = 9 > 4 ✓, 4 + 6 = 10 > 3 ✓ — valid triangle. Degenerate triangles where one side equals the sum of the other two result in a straight line with zero area.
What is the 3-4-5 rule in construction?
The 3-4-5 rule is used to establish a perfectly square (90°) corner without any measuring instruments other than a tape measure. Mark a point on one wall 3 units from the corner, then a point on the other wall 4 units from the corner. If the diagonal distance between those two points is exactly 5 units, the corner is a perfect right angle. This works because 3² + 4² = 9 + 16 = 25 = 5² (Pythagorean theorem). For larger areas, use multiples: 6-8-10, 9-12-15, or 30-40-50 feet all produce 90° corners. The larger the triangle, the more accurate the measurement since small tape errors have less relative impact.
What are Pythagorean triples?
Pythagorean triples are sets of three positive integers (a, b, c) where a² + b² = c². They represent right triangles with integer side lengths, making them useful for construction and checking work. The most common: 3-4-5, 5-12-13, 8-15-17, 7-24-25. Any multiple of a triple also works: 6-8-10, 9-12-15, 10-24-26. A general formula generates all primitive triples: a = m²−n², b = 2mn, c = m²+n² for positive integers m > n. Pythagorean triples were known to Babylonian mathematicians as early as 1800 BCE, predating Pythagoras by more than 1,000 years.
How do I find the height of a triangle?
Every triangle has three heights (altitudes), one from each vertex perpendicular to the opposite side. For a right triangle with legs a and b, the height to the hypotenuse = (a·b)/c. For any triangle, once you know the area and a base, height = (2 × Area) ÷ base. From the SAS area formula: if Area = ½·a·b·sin(C), then the height from C to side c is h = a·sin(B) or equivalently b·sin(A). In construction, the height from the apex of a roof truss to the base (ceiling joist) equals the span times the tangent of the pitch angle, or can be found from the rise-to-run ratio of the roof pitch.