A triangle is the simplest closed shape in geometry, yet it hides a surprising amount of math. Three lengths alone are enough to recover everything: the distance all the way around (the perimeter), the space it covers (the area), and every interior angle. This triangle calculator takes your three side lengths, validates that they actually form a triangle, and then hands you back the full solved shape in seconds — no algebra, no square roots to punch in by hand.
Whether you are a high-school student checking a homework answer, a contractor measuring a triangular patio before you order tile, or a DIYer framing a gable end, the goal is the same: feed in three numbers, get back a trustworthy perimeter, area, and set of angles. Adjust any side and every result updates instantly.
How to Use
- Enter Side a — the first edge of the triangle. It can be in feet, inches, centimeters, or meters as long as all three sides use the same unit.
- Enter Side b — the second edge. The label on the result card keeps track of which angle sits opposite which side.
- Enter Side c — the third edge. This side sits opposite the angle we call C.
- Hit calculate. The engine first checks that the three sides are positive and satisfy the triangle inequality: the longest side must be shorter than the sum of the other two. If they do not, the calculator returns an error instead of a nonsense number.
- Read the result card. You get the perimeter (total distance around), the semi-perimeter used by Heron's formula, the area, and all three interior angles in degrees.
A quick sanity check: the three angles should always add up to 180°. If they do not, double-check that you typed the sides correctly.
The Formulas Behind the Calculator
The perimeter is the easy one — it is just the sum of the three sides:
P = a + b + c
The area uses Heron's formula, one of the most elegant results in classical geometry. You first compute the semi-perimeter s = (a + b + c) / 2, and then:
A = √( s · (s − a) · (s − b) · (s − c) )
The angles come from the law of cosines. For the angle opposite side a:
cos A = (b² + c² − a²) / (2bc)
You then take the inverse cosine (arccos) of that ratio and convert from radians to degrees. The other two angles follow the same pattern, relabeling the sides.
The famous 3-4-5 right triangle is the classic test case: sides 3, 4, and 5 feet give a perimeter of 12 ft, an area of 6 ft², and angles of 36.87°, 53.13°, and 90°. That last angle is the right angle — which is why 3-4-5 triangles have been used by builders for thousands of years to square a foundation.
Why the Triangle Inequality Matters
Three lengths only form a real triangle if the longest side is strictly shorter than the sum of the other two. Try sides 1, 2, and 5: 1 + 2 = 3, which is less than 5, so the two short sides cannot reach each other. They would lie flat against the long side and never close — a "degenerate" shape with area zero. This calculator rejects that input up front rather than returning a negative number inside the square root of Heron's formula.
For the same reason, side lengths must be positive. A zero or negative side does not describe a triangle at all; it describes a line segment or nothing. The validator flags these before any math runs.
Examples
Example 1 — Tiling a triangular patio. A homeowner has a corner patio that measures 9 ft by 12 ft by 15 ft (a scaled-up 3-4-5). The perimeter is 36 ft, the area is 54 ft², and the corner where the 9 ft and 12 ft sides meet is exactly 90°. At a tile cost of $8 per square foot plus $1 per square foot for grout and sealer, the material budget is about $9 × 54 = $486. Getting the area wrong by 10% means over-ordering by nearly $50 — which is why measuring twice and calculating once matters.
Example 2 — Fencing a triangular garden. A garden bed has sides of 6 m, 8 m, and 10 m. The perimeter is 24 m, so at $12 per linear meter of cedar edging the fence costs $288. The area is 24 m², and the angles come out to 36.87°, 53.13°, and 90° — another right triangle in disguise. The gardener can place a right-angle sprinkler head exactly in the 90° corner.
Example 3 — An obtuse triangle. Not every triangle has a right angle. Take sides of 5 ft, 4 ft, and 2 ft. The longest side, 5 ft, is opposite the angle A. Using the law of cosines, cos A = (4² + 2² − 5²) / (2 · 4 · 2) = −5/16 = −0.3125, so angle A is about 108.2° — obtuse, well over 90° but still less than 180°. The other two angles are about 49.5° and 22.3°, and the three add to 180°. The area works out to about 3.8 ft².
Example 4 — Checking a 5% roof slope. A gable end of a house rises 4 ft over a 40 ft run. The sloped rafter is √(40² + 4²) ≈ 40.20 ft. The angle at the eave is arctan(4/40) ≈ 5.71°, which matches the expected 5% grade; the area of the gable (needed to order siding) is ½ × base × height.
Example 5 — Scaling up to a large triangle. On a 1,000,000-unit equilateral triangle (each side 1,000,000), the perimeter is 3,000,000 and the area is roughly 433 billion square units. The engine handles magnitudes above one million without overflow — useful for surveying large plots or plotting on a grid where coordinates are in the millions.
FAQ
How do you find the area of a triangle with three sides?
Use Heron's formula. First compute the semi-perimeter s = (a + b + c) / 2, then area = √(s · (s − a) · (s − b) · (s − c)). This calculator runs that for you as soon as you type all three sides.
How do you find the angles of a triangle given three sides?
Apply the law of cosines to each angle. For the angle opposite side a, cos A = (b² + c² − a²) / (2bc), then take arccos and convert to degrees. The three angles should always sum to 180°.
What is the perimeter of a triangle?
The perimeter is the total distance around the shape, equal to the sum of its three sides: P = a + b + c. It is the number you would use if you were laying fence, trim, or edging around the triangle.
What if my sides do not form a valid triangle?
The three sides must satisfy the triangle inequality: the longest side must be strictly shorter than the sum of the other two. If they do not, the calculator returns an error. Common causes are swapping a number, dropping a decimal, or typing two sides that together are shorter than the third.
What is the 3-4-5 rule in construction?
If the sides of a triangle are in the ratio 3:4:5, the angle between the 3-foot and 4-foot sides is exactly 90°. Builders use this to square foundations: measure 3 ft along one wall, 4 ft along the other, and adjust until the diagonal between them is exactly 5 ft.
Can I use inches, centimeters, or meters instead of feet?
Yes — as long as all three sides are in the same unit, the area comes out in square units of the same measure (ft², in², cm², m²) and the angles are unaffected by the unit choice. Angles are pure numbers.
Is an equilateral triangle's area always √3/4 × side²?
Yes. For an equilateral triangle with side length a, Heron's formula simplifies to A = (√3 / 4) · a², and every interior angle is exactly 60°.
Disclaimer
This triangle calculator is provided for informational purposes only and does not constitute engineering, architectural, or surveying advice. Results are computed from the side lengths you enter using Heron's formula and the law of cosines; always double-check critical measurements and consult a licensed professional before building, ordering materials, or signing off on a construction project.