Triangle Calculator

Calculate triangle area and perimeter using base & height or all three sides.

△ Triangle Calculator
Base (b)
units
Height (h)
units
Side a
units
Side b
units
Side c
units
Area
½ × b × h
Perimeter
a + b + c
Semi-perimeter (s)
(a + b + c) / 2

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:

A = ½ × b × h
b = Base length
h = Perpendicular height (altitude) from the base to the opposite vertex

Area using Heron’s Formula (three sides):

s = (a + b + c) / 2  →  A = √(s × (s−a) × (s−b) × (s−c))
a, b, c = The three side lengths
s = Semi-perimeter = half the total perimeter
A = Area of the triangle

Perimeter:

P = a + b + c

How to Use This Calculator

  1. Choose your method - select “Base & Height” if you know the base and perpendicular height, or “Three Sides (Heron’s)” if you know all three side lengths.
  2. Enter your values in the input fields using any consistent unit (cm, m, ft).
  3. Click Calculate - the calculator validates the triangle inequality automatically and alerts you if the sides cannot form a valid triangle.
  4. Read the results - in Base & Height mode you get the area only. In Three Sides mode you also get the perimeter and semi-perimeter.
  5. Switch modes to cross-check your work or explore different calculation methods for the same triangle.

Example Calculations

Example 1 - Right Triangle (Base & Height)

A right triangle has a base of 9 cm and a height of 12 cm.

1
base = 9 cm, height = 12 cm
2
Area = ½ × 9 × 12 = ½ × 108 = 54 cm²
Area = 54 cm²
Try this example →

Example 2 - Scalene Triangle (Heron’s Formula)

A triangle has sides of 5 cm, 6 cm, and 7 cm.

1
a = 5, b = 6, c = 7 → Perimeter = 18 cm
2
s = 18 / 2 = 9 (semi-perimeter)
3
Area = √(9 × (9−5) × (9−6) × (9−7)) = √(9 × 4 × 3 × 2) = √216 = 14.70 cm²
Area = 14.6969 cm²  |  Perimeter = 18 cm  |  Semi-perimeter = 9 cm
Try this example →

Frequently Asked Questions

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.
What is the circumscribed circle (circumcircle) of a triangle?+
The circumscribed circle (circumcircle) passes through all three vertices of a triangle. Its radius R (circumradius) is calculated as R = (a × b × c) / (4 × Area), where a, b, c are the side lengths and Area is the triangle's area. For a right triangle, the circumradius equals half the hypotenuse. The centre of the circumcircle is the circumcenter, which is the intersection of the three perpendicular bisectors of the sides.
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.