Home › Geometry › Trapezoid Calculator
Trapezoid Calculator
Computes the area and midsegment of a trapezoid (trapezium) from its two parallel sides and height, and the perimeter when both non-parallel legs are given.
When to use
You need the area of a quadrilateral with exactly one pair of parallel sides, or its perimeter when all four sides are known.
Do not use when: Both pairs of sides are parallel (use parallelogram or rectangle) or you only know the four sides without the height (the height cannot be derived without an angle in general).
Formula
area = (base_a + base_b) / 2 × height; midsegment = (base_a + base_b) / 2; perimeter = base_a + base_b + leg_c + leg_d
Each leg must be at least as long as the height (a leg equal to the height is perpendicular to the bases, as in a right trapezoid).
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
base_a | number | units | yes | First parallel side. Range: > 0 |
base_b | number | units | yes | Second parallel side. Range: > 0 |
height | number | units | yes | Perpendicular distance between the two parallel sides. Range: > 0 |
leg_c | number | units | no | First non-parallel side (optional, needed for the perimeter). Range: > 0 |
leg_d | number | units | no | Second non-parallel side (optional, needed for the perimeter). Range: > 0 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
area | number | units² | (base_a + base_b) / 2 × height. |
midsegment | number | units | Segment joining the midpoints of the legs = (base_a + base_b) / 2. |
perimeter | number | units | base_a + base_b + leg_c + leg_d (only when both legs are given). |
Example
Bases 8 and 5, height 4, legs 4.5 and 5: {"base_a":8,"base_b":5,"height":4,"leg_c":4.5,"leg_d":5} → {"area":26,"midsegment":6.5,"perimeter":22.5}
Bases 10 and 6, height 3: {"base_a":10,"base_b":6,"height":3} → {"area":24,"midsegment":8}
GET https://tttkmbb.com/api/v1/calculate/trapezoid?base_a=8&base_b=5&height=4&leg_c=4.5&leg_d=5
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/trapezoid(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/trapezoid · Markdown: https://tttkmbb.com/geometry/trapezoid.md · JSON definition: https://tttkmbb.com/geometry/trapezoid.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="trapezoid" - OpenAPI operationId:
calculate_trapezoid_properties - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Wikipedia – Trapezoid (reference)
- Wolfram MathWorld – Trapezoid (reference)
FAQ
Trapezoid or trapezium?
In US usage a trapezoid has one pair of parallel sides; in British usage that shape is called a trapezium. This calculator uses the one-pair-of-parallel-sides definition.
Can I get the area from four sides only?
Not in general: the shape is not rigid unless which sides are parallel and the height (or an angle) are known. Enter the height directly.
Related calculators
- Parallelogram Calculator — Both pairs of sides parallel.
- Triangle Area Calculator — A trapezoid with one base of length 0 is a triangle.