Home › Geometry › Triangle Area Calculator
Triangle Area Calculator
Computes the area of any triangle from base and height, from three sides (Heron's formula) or from two sides and their included angle in degrees, and reports which method was used.
When to use
You need the area of a triangle and know either its base and height, all three sides, or two sides and the angle between them.
Do not use when: You need the missing sides or angles as well (use triangle-solver), or the triangle is right-angled and you want all its parts (use right-triangle).
Formula
Method 1: area = base × height / 2. Method 2 (Heron): s = (side_a + side_b + side_c) / 2, area = √(s·(s − side_a)·(s − side_b)·(s − side_c)). Method 3: area = ½ · side_a · side_b · sin(included_angle_deg).
Inputs are checked in that order: base and height first, then three sides, then two sides with the included angle. Three sides must satisfy the triangle inequality.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
base | number | units | no | Length of one side chosen as the base (method 1, with height). Range: > 0 |
height | number | units | no | Perpendicular distance from the base to the opposite vertex (method 1). Range: > 0 |
side_a | number | units | no | First side (methods 2 and 3). Range: > 0 |
side_b | number | units | no | Second side (methods 2 and 3). Range: > 0 |
side_c | number | units | no | Third side (method 2, Heron's formula). Range: > 0 |
included_angle_deg | number | degrees | no | Angle between side_a and side_b in degrees (method 3). Range: > 0 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
area | number | units² | Triangle area in the square of the input unit. |
perimeter | number | units | Sum of the three sides (only for the three-side and two-sides-plus-angle methods). |
method | string | Which of the three formulas was applied. |
Example
Base 10, height 4: {"base":10,"height":4} → {"area":20,"method":"Base × height / 2"}
Sides 7, 8, 9 (Heron): {"side_a":7,"side_b":8,"side_c":9} → {"area":26.8328,"perimeter":24,"method":"Heron's formula (three sides)"}
Sides 5 and 7 with 60° between them: {"side_a":5,"side_b":7,"included_angle_deg":60} → {"area":15.1554,"perimeter":18.245,"method":"Two sides and included angle (½·a·b·sin C)"}
GET https://tttkmbb.com/api/v1/calculate/triangle-area?base=10&height=4
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/triangle-area(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/triangle-area · Markdown: https://tttkmbb.com/geometry/triangle-area.md · JSON definition: https://tttkmbb.com/geometry/triangle-area.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="triangle-area" - OpenAPI operationId:
calculate_triangle_area - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Wikipedia – Heron's formula (reference)
- Wolfram MathWorld – Triangle Area (reference)
FAQ
Which height do I use?
The perpendicular distance from the chosen base to the opposite vertex, not the length of another side. For an obtuse triangle the foot of the height can lie outside the base.
Is the angle in degrees or radians?
Degrees. Convert radians with degrees = radians × 180 / π before entering them.
Why does Heron's formula return an error?
The three sides must satisfy the triangle inequality (each side shorter than the sum of the other two); otherwise no triangle exists.
Related calculators
- Triangle Solver — Get all sides and angles, not just the area.
- Right Triangle Calculator — Right triangles from any two sides.
- Regular Polygon Calculator — Area of an equilateral triangle as a 3-sided regular polygon.