Trapezoid height from area calculator
Work backwards from a trapezoid's area to its perpendicular height: an area of 60 with bases 8 and 12 gives a height of 6, with a midsegment of 10 to check the result. A zero base sum is rejected. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Area
- 60
- Base a
- 8
- Base b
- 12
- Midsegment
- 10
- Height
- 6
When you already know a trapezoid’s area and the lengths of its two parallel sides, the missing piece is almost always the perpendicular height between those bases. Land surveyors, architecture students, and homework solvers hit this inverse form constantly: the textbook formula A = (a + b) / 2 × h is easy to rearrange, but easy to botch under time pressure when a + b is small or zero.
The area formula inverted for perpendicular height
A trapezoid (trapezium in some locales) is a quadrilateral with exactly one pair of parallel sides, called the bases. The area of a trapezoid equals the product of the midsegment and the perpendicular height: A = m × h, where the midsegment m is the arithmetic mean of the two bases, m = (a + b) / 2. The height reported is always the perpendicular distance between the lines that contain the bases, not a slanted non-parallel leg.
When the two bases are equal the figure is a parallelogram (or rectangle), m equals either base, and the formula collapses to the familiar h = A / a. What you must never do is divide by a zero sum: if both bases are zero, or more generally if a + b equals zero, there is no well-defined midsegment scale and the height cannot be recovered from area alone.
When you need the height from the area
Classroom platforms and tutoring sites use a trapezoid height from area calculator so learners can check the rearranged formula without flipping algebra errors when a and b differ widely. Construction and landscape estimators often know floor or plot area and the lengths of two parallel boundaries and need the perpendicular width for material take-offs; a tiny parse call avoids standing up a full CAD kernel for one division.
Exam generators and LMS auto-graders need a deterministic oracle that marks the zero base-sum case as invalid instead of silently returning Infinity that a buggy grader might accept. Failed validation does not consume balance. Keep requests small, pin the rounded height in tests, and you get reproducible perpendicular heights for homework, survey scripts, and edge workers without inventing geometry infrastructure of your own.
What you can do with it
Survey and construction take-offs
Estimate perpendicular width of a trapezoidal plot or slab when total area and the two parallel sides are already measured.
LMS and content generators
Auto-grade trapezoid inverse problems with a deterministic oracle that rejects undefined height when a + b is zero.
FAQ
Is the height the perpendicular distance?
Yes. The reported height is the perpendicular distance between the parallel sides, not the length of a non-parallel leg.
Can bases or area be zero?
Area may be zero (then height is zero when bases sum is positive). A single base may be zero if the other is positive. Both bases zero is rejected as a zero base sum.
What height does a trapezoid with an area of 60 and bases 8 and 12 have?
The height is 6. The midsegment, the average of the bases, is 10, and 10 times 6 gives back the area of 60, which confirms the result.
What units should the area and the bases use?
The area must be in the square of the unit used for the bases, for example square metres with bases in metres. The height then comes out in that same length unit.
What if both bases are the same length?
Then the shape is a parallelogram or a rectangle, the midsegment equals either base, and the height is simply the area divided by one base.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/geom/trapezoid-height \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"area":60,"base_a":8,"base_b":12}'const res = await fetch("https://api.kit.forhosting.com/geom/trapezoid-height", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"area": 60,
"base_a": 8,
"base_b": 12
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/trapezoid-height",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"area": 60,
"base_a": 8,
"base_b": 12
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/trapezoid-height", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"area":60,"base_a":8,"base_b":12}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"area":60,"base_a":8,"base_b":12}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/trapezoid-height", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"area": 60,
"base_a": 8,
"base_b": 12
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.trapezoid_height",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This trapezoid height from area calculator accepts area and the two bases, applies h = 2A / (a + b), and returns the height together with the midsegment so you can double-check the average base length. If the sum of the bases is zero the division is undefined and the task fails with invalid_input instead of inventing Infinity.
The area formula inverted for perpendicular height
Substituting and solving for h yields the compact identity h = 2A / (a + b). That single division is the entire computational core of this capability. When one base is zero the figure degenerates toward a triangle with base equal to the other side and height still given by h = 2A / b. This endpoint encodes that geometric fact as an invalid_input error with an explicit message about the base sum, matching how a careful student would stop rather than write Infinity on the answer sheet.
Input contract, response fields, and validation rules
Negative area or a negative base is rejected because lengths and area in Euclidean geometry are non-negative for this inverse problem. Pair the response with your own unit labels; the calculator is unit-agnostic and only requires that area use the square of the same linear unit as the bases. POST a JSON body with three required finite numbers: area (non-negative), base_a (non-negative length of the first parallel side), and base_b (non-negative length of the second parallel side). Each field may arrive as a JSON number or as a numeric string; aliases such as A or surface for area, and a, top, or parallel_a for base_a, are accepted so generators that already speak textbook notation do not need a rename step. Missing fields, empty strings, NaN, and Infinity fail with invalid_input naming the field. On success the body echoes the rounded inputs, reports midsegment as (base_a + base_b) / 2, reports height as 2 × area / (base_a + base_b), and includes a short formula string h = 2*A / (a+b) suitable for display next to the answer. Example: area sixty, base_a eight, base_b twelve yields midsegment ten and height six, because sixty divided by ten is six, which matches two times sixty divided by twenty.
Where a height-from-area API earns its keep
Use this endpoint when area is known and height is unknown; use the companion trapezoid area calculator when height is known and area is the target.
Integration use cases
Homework and exam checks
Students submit area and both bases to verify the rearranged formula h = 2A/(a+b) and catch zero base-sum errors before grading.
Technical questions
How do I find trapezoid height from area?
Send non-negative finite numbers area, base_a, and base_b. The API returns height = 2×area/(base_a+base_b) and midsegment = (base_a+base_b)/2.
What if the sum of the bases is zero?
The task fails with invalid_input. Height is undefined when base_a + base_b equals zero because the formula divides by that sum.
What does the trapezoid height calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.