Triangle Calculator
Enter the three side lengths of a triangle to find its area (using Heron's formula), perimeter, and semi-perimeter. Heron's formula works for any triangle — scalene, isosceles, or equilateral — without needing to know the height. Enter the default values 3, 4, 5 to see a classic right triangle whose area is exactly 6 square units.
Advertisement
Calculator
See your Triangle Calculator results
Enter your email to unlock results — free forever.
No spam, ever. Unsubscribe at any time.
Advertisement
Formula
Area = √(s(s−a)(s−b)(s−c)), where s = (a+b+c)/2
Heron's formula computes the area of a triangle directly from its three side lengths. First, calculate the semi-perimeter s = (a+b+c)/2. Then area = √(s(s−a)(s−b)(s−c)). The expression inside the square root is always non-negative for any valid triangle (one satisfying the triangle inequality: each side must be less than the sum of the other two). For a 3-4-5 triangle: s = 6, area = √(6 × 3 × 2 × 1) = √36 = 6.
How to use the Triangle Calculator
- 1
Enter your side a
- 2
Enter your side b
- 3
Enter your side c
- 4
Read your results instantly
Results update in real time as you type.
Advertisement
Heron's formula step by step
Heron's formula is named after Hero of Alexandria (circa 60 AD), though the result may be older. It is remarkable because it computes the area of a triangle using only the three side lengths — no height, no angles, no coordinate system required.
Step 1: Compute the semi-perimeter s = (a + b + c) / 2. For a triangle with sides 5, 6, 7: s = (5+6+7)/2 = 9.
Step 2: Compute (s−a), (s−b), and (s−c): 9−5=4, 9−6=3, 9−7=2.
Step 3: Multiply all four terms: s × (s−a) × (s−b) × (s−c) = 9 × 4 × 3 × 2 = 216.
Step 4: Take the square root: √216 ≈ 14.697.
The result — about 14.7 square units — is the exact area of this triangle. You can verify it by constructing the triangle on a grid and computing the base × height / 2 with a known height.
Triangle types and properties
Triangles are classified by both sides and angles. By sides: equilateral (all sides equal, all angles 60°), isosceles (two sides equal, two base angles equal), and scalene (all sides different, all angles different). By angles: acute (all angles < 90°), right (one angle = 90°), and obtuse (one angle > 90°).
For a right triangle with legs a and b and hypotenuse c, Heron's formula gives area = ab/2 (consistent with the base × height / 2 formula since the legs are perpendicular). The Pythagorean theorem a² + b² = c² gives an independent check on the hypotenuse.
The triangle inequality is essential: each side must be strictly less than the sum of the other two. If a + b ≤ c, no triangle can be formed with those side lengths. Heron's formula will yield a zero or imaginary result if the inequality fails.
Advertisement
Applications of triangle area and perimeter
Triangle calculations appear throughout surveying, architecture, engineering, and navigation. Land surveyors use triangulation to measure distances and areas that cannot be measured directly. By measuring only side lengths (using laser rangefinders), the area of an irregularly shaped parcel can be computed by dividing it into triangles and applying Heron's formula to each.
In structural engineering, triangles are the most rigid polygon — a truss built from triangular units does not deform under load the way a square frame does. Computing the areas of individual triangular panels helps calculate material usage and weight distribution.
In computer graphics and 3D modeling, every surface is approximated by a mesh of triangles. Calculating the area of each triangle (using the cross-product generalization of Heron's formula) gives the total surface area of a 3D model, which is used in rendering, physics simulation, and manufacturing.
Tips & Insights
Check the triangle inequality first
Before computing, verify that each side is less than the sum of the other two: a < b + c, b < a + c, c < a + b. If any condition fails, the three lengths cannot form a real triangle. Heron's formula will produce zero or a square root of a negative number (which returns NaN) for degenerate inputs.
Equilateral triangle shortcut
For an equilateral triangle with side s: area = (√3 / 4) × s². For s = 6: area = (1.732/4) × 36 ≈ 15.59. This is faster than Heron's formula for the equal-sided case and is worth memorizing.
Use coordinates for an alternative area formula
If you know the vertices (x₁,y₁), (x₂,y₂), (x₃,y₃), the Shoelace formula gives the area directly: |x₁(y₂−y₃) + x₂(y₃−y₁) + x₃(y₁−y₂)| / 2. This is equivalent to Heron's formula but avoids the square root by working with signed areas.
Worked Examples
Classic 3-4-5 right triangle
s = 6. Area = √(6×3×2×1) = √36 = 6 sq units. Perimeter = 12. This right triangle's area also equals (3×4)/2 = 6 — confirming Heron's formula.
Equilateral triangle with side 10
s = 15. Area = √(15×5×5×5) = √1875 ≈ 43.30 sq units. Using the shortcut: (√3/4)×100 ≈ 43.30. ✓
Advertisement
Frequently Asked Questions
Can Heron's formula be used for any triangle?
Yes — any triangle with valid side lengths (satisfying the triangle inequality). It works for right, acute, obtuse, scalene, isosceles, and equilateral triangles. It is especially useful when the height is unknown.
What happens if the triangle inequality is violated?
If a + b ≤ c (or any permutation), the three sides cannot form a triangle. Heron's formula will compute a square root of a negative number, which is undefined in real arithmetic, returning NaN or an error.
How do I find the angles of a triangle from its sides?
Use the Law of Cosines: cos(A) = (b² + c² − a²) / (2bc). Compute the inverse cosine (arccos) of this value to get angle A. Repeat for angles B and C. The three angles must sum to 180°.
What is the inradius of a triangle?
The inradius r is the radius of the largest circle that fits inside the triangle, touching all three sides. It equals area / s, where s is the semi-perimeter. For the 3-4-5 triangle: r = 6/6 = 1.
Is a right triangle's area always (1/2) × base × height?
Yes — and for a right triangle, the two legs serve as base and height because they meet at a 90° angle. So area = (leg₁ × leg₂) / 2. Heron's formula gives the same answer, providing a cross-check.
Advertisement