Triangle Calculator

Triangle area from base and height, or area and perimeter from three sides (Heron).

Quick answer

  • Formula: Base–height: Area = (b × h) ÷ 2 · Heron: Area = √(s(s−a)(s−b)(s−c)), where s = (a+b+c) ÷ 2
  • Worked example — Area: 6.0000 (full example below).

Triangle Calculator

Worked example result
Area6.0000
Perimeter (three-sides mode)12.0000
Semi-perimeter (three-sides mode)6.0000

The 3-4-5 triangle: perimeter 12, semi-perimeter 6, and Heron's formula gives √(6 × 3 × 2 × 1) = √36 = 6 for the area — matching (3 × 4) ÷ 2 from the base–height method.

There are two common ways to size a triangle. If you know the base and the vertical height, the area is half their product. If you know all three sides instead, Heron's formula finds the area from the sides alone — no height needed.

Choose the mode that matches what you know. In three-sides mode the calculator also returns the perimeter and semi-perimeter, and it checks the triangle inequality: the two shorter sides must together exceed the longest side, or no such triangle exists.

The formula

Base–height: Area = (b × h) ÷ 2 · Heron: Area = √(s(s−a)(s−b)(s−c)), where s = (a+b+c) ÷ 2

Worked example

The 3-4-5 triangle: perimeter 12, semi-perimeter 6, and Heron's formula gives √(6 × 3 × 2 × 1) = √36 = 6 for the area — matching (3 × 4) ÷ 2 from the base–height method.

The example is pre-loaded in the result panel — press Calculate with your own numbers to replace it.

Frequently asked questions

Why can't I get a perimeter from base and height?

Because many different triangles share the same base and height but have differently slanted sides — sliding the apex sideways keeps the area identical while stretching the perimeter. Perimeter is only shown in three-sides mode.

What is the triangle inequality?

Any two sides of a triangle must add up to more than the third side. Sides of 2, 3 and 6 cannot form a triangle because 2 + 3 < 6 — the two short sides cannot reach each other, and the calculator flags this.

Category: Math calculators

Sources & methodology

This calculator applies the formula shown on this page exactly as written, using the standard definitions for its inputs. Results are computed from the values you enter — no data is stored — and are rounded only for display.

Content last reviewed by CalcHub Editorial.

Embed this calculator on your site

Free to use with attribution — paste the snippet below and the calculator appears on your page, with a link back to CalcHub.

<iframe src="https://calculator-site-57a.pages.dev/embed/triangle-calculator" width="100%" height="640" style="border:1px solid #d9e2ea;border-radius:12px" loading="lazy" title="Triangle Calculator — CalcHub"></iframe>

Open the embed version →