Triangle Calculator
A triangle is one of the most fundamental shapes in geometry. This calculator lets you find the area of a triangle using two different methods: if you know the base and height, the area is simply half the product of the two (Area = ½ × b × h). If you know all three side lengths, Heron's formula delivers both the area and the perimeter in one step.
Heron's formula works by computing the semi-perimeter s = (a + b + c) / 2 and then applying Area = √(s × (s−a) × (s−b) × (s−c)). Before calculating, the tool verifies the triangle inequality — each side must be shorter than the sum of the other two — so you always get a meaningful result or a clear error message.
How it works
Mode A (base + height): Area = ½ × b × h. Mode B (three sides a, b, c): s = (a+b+c)/2; Area = √(s·(s−a)·(s−b)·(s−c)); Perimeter = a+b+c. Triangle inequality: a+b > c, a+c > b, b+c > a.
Use cases
- Calculating land or floor area that forms a triangular shape
- Architecture and construction: computing roof pitch surface areas
- Navigation and surveying: finding distances using triangulation
- Academic math problems involving triangle geometry
- Woodworking and DIY: cutting triangular pieces with exact dimensions
Frequently asked questions
How do I calculate the area of a triangle without knowing the height?
If you know all three side lengths, use Heron's formula: compute the semi-perimeter s = (a + b + c) / 2, then the area is √(s × (s−a) × (s−b) × (s−c)). This gives the exact area without ever needing to measure a height, which is useful for land plots and irregular triangles.
What is the formula for triangle area with base and height?
Area = ½ × base × height. The height must be the perpendicular distance from the base to the opposite vertex, not the length of a slanted side. For example, a triangle with a 10 m base and 4 m height has an area of 20 m².
Why does the calculator say my three sides do not form a valid triangle?
Three lengths only form a triangle if they satisfy the triangle inequality: each side must be shorter than the sum of the other two. For example, sides 2, 3, and 10 are impossible because 2 + 3 = 5 is less than 10, so the two short sides could never meet. Check your measurements and units if you get this error.
How do I calculate the perimeter of a triangle?
The perimeter is simply the sum of the three side lengths: P = a + b + c. That is why the calculator only shows the perimeter in three-sides mode — with just a base and a height, the other two side lengths are not determined.
Does Heron's formula work for any type of triangle?
Yes. Heron's formula works for scalene, isosceles, equilateral, right, and obtuse triangles alike, as long as the three sides satisfy the triangle inequality. For a right triangle you can also use the two legs as base and height in the simpler ½ × b × h formula and get the same result.