Triangle Calculator
Solve any triangle — find missing sides, angles, and area from any two sides and an angle, or all three sides. Includes construction-specific formulas and the 3-4-5 rule.
Enter your values above to see the results.
Tips & Notes
- ✓Use the 3-4-5 rule to square any corner on site — measure 3 ft along one wall, 4 ft along the perpendicular, and check the diagonal. It must be exactly 5 ft. Scale up: 6-8-10, 9-12-15.
- ✓When calculating roof trusses, always work with the clear span (inside wall to inside wall), not the total building width. Overhang length is added separately.
- ✓The sum of interior angles in any triangle is always exactly 180°. Use this to check your angle calculations — if A + B + C does not equal 180°, there is an input or rounding error.
- ✓For irregular triangular land areas (lot surveys), use Heron formula with all three side lengths measured by tape — no need to establish a height, which is difficult on uneven terrain.
- ✓When cutting triangular gusset plates or braces, calculate the exact angle at each corner before cutting. A 1° error on a 12-inch brace shifts the opposite end by 0.2 inches — which compounds through a truss.
Common Mistakes
- ✗Confusing the included angle (between two known sides) with any other angle — the Law of Cosines requires the angle between the two sides you are using, not an angle opposite to one of them.
- ✗Using degrees in a calculator set to radians — sin(35 radians) ≠ sin(35°). Always verify your calculator mode before trigonometric calculations.
- ✗Assuming a triangle is a right triangle without confirming — only use the simple Pythagorean formula if one angle is confirmed to be exactly 90°. Oblique triangles require Law of Sines or Law of Cosines.
- ✗Forgetting that two different triangles can satisfy the same angle-side-side (SSA) condition — the ambiguous case produces two valid triangles. Check both solutions before committing to a cut.
- ✗Rounding intermediate angle calculations — keeping only 1 decimal place in angles propagates significant error through side length calculations. Carry at least 2 decimal places through all intermediate steps.
Triangle Calculator Overview
Triangle calculations are fundamental to construction, surveying, and engineering — every roof truss, ramp, brace, and diagonal cut involves at least one triangle. Given any two sides and one angle, or any two angles and one side, the complete triangle can be solved. This calculator handles all six standard cases and outputs every unknown side, angle, area, and perimeter.
The Law of Sines — when you know an angle and its opposite side:
a/sin(A) = b/sin(B) = c/sin(C)
EX: Side a = 10 ft, Angle A = 35°, Angle B = 65° → sin(35°) = 0.5736, sin(65°) = 0.9063 → b = 10 × (0.9063/0.5736) = 15.8 ft → Angle C = 180 − 35 − 65 = 80°The Law of Cosines — when you know all three sides or two sides and the included angle:
c² = a² + b² − 2ab × cos(C)
EX: Roof truss: a = 18 ft, b = 18 ft, included angle C = 40° → c² = 324 + 324 − 2(18)(18)cos(40°) = 648 − 648(0.766) = 648 − 496.4 = 151.6 → c = 12.31 ft (ridge beam length)Triangle area formulas — three approaches by available inputs:
| Known Information | Formula | Construction Use |
|---|---|---|
| Base and height | Area = ½ × base × height | Gable end wall area |
| Two sides and included angle | Area = ½ × a × b × sin(C) | Irregular lot calculation |
| All three sides (Heron) | Area = √[s(s−a)(s−b)(s−c)], s=(a+b+c)/2 | Survey land area |
| Right triangle | Area = ½ × leg₁ × leg₂ | Stair stringers, ramps |
| Ratio (a:b:c) | Example (ft) | Common Use | Hypotenuse Factor |
|---|---|---|---|
| 3:4:5 | 3, 4, 5 | Squaring corners (most common) | × 1.667 of short leg |
| 5:12:13 | 5, 12, 13 | Roof pitch layout | × 2.6 of short leg |
| 8:15:17 | 8, 15, 17 | Stair stringers | × 2.125 of short leg |
| 1:1:√2 | 1, 1, 1.414 | 45° cuts, diagonal bracing | × 1.414 of leg |
| 1:√3:2 | 1, 1.732, 2 | 60° roof pitches, trusses | × 2 of short leg |
Frequently Asked Questions
Use the Law of Cosines: c² = a² + b² − 2ab×cos(C), where C is the angle between sides a and b. Example: two rafters each 14 ft meeting at a 36° ridge angle. c² = 196 + 196 − 2(14)(14)×cos(36°) = 392 − 392×0.809 = 392 − 317.1 = 74.9. c = √74.9 = 8.65 ft. This is the horizontal span of the ridge beam between those two rafter feet.
The 3-4-5 rule works because 3² + 4² = 9 + 16 = 25 = 5² — a perfect Pythagorean triple. Any triangle with sides in a 3:4:5 ratio contains an exact 90° angle. In construction, this lets you verify square corners without a protractor or framing square. Measure 3 ft from the corner on one wall, 4 ft on the other, and the diagonal must be exactly 5 ft. Scale the numbers proportionally for larger layouts.
Use Heron formula. First calculate s = (a+b+c)/2 (the semi-perimeter). Then Area = √[s(s−a)(s−b)(s−c)]. Example: triangle with sides 15, 20, and 25 ft. s = (15+20+25)/2 = 30. Area = √[30×15×10×5] = √22,500 = 150 ft². Note: 15-20-25 is a 3-4-5 triple scaled by 5, so you could also verify: ½×15×20 = 150 ft².
Use the Law of Cosines rearranged: cos(A) = (b² + c² − a²) ÷ (2bc), where a is the side opposite angle A. Example: sides 10, 13, and 15 ft. To find the angle opposite the 15 ft side: cos(A) = (100 + 169 − 225) ÷ (2×10×13) = 44 ÷ 260 = 0.169. A = arccos(0.169) = 80.3°. Repeat for each angle, then verify all three sum to 180°.
Right triangles (90° angle) appear in stair stringers, roof pitches, ramp slopes, and squaring layouts. Isosceles triangles (two equal sides) appear in symmetric roof trusses and gable ends. Scalene triangles appear in hip roof sections, irregular lots, and custom truss designs. Understanding which type you have determines which formula to apply and whether any shortcuts (like the Pythagorean theorem) are valid.
Roof pitch is expressed as rise over run (e.g., 6/12 means 6 inches rise per 12 inches horizontal run). The actual rafter length (hypotenuse) = √(rise² + run²). For a 6/12 pitch over a 24-ft span: run = 12 ft, rise = 12 × (6/12) = 6 ft. Rafter length = √(144 + 36) = √180 = 13.42 ft per rafter. Add overhang length separately. The pitch angle = arctan(rise/run) = arctan(0.5) = 26.6°.