Trapezoid Area and Perimeter Calculator

Enter the two parallel sides and the perpendicular height and this calculator returns the area, the midsegment and — if you add the two legs — the perimeter and both base angles. Switch modes to work the other way and back-solve the height a target area needs. The tool also checks whether the legs you entered are geometrically consistent with the bases and height, which is the single most common way a trapezoid problem goes wrong. Use any unit; results come back in the unit you typed.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Solve forChoose which quantity is unknown; the other becomes an input.Area from the height
Parallel side a (longer base)One of the two sides that are parallel to each other.12
Parallel side b (shorter base)The other parallel side, in the same unit as side a.6
Height hThe perpendicular distance between the two parallel sides, not the length of a leg.4
Known areaThe area you need the trapezoid to have, in square units.36
Leg cOne of the two non-parallel sides. Leave at zero if you only need the area.5
Leg dThe other non-parallel side, in the same unit.5

It returns

  • Area — Square units of whatever linear unit you entered.
  • Midsegment (median) — The segment joining the midpoints of the legs; its length is the average of the two bases.
  • Perimeter — Needs both legs. Shown as a dash until you enter them.
  • Height
  • Base angle at leg c — Measured from the longer base up to leg c.
  • Base angle at leg d

The formula

A=12(a+b)h
h=2Aa+b

In plain text: A = ½(a + b)·h = m·h, m = (a + b)/2, P = a + b + c + d

  • AArea (units²)
  • aLonger parallel side (base) (units)
  • bShorter parallel side (units)
  • hPerpendicular height between the parallel sides (units)
  • mMidsegment (median), the average of the bases (units)
  • c, dThe two non-parallel sides (legs) (units)

Called a trapezium in British usage. The formula needs only the two parallel sides and the perpendicular height; the legs affect the perimeter and the base angles but never the area.

Updated Category Plane Shapes: Area & Perimeter Verified against published test cases Reading time 9 min

A trapezoid is a rectangle whose width is the average of its bases

A trapezoid has exactly one pair of parallel sides, called the bases. Its area is A = ½(a + b)·h, and the cleanest way to understand that formula is to notice what ½(a + b) is: the average of the two bases, which is also the length of the midsegment, the line joining the midpoints of the two legs. So the area is midsegment × height — the trapezoid has exactly the area of a rectangle with the same height and the average width.

That interpretation is why the shape appears wherever a cross-section widens or narrows with depth. Drainage ditches, canals and roadside swales are cut trapezoidal because a vertical bank collapses; a retaining wall is thicker at the base than the top; a hip roof plane and a gable-end wall are often trapezoidal; a dovetail is a trapezoid in plan. In all of them the two parallel sides are known and the perpendicular distance between them is the depth.

Only three numbers control the area: a, b and h. The legs do not enter it. Two trapezoids with the same bases and height but wildly different leg slopes have identical areas, which surprises people the first time they see it. The legs matter for the perimeter, for the base angles and for whether the figure closes at all.

Three derivations of ½(a + b)h

By duplication. Take a second copy of the trapezoid, rotate it 180° and set it against the first. The two fit into a parallelogram of base (a + b) and height h, whose area is (a + b)h. One trapezoid is half of that.

By dissection. Drop perpendiculars from the ends of the shorter base to the longer one. That splits the figure into a central rectangle b × h and two right triangles whose horizontal legs total (a − b). The triangles combine to ½(a − b)h, so the total is bh + ½(a − b)h = ½(a + b)h.

By averaging. A horizontal slice at height y across the figure has width that runs linearly from a at the bottom to b at the top. The mean of a linear function over its range is the average of its endpoints, so the mean width is (a + b)/2 — and area is mean width times height. This is exactly the trapezoidal rule of numerical integration, which approximates the area under any curve by treating each strip as a trapezoid.

Rearranging gives the reverse problem: h = 2A / (a + b). A ditch that must carry a given cross-sectional area at a chosen bottom and top width has its depth fixed by that expression. The base angles follow from the legs: each leg is the hypotenuse of a right triangle with vertical side h and horizontal run √(c² − h²), so the angle it makes with the base is arctan(h / run). The right triangle calculator works those corner triangles on their own.

Worked example: a drainage swale 12 ft across the top

A swale is cut with a 12 ft top width, a 6 ft flat bottom and a 4 ft depth, with both banks the same slope.

  1. Identify the parts. a = 12 ft (top), b = 6 ft (bottom), h = 4 ft (vertical depth). The banks are the legs.
  2. Midsegment. m = (12 + 6)/2 = 9 ft. Halfway up the bank the swale is 9 ft wide.
  3. Area. A = m × h = 9 × 4 = 36 ft² of cross-section. Equivalently ½(12 + 6)(4) = ½(18)(4) = 36.
  4. Horizontal run per bank. The bases differ by 12 − 6 = 6 ft, split equally, so each bank runs 3 ft horizontally over 4 ft of rise.
  5. Leg length. c = √(3² + 4²) = √25 = 5 ft. Both legs, since the section is symmetric.
  6. Perimeter. P = 12 + 6 + 5 + 5 = 28 ft.
  7. Base angle. arctan(4/3) = 53.13° from the horizontal, a slope of 0.75:1 — steeper than most soils hold, which is a design flag rather than an arithmetic one.

Turn the cross-section into volume: 36 ft² over a 250 ft run is 36 × 250 = 9,000 ft³, or 9,000 ÷ 27 = 333.3 cubic yards of excavation. Note what happens if you flatten the banks to 2:1 (2 ft horizontal per 1 ft vertical) while keeping the 6 ft bottom and 4 ft depth: each bank now runs 8 ft, the top width becomes 6 + 16 = 22 ft, and the area becomes ½(22 + 6)(4) = 56 ft² — 56% more excavation for the same depth and bottom.

Reading the result, and the check the calculator runs for you

The midsegment is the most useful secondary number. It is the equivalent uniform width, so it tells you directly what rectangle the trapezoid is worth. For a channel it is the average width of flow; for a roof plane it is the width to use when ordering by the square; for the trapezoidal rule it is the mean of the two ordinates.

The base angles convert straight into slope. An angle of 45° is 1:1, 26.57° is 2:1, 18.43° is 3:1. Earthwork specifications quote the horizontal-to-vertical ratio rather than the angle, so read the angle and convert: run = h / tan(angle). Anything steeper than about 1.5:1 in unstabilised soil is a design decision, not a geometry one.

The calculator also runs a consistency check that hand calculations skip. Given a, b and h, the two legs are not free: their horizontal runs must add up to exactly |a − b|. If you enter legs of 5 and 5 with bases differing by 6 and a height of 4, the runs are 3 and 3, which total 6 — consistent. Enter legs of 5 and 5 with bases differing by 4 and the runs still total 6, so the figure cannot close, and the perimeter and angles reported would describe a different trapezoid from the one whose area you computed. When that happens the tool says so, and keeps the area and midsegment, which depend only on a, b and h and remain correct.

Trapezoidal channel: area and top width by side slope

Bottom width 4 ft, depth 3 ft. Side slope z is horizontal run per unit of rise. Top width T = b + 2zh; area A = (b + zh)h.
Side slope (z:1)Bank angleTop width T (ft)Area (ft²)Leg length (ft)
0 (vertical)90.00°4.012.003.000
0.5:163.43°7.016.503.354
1:145.00°10.021.004.243
1.5:133.69°13.025.505.408
2:126.57°16.030.006.708
3:118.43°22.039.009.487

Each area is ½(T + 4)(3) evaluated at that top width; each leg is √((3z)² + 3²). Flattening the banks from 1:1 to 2:1 adds 43% to the excavated cross-section.

Where trapezoid calculations go wrong

  • Using a leg length as the height. The height is the perpendicular distance between the parallel sides. A 5 ft bank on a 4 ft deep ditch gives an area 25% too large if you substitute it.
  • Averaging the wrong pair of sides. The midsegment averages the two parallel sides. Averaging a base and a leg is meaningless.
  • Entering legs that cannot close the figure. Their horizontal runs must total |a − b|. The calculator flags the mismatch instead of quietly reporting impossible angles.
  • Assuming the trapezoid is isosceles. Nothing in the area formula requires equal legs, and a ditch cut against a slope rarely has them.
  • Forgetting that flow area is not cross-section area. In an open channel only the wetted part carries water, so recompute with the water depth, not the ditch depth.
  • Confusing the names. In British usage a trapezium is what US texts call a trapezoid, and a US trapezium is a quadrilateral with no parallel sides at all. Check which convention a source is using before trusting its formula.

Related shapes and the trapezoidal rule

Push the shorter base to zero and the trapezoid becomes a triangle, and ½(a + 0)h reduces to the familiar ½bh — use the triangle area calculator there. Make the bases equal and it becomes a parallelogram with A = bh, which the parallelogram area calculator handles, and if the legs are also perpendicular you have a rectangle, covered by the rectangle area and perimeter calculator. Every one of those is a special case of the same expression.

For a four-sided figure with no parallel sides, this formula does not apply at all. Take the corner coordinates and use the shoelace formula area calculator, which is what surveyors use for irregular parcels and what a CAD package does internally.

The same average-the-ends idea underpins the trapezoidal rule in calculus: to estimate the area under a curve, slice it into strips and treat each strip as a trapezoid, giving ∫f(x)dx ≈ Σ ½(f₁ + f₂)Δx. Surveyors use the identical arithmetic under the name "average end area" to convert cross-sections into earthwork volumes: average two adjacent section areas and multiply by the distance between them. If you are working those cross-sections up from field angles, the law of cosines calculator closes the traverse triangles.

Frequently asked questions

What is the formula for the area of a trapezoid?

A = ½(a + b)·h, where a and b are the two parallel sides and h is the perpendicular distance between them. Equivalently, area = midsegment × height, since the midsegment is (a + b)/2. The legs never enter the area; they only affect the perimeter and the base angles.

How do I find the height of a trapezoid from its area?

Rearrange to h = 2A / (a + b). A trapezoid of area 42 with bases 10 and 4 has height 84/14 = 6. Switch this calculator to Height from a known area and it does the rearrangement for you. Both bases must be known; the area alone is not enough.

What is the midsegment of a trapezoid?

The midsegment, also called the median, joins the midpoints of the two legs. It runs parallel to both bases and its length is their average, (a + b)/2. Because area = midsegment × height, the midsegment is the width of the rectangle that has the same area and height as the trapezoid.

Do the legs change the area?

No. Two trapezoids with identical bases and identical height have identical areas no matter how differently their legs slope, because sliding the top base sideways shears the figure without changing its height or its average width. The legs do change the perimeter and the base angles.

Why does the calculator say my legs are inconsistent?

Because the horizontal runs of the two legs, √(c² − h²) and √(d² − h²), do not add up to the difference between the bases. When that happens the four sides and the height you entered cannot form a single closed figure. The area and midsegment stay valid because they never use the legs.

Is a parallelogram a trapezoid?

Under the inclusive definition used by most modern texts, yes: a parallelogram has at least one pair of parallel sides, so it qualifies, and the formula returns base × height correctly when a = b. Under the exclusive definition, which requires exactly one parallel pair, it does not. The arithmetic here works either way.

How do I get the volume of a ditch from this?

Multiply the cross-sectional area by the length of the run if the section is uniform. A 36 ft² section over 250 ft is 9,000 ft³, which is 333.3 cubic yards. Where the section changes along the run, average the two end areas and multiply by the distance between them — the average end area method.

What is the difference between a trapezoid and a trapezium?

They are the same figure under different national conventions. US texts call a quadrilateral with one pair of parallel sides a trapezoid; British texts call it a trapezium. Confusingly, a US trapezium is a quadrilateral with no parallel sides. The formula A = ½(a + b)h always refers to the shape with the parallel pair.

References

  • CRC Standard Mathematical Tables and Formulae, 33rd ed. — CRC Press
  • Open-Channel Hydraulics — Ven Te Chow, McGraw-Hill
  • Elementary Surveying: An Introduction to Geomatics, 15th ed. (average end area volumes) — Ghilani, Pearson