HomeGeometry › 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

ParameterTypeUnitRequiredDescription
base_anumberunitsyesFirst parallel side. Range: > 0
base_bnumberunitsyesSecond parallel side. Range: > 0
heightnumberunitsyesPerpendicular distance between the two parallel sides. Range: > 0
leg_cnumberunitsnoFirst non-parallel side (optional, needed for the perimeter). Range: > 0
leg_dnumberunitsnoSecond non-parallel side (optional, needed for the perimeter). Range: > 0

Outputs

OutputTypeUnitDescription
areanumberunits²(base_a + base_b) / 2 × height.
midsegmentnumberunitsSegment joining the midpoints of the legs = (base_a + base_b) / 2.
perimeternumberunitsbase_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

Sources

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