Triangle Calculator
Calculate triangle area and perimeter using base & height or all three sides.
📊 What is a Triangle?
A triangle is a polygon with three sides, three vertices, and three interior angles. It is the simplest polygon - you need at minimum three points (not collinear) and three connecting lines to enclose an area. Triangles are the fundamental building block of geometry; any polygon can be decomposed into triangles, which is why triangulation is used in computer graphics, surveying, structural engineering, and finite element analysis.
The area of a triangle is the amount of two-dimensional space it encloses. There are several ways to calculate this depending on what information you have. The most straightforward is when you know the base and the perpendicular height: Area = ½ × base × height. When you know only the three side lengths, you use Heron’s formula, which requires no angle measurement whatsoever.
Triangles are classified in two ways. By their side lengths: equilateral (all three sides equal, all angles 60°), isosceles (two sides equal, two angles equal), and scalene (no sides equal, no angles equal). By their angles: acute (all angles less than 90°), right (one angle exactly 90°, making the Pythagorean theorem applicable), and obtuse (one angle greater than 90°).
The triangle inequality theorem is a critical constraint: for any three lengths to form a valid triangle, the sum of any two sides must be strictly greater than the third side. If this condition is violated, the three sides would collapse into a line rather than enclosing any area.
Triangles have exceptional structural rigidity. Unlike rectangles, which can shear and deform under lateral force, a triangle is inherently rigid - you cannot change its shape without changing the length of a side. This is why triangular trusses are ubiquitous in bridge and roof design.
📐 Formula
Area using Base and Height:
Area using Heron’s Formula (three sides):
Perimeter:
📖 How to Use This Calculator
Steps to Calculate
💡 Example Calculations
Example 1 - Right Triangle (Base & Height)
A right triangle has a base of 9 cm and a height of 12 cm.
Example 2 - Scalene Triangle (Heron's Formula)
A triangle has sides of 5 cm, 6 cm, and 7 cm.
Frequently Asked Questions
🔗 Related Calculators
What is Heron's formula?
Heron's formula calculates the area of a triangle from its three side lengths without needing the height. First compute the semi-perimeter s = (a + b + c) / 2, then Area = √(s × (s−a) × (s−b) × (s−c)). It works for any triangle - right, acute, or obtuse - as long as the three sides are valid.
How do I find the area of a triangle without the height?
Use Heron's formula with the three side lengths. For example, for a triangle with sides 5, 6, and 7: s = (5 + 6 + 7) / 2 = 9. Area = √(9 × 4 × 3 × 2) = √216 = 14.70 square units.
What are the types of triangles?
By sides: equilateral (all sides equal), isosceles (two sides equal), scalene (no sides equal). By angles: acute (all angles < 90°), right (one angle = 90°), obtuse (one angle > 90°). Every triangle falls into one category from each classification.
How do I check if three sides can form a valid triangle?
The triangle inequality theorem states that the sum of any two sides must be strictly greater than the third side. Check all three combinations: a + b > c, a + c > b, and b + c > a. If any check fails, those three lengths cannot form a triangle.
What is the perimeter of a triangle?
The perimeter is simply the sum of all three sides: P = a + b + c. It represents the total distance around the outside of the triangle. For the base & height mode, only the area can be calculated since the other two sides are unknown.
How do you calculate the area of a triangle?
Area = (base x height) / 2. The height must be perpendicular to the base. Example: a triangle with base 10 cm and height 6 cm has area = (10 x 6) / 2 = 30 cm^2. If you know all three sides but not the height, use Heron's formula: area = sqrt(s x (s-a) x (s-b) x (s-c)) where s = (a+b+c) / 2 is the semi-perimeter.
How do you check if three lengths can form a valid triangle?
Three lengths form a valid triangle only if the sum of any two sides is greater than the third side (triangle inequality theorem). Check all three combinations: a+b > c, a+c > b, b+c > a. Example: sides 3, 4, 5 - valid (3+4=7>5, 3+5=8>4, 4+5=9>3). Example: sides 1, 2, 10 - not valid (1+2=3, which is less than 10). A degenerate case where a+b = c would be a flat line, not a triangle.
How do you find the centroid of a triangle?
The centroid is the intersection of the three medians (lines from each vertex to the midpoint of the opposite side). Its coordinates are the average of the three vertices: centroid = ((x1+x2+x3)/3, (y1+y2+y3)/3). The centroid divides each median in a 2:1 ratio from vertex to midpoint. It is also the center of mass of a uniform triangular plate.