Audited 29 Jul 2026·Last updated 31 Jul 2026·4 citations·Tier 2·0 uses

Trapezoid Calculator

Solve a trapezoid from its two parallel sides plus either both legs or the height. Get exact area, perimeter, height, median, diagonals and base angles.

Trapezoid Calculator

Which measurements do you have?
Must be strictly longer than base b. If your two parallel sides are equal the shape is a parallelogram, not a trapezoid.
The other parallel side. Any unit — results come back in the same one.
Used by the first mode only. A trapezoid exists only when the overhang a − b is bigger than |c − d| and smaller than c + d — the triangle inequality on c, d and a − b.
Used by the first mode only. Swapping c and d mirrors the trapezoid: the area, perimeter and median are unchanged and the two base angles trade places.
Used by the two assumption modes only. This is the perpendicular distance between the parallel sides, not the length of a leg.
Area
34.2929
½(a + b)h — the median times the height. In the input's unit, squared. This is exact in all three modes, because the area depends only on the two parallel sides and the perpendicular height.
Perimeter
26
Height (h)
4.899
Median / midsegment (m)
7
Leg c (left)
5
Leg d (right)
7
Diagonal (long base's left corner → far top corner)
7
Diagonal (long base's right corner → far top corner)
10.247
Base angle at the left (degrees)
78.463
Base angle at the right (degrees)
44.4153

Background.

The Quanta trapezoid calculator solves the whole shape, not just its area. Give it the two parallel sides plus either both legs or the perpendicular height, and it returns the area, the perimeter, the height, the median, both diagonals and both base angles. With the default figures — a long base of 10, a short base of 4, and legs of 5 and 7 — the height comes back as 4.8989794856, the area as 34.292856399, the perimeter as exactly 26, the median as exactly 7, and the two diagonals as exactly 7 and 10.246950766.

The leg mode is the reason this page exists, and it is the default. Two parallel sides and a height are not enough to pin a trapezoid down: you can slide the short base left or right along its line and the area never changes, but the legs, the diagonals and the angles all do. That is why a general area-and-perimeter tool can give you an exact area from a height and then only guess at the perimeter. Enter the legs instead and there is nothing left to guess — the shape is fully determined, and every number on this page is exact.

If the height is what you have, pick one of the two assumption modes and the page will say which assumption it made. Isosceles mode splits the overhang evenly, so the legs come out equal, the diagonals come out equal and the two base angles match. Right-trapezoid mode puts one leg perpendicular to both bases, so the left base angle is exactly 90°. Neither is a measurement; both are choices, and they are labelled as choices right on the mode selector rather than buried three screens down.

Not every set of four numbers describes a trapezoid. Slide the right leg along the bases until it meets the foot of the left leg and the two legs plus the overhang a − b form a triangle, so the shape exists only when the overhang is bigger than the difference of the legs and smaller than their sum. Break that and the height would come out imaginary; this calculator refuses the input and names the inequality you broke instead of returning a meaningless number.

One naming note belongs up here rather than in a footnote. This page uses the North American sense of the word: a quadrilateral with one pair of parallel sides. In British usage the same shape is a trapezium, and confusingly a British trapezoid is a quadrilateral with no parallel sides at all. Wolfram MathWorld states the equivalence directly — the trapezoid is the British trapezium — and Euclid, writing long before either convention, used trapezia as a catch-all for every quadrilateral that was not a square, an oblong, a rhombus or a rhomboid. The page also follows the exclusive definition, under which a parallelogram is not a trapezoid, so it requires the long base to be strictly longer than the short one. Enter two equal parallel sides and it will tell you to use the area and perimeter calculator instead, rather than quietly reporting a parallelogram's numbers under a trapezoid's name.

What is trapezoid calculator?

A trapezoid is a quadrilateral with one pair of parallel sides. Wolfram MathWorld defines it as "a quadrilateral with two sides parallel" and notes that "the trapezoid is equivalent to the British definition of trapezium". The two parallel sides are the bases, conventionally a for the longer and b for the shorter; the other two sides are the legs, c and d; and the perpendicular distance between the bases is the height h.

The area is MathWorld's Equation (1), A = ½(a + b)h — the average of the two parallel sides multiplied by the distance between them. That average has a name and a geometric meaning of its own: the median or midsegment, Equation (10), m = ½(a + b), is the segment joining the midpoints of the two legs, and it is parallel to both bases with exactly that length. So the area is simply the median times the height, which is why a trapezoid behaves like a rectangle of the same height whose width is the average of its two ends.

What a trapezoid is not is determined by its area alone. Two parallel sides and a height leave one degree of freedom — the horizontal offset of the short base, written p on this page — and that offset controls the legs, the diagonals and all four interior angles while leaving the area untouched. Fixing the two legs removes the last freedom. MathWorld gives the resulting height in closed form at Equation (19), h = η / (2|b − a|) with η = √((−a+b+c+d)(a−b+c+d)(a−b+c−d)(a−b−c+d)), and the two diagonals at Equations (17) and (18). This calculator reaches the same numbers by a different route — placing the shape on coordinate axes and solving for p — and the test suite checks the two routes against each other on every run.

Special cases are worth naming. An isosceles trapezoid has equal legs; equivalently, equal base angles, or equal diagonals — any one of the three implies the other two, which makes measuring the diagonals a fast way to check a shape in the workshop. A right trapezoid has two right angles, meaning one leg is perpendicular to both bases. And under the exclusive definition used here, a parallelogram — where both pairs of sides are parallel and the two bases are equal — is not a trapezoid at all.

How to use this calculator.

  1. Choose your mode. Pick the first option if you have measured both legs: the trapezoid is then fully determined and every result is exact. Pick isosceles or right-trapezoid only if all you have is the height, and read the assumption each one makes.
  2. Enter base a, the longer of the two parallel sides. It must be strictly longer than base b — equal parallel sides make a parallelogram, which this page will not report as a trapezoid.
  3. Enter base b, the shorter parallel side. Any unit works, as long as all four inputs use the same one; lengths come back in that unit and the area in that unit squared.
  4. In leg mode, enter legs c and d. Left and right only matter for which base angle is which; swapping them mirrors the shape and leaves the area, perimeter and median unchanged.
  5. In the two height modes, enter the perpendicular gap between the parallel sides. Measure straight across at a right angle, not along a leg — a leg is always at least as long as the height and is usually longer.
  6. Read the area at the top, then the perimeter, height and median below it. The median is the average of the two bases and is what the area is really built from.
  7. Use the two diagonals to check a shape you have already built. If they come back equal, the trapezoid is isosceles; if they differ, it is not, no matter how symmetric it looks.
  8. If the calculator refuses your legs, read the message: it will tell you whether the overhang a − b was too big for the legs to reach or too small for them to spread. That is the triangle inequality applied to c, d and a − b.

The formula.

p = (k² + c² − d²) ⁄ 2k , h = √(c² − p²) , A = ½(a + b)h , m = ½(a + b)

Place the longer base on the x-axis with its left end at the origin, so the corners are (0, 0), (a, 0), (p + b, h) and (p, h). The unknown p is how far the short base's left end sits to the right of the origin. Writing the two legs with the distance formula gives c² = p² + h² and d² = (k − p)² + h², where k = a − b. Subtract the first from the second and h² cancels, leaving a linear equation in p whose solution is p = (k² + c² − d²) ⁄ 2k. Put that back into the first equation and h = √(c² − p²). Everything else is now a distance or an angle read straight off the coordinates, with no further assumption anywhere.

Working the default all the way through: a = 10, b = 4, c = 5, d = 7, so k = 6 and p = (36 + 25 − 49) ⁄ 12 = 1. The height is √(25 − 1) = √24 = 4.898979485566356, displayed as 4.8989794856. The median is ½(10 + 4) = 7 exactly, so the area is 7 × 4.898979485566356 = 34.29285639896449, displayed as 34.292856399. The perimeter is 10 + 4 + 5 + 7 = 26, exactly. The first diagonal runs from (0, 0) to (5, 4.898979485566356), so its length is √(25 + 24) = √49 = 7 exactly; the second runs from (10, 0) to (1, 4.898979485566356), giving √(81 + 24) = √105 = 10.246950765959598, displayed as 10.246950766. The base angles are atan2(4.898979485566356, 1) = 78.4630409672° and atan2(4.898979485566356, 5) = 44.4153085972°.

The same trapezoid can be checked without any of this machinery. Cut it into a parallelogram of width b and a triangle whose sides are the two legs and the overhang — here a triangle with sides 5, 6 and 7. Heron's formula gives that triangle's area as √(9 × 4 × 3 × 2) = √216 = 14.696938456699069, so its height on the base of 6 is 2 × 14.696938456699069 ⁄ 6 = 4.898979485566356, the same h. The whole area is then 4 × 4.898979485566356 + 14.696938456699069 = 34.29285639896449, the same area. Two derivations that share no algebra land on the same digits.

The height modes replace the solve for p rather than the rest of the computation. Isosceles mode sets p = k ⁄ 2, so the overhang splits evenly and the legs come out equal; right-trapezoid mode sets p = 0, so the left leg is vertical. Both then run the identical code, which is why right-trapezoid mode returns a left leg of exactly the height and a left base angle of exactly 90° without either being hard-coded.

Rounding stage: every intermediate is carried at 40 significant digits and rounded once, at the return boundary, to 10 decimal places. π is computed as arccos(−1) at that precision for the radians-to-degrees conversion rather than typed as a literal. The offset p and the height h are never rounded before the legs, diagonals, area and angles are derived from them — rounding the pivot first would put visible error in the diagonals, which are quadratic in p, and would destroy the exact 7 that the first diagonal returns here. Nothing on this page is sorted into bands or graded, so no wording depends on a rounded value.

A worked example.

Example

A carpenter is building a tapered planter box. The bottom board is 10 inches across, the top opening is 4 inches, and the two slanted sides measure 5 inches and 7 inches — deliberately different, because the box is meant to lean. Entering those four numbers in leg mode returns a height of 4.8989794856 inches, which is the vertical depth of the profile and the number needed to work out how tall the box stands. The area of the end panel comes back as 34.292856399 square inches, so a pair of ends takes just under 69 square inches of stock. The perimeter is exactly 26 inches of edge to sand, and the median is exactly 7 inches: cut a horizontal brace halfway up and it will measure 7 inches, the average of 10 and 4, whatever the lean is doing. The two diagonals are exactly 7 inches and 10.246950766 inches, and they are the numbers to measure against once the panel is glued up — if they come back matching each other rather than 7 and 10.25, the panel has been assembled as an isosceles trapezoid and one of the legs is on the wrong side. The base angles are 78.4630409672° on the 5-inch side and 44.4153085972° on the 7-inch side, so the mitre saw wants roughly 78.5° and 44.4° from the bottom edge, and the two top corners are their supplements, about 101.5° and 135.6°. One check worth doing before cutting: the overhang is 10 − 4 = 6 inches, the legs differ by 2 and sum to 12, and 6 sits comfortably between those, so the shape closes. Had the carpenter asked for a 13-inch bottom with the same legs the overhang would have been 9, still legal, but a 17-inch bottom would give an overhang of 13 against a leg sum of 12, and no such box can be built at all.

modelegs
base110
leg Right7
base24
leg Left5
height6

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 — MathWorld's Equation (1). Read it as the median times the height: since the median m = ½(a + b) is the segment joining the midpoints of the legs, a trapezoid has the same area as a rectangle of the same height whose width is the average of the two bases. With the default figures the median is exactly 7 and the height is 4.8989794856, so the area is 34.292856399. The formula does not care about the legs at all, which is exactly why a height alone cannot give you the perimeter.
Why does this calculator ask for both legs instead of just the height?
Because two parallel sides and a height do not determine a trapezoid. Keep the bases and the height fixed and slide the short base sideways: the area never budges, but the legs, the diagonals and all four angles change continuously. That last degree of freedom is the offset p, and the only way to remove it is to supply the legs. Once you do, p = (k² + c² − d²) ⁄ 2k with k = a − b, the height follows as √(c² − p²), and every output is exact. If you only have the height, the isosceles and right-trapezoid modes each supply the missing assumption for you and say which one they used.
How do I find the height of a trapezoid if I only know the four sides?
That is what leg mode does. Solve for the offset first — p = (k² + c² − d²) ⁄ 2k, where k = a − b — then h = √(c² − p²). With a = 10, b = 4, c = 5 and d = 7 that gives p = 1 and h = √24 = 4.8989794856. MathWorld's Equation (19) reaches the same number by a different route, h = η ⁄ (2|b − a|) with η = √((−a+b+c+d)(a−b+c+d)(a−b+c−d)(a−b−c+d)); here η = √3456 = 58.787753827 and 58.787753827 ⁄ 12 = 4.898979486. This page's tests check the two forms against each other on every run.
Why does the calculator reject my four side lengths?
Because no trapezoid has them. Slide the right leg along the bases until it starts where the left leg starts, and the two legs plus the overhang a − b form a triangle — so the shape exists only when |c − d| < a − b < c + d, which is the triangle inequality. With legs of 5 and 7 the overhang must be strictly between 2 and 12. Make it 12 or more and the legs cannot reach across; make it 2 or less and they cannot spread far enough. In both cases the height would come out as the square root of a negative number, so the page refuses the input and names which side of the inequality failed instead of returning something meaningless.
How do I know whether my trapezoid is isosceles?
Measure the diagonals. In a trapezoid the legs are equal if and only if the diagonals are equal, and if and only if the two base angles are equal — the three conditions stand or fall together. That makes the diagonal check the practical one, because a diagonal is easy to measure across a finished panel while a base angle is not. Run the default figures and the diagonals come back as 7 and 10.246950766, which are plainly different, so that trapezoid is not isosceles. Run isosceles mode on the same bases with a height of 6 and both diagonals come back as 9.2195444573.
What is the median or midsegment of a trapezoid?
It is the segment joining the midpoints of the two legs, and its length is m = ½(a + b) — MathWorld's Equation (10). It runs parallel to both bases and its length is their average regardless of how slanted the legs are, which is what makes it useful: a brace fitted halfway up a tapered panel always measures the average of the two ends. For the default trapezoid that is ½(10 + 4) = 7 exactly. The median is also the whole story behind the area formula, since A = mh.
Is a parallelogram a trapezoid? What about the British trapezium?
It depends which definition you were taught, and this page picks one and says so. Under the inclusive definition, a trapezoid needs at least one pair of parallel sides, so every parallelogram counts. Under the exclusive definition — the one most North American school texts use, and the one implemented here — it needs exactly one, so a parallelogram does not count. This calculator therefore requires the long base to be strictly longer than the short one, and refuses equal bases rather than reporting a parallelogram's numbers under a trapezoid's name. Separately, the naming differs across the Atlantic: MathWorld notes that the trapezoid is equivalent to the British trapezium, while a British trapezoid has no parallel sides at all. Euclid, in Elements Book I Definition 22, used trapezia for every quadrilateral that was not a square, an oblong, a rhombus or a rhomboid.
Can I use this page for a trapezoidal prism or a trapezoidal channel?
For the cross-section, yes — that is exactly what the area, height and median outputs are for. Multiply the area by the length of the prism to get its volume, or by a depth to get a fill volume. What this page does not do is any three-dimensional work of its own: no surface area, no volume, no wetted perimeter, no hydraulic radius. It also assumes a flat, convex, non-self-intersecting quadrilateral, which is the only shape the existence condition admits.

References& sources.

  1. [1]Wolfram Research, MathWorld — ‘Trapezoid’ (live revision retrieved 2026-07-29). Source for Equation (1) area A = ½(a + b)h, Equation (10) median m = ½(a + b), Equations (17) and (18) for the two diagonals in terms of the four side lengths, and Equation (19) height h = η/(2|b − a|) with η = √((−a+b+c+d)(a−b+c+d)(a−b+c−d)(a−b−c+d)). Also the statement ‘The trapezoid is equivalent to the British definition of trapezium.’ Equations (17), (18) and (19) are asserted against this module's independently derived values in trapezoid.test.ts. Open access.
  2. [2]Wolfram Research, MathWorld — ‘Heron's Formula’ (live revision retrieved 2026-07-29). Equation (2), Δ = √(s(s − a)(s − b)(s − c)) with s the semiperimeter. Used as a third, fully independent derivation of the trapezoid's height: the triangle formed by the two legs and the overhang a − b has area √216 and therefore height 4.898979485566356 on a base of 6, matching the coordinate solution exactly. Open access.
  3. [3]Euclid, Elements, Book I, Definition 22 — after defining the square, oblong, rhombus and rhomboid, ‘let quadrilaterals other than these be called trapezia.’ David E. Joyce web edition of the Heath translation, Clark University; quotation confirmed on retrieval 2026-07-29. Cited for the naming history and the definitional scope note, not for any computed value.
  4. [4]Wolfram Research, MathWorld — ‘Triangle Inequality’ (live revision retrieved 2026-07-29). The condition that a triangle with sides x, y and z exists only when each side is shorter than the sum of the other two. Applied here to the legs c and d and the overhang a − b, it is the exact existence condition for a trapezoid and is what this calculator enforces before computing anything. Open access.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 977 calculators remain free
  • No billing is enabled
Coming soon