Skip to main content

Notice Send us your feedback to help us improve this service.

Triangle Calculator

Calculate area and perimeter of a triangle.

What this calculator does

This tool works out the area of a triangle from its base and height. If you also enter all three side lengths, it adds the perimeter.

It is useful for the gable end of a house or garage, a triangular corner garden, a sail or banner, and geometry homework. Any unit works, as long as you use the same one throughout.

How we work it out

Area is half the base times the height. The height is the straight-up distance from the base to the opposite corner, at a right angle to the base.

The perimeter is the three sides added together. It only appears when sides A, B and C are all more than zero. If you give all three sides, they must be able to form a real triangle, or you will see an error. The tool does not check that the sides match your base and height, so the area always comes from the base and height alone. Answers are rounded to two decimal places.

Get the height right

The height is not a sloped side. It is a line from the base straight up to the top corner, meeting the base at a square angle. On a gable wall, measure from the middle of the bottom edge straight up to the peak.

Any side can be the base, as long as the height is measured from that side. Turn the triangle in your head so the side you chose is at the bottom. In a triangle with one wide angle, the height can fall outside the shape. Extend the base line with a straightedge and measure up to the corner from there.

In a right-angled triangle, the two short sides are already a base and a height. Enter them both and you are done.

When the perimeter shows up

The perimeter appears only when you fill in all three sides. Leave any side at zero and you see the area alone. If you know two sides of a right-angled triangle, the Pythagorean theorem calculator finds the third, so you can complete the set.

Three lengths can only close into a triangle if the two shorter sides add up to more than the longest one. Sides of 2, 3 and 9 cannot, so the calculator shows an error instead of a perimeter. If you see that message, measure the sides again. The calculator does not compare the sides with your base and height, so check that those agree too.

Triangles around the house

Gable ends, the ends of hip roofs, corner gardens and some windows are triangles. A corner bed tucked where two fences meet at a square corner is a right-angled triangle. Measure along each fence from the corner to the end of the bed, and enter those two lengths as the base and height.

What this does not include

  • Angles
  • Checking that the three sides agree with the base and height you entered
  • Area from three sides alone, which needs Heron's formula
  • Converting between units

Common questions

What if I only know the three sides?

You can still find the area with Heron's formula. Add the three sides and halve the total. Call that s. Multiply s by s minus the first side, s minus the second side and s minus the third side, then take the square root. This tool needs a base and a height for the area, so either use that formula or measure the height.

Does it matter which side I call the base?

No. Every triangle has three possible bases, each with its own height. Half of base times height gives the same area whichever pair you use. Just make sure the height you enter is measured from the side you chose as the base, not from a different side.

Why does the calculator show no perimeter?

It needs all three side lengths, and each one must be more than zero. The base box is used only for the area. If the base is part of the edge you want, enter it again as one of the sides. Then the perimeter appears under the area.

Can I use this for a roof?

Yes, for a triangular roof face such as the end of a hip roof. Measure along the roof surface, not from the ground. The base is the eave edge, and the height runs up the slope from the eave to the peak at a right angle to the eave. Roofs are dangerous to walk on, so take these numbers from plans when you can.

Why is there a half in the area formula?

Two copies of the same triangle fit together into a parallelogram with the same base and height. That parallelogram covers base times height. Each triangle is exactly half of it. So any triangle covers half the area of a rectangle with the same base and height.

Last reviewed October 18, 2026. How we check our numbers.

This is an estimate to help you plan. It is not financial, medical, or legal advice. Talk to a professional before you make a big decision.

Add this calculator to your website

Free to use on your site, blog or intranet. Paste this code where you want the calculator to appear. It works on its own, sets no cookies and shows no ads.