ForHosting KIT · Math

Wedge volume calculator

Work out the volume of a ramp-shaped solid from its base and two end heights: a 10 by 4 base sloping from a height of 6 down to 2 holds 160. Handy for concrete ramps, hoppers and retaining-wall wedges. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Base length
10
Base width
4
Height1
6
Height2
2
You get
Volume
160

A rectangular wedge is a three-dimensional solid with a rectangular base and a top face that slopes linearly from one end height to the other. Given the base length, base width, and the two heights measured at opposite ends of the length, this calculator returns the enclosed volume with a closed-form average-height formula.

How rectangular wedge volume is computed

Height varies linearly along the base length from height1 to height2 while the width stays constant, so the solid is a right wedge with rectangular footprint. Equivalently, the volume is the base area multiplied by the average of the two end heights.

Classic checks include a ten-by-four base with heights six and two, which averages four and yields volume one hundred sixty; equal heights of five on a three-by-two base recover the rectangular prism volume of thirty; one height zero and the other six on a ten-by-four base yield the half-box triangular prism volume of one hundred twenty. Because the path uses only multiplication, addition, and a factor of one-half, it is deterministic, O(1), and free of iterative solvers.

Where rectangular wedge calculations show up in real work

Secondary-school and college solid-geometry courses ask for the volume of a wedge given a rectangular base and two end heights, often as a special case of a prismatoid or as a tapered box; a trusted calculator with a strict non-negative gate speeds homework grading and removes spreadsheet mistakes where someone multiplies only one height or forgets the factor of one-half.

Civil, mechanical and manufacturing workflows size ramped floor sections, machine-guard covers, tapered hoppers with rectangular footprint, and retaining-wall wedges from plan length, plan width and the two elevation heights; volume feeds concrete, fill or material estimates without a full CAD mesh. Architecture and interior design use the same numbers for stair landings with a sloping underside, roof-like prism wedges, and auditorium seating ramps. Packaging and industrial design estimate capacity of trays and chutes that rise from a low lip to a high wall.

Game, graphics and CAD libraries sometimes expose simple parametric wedges for level props and collision proxies; deterministic volume from four scalars supports property panels without a full mesh library. If you later need surface area of an oblique wedge, pyramid frustum volume, or mesh-based solid volume, treat those as separate search intents rather than overloading this rectangular-wedge landing.

Homework and exam checks

Compute rectangular wedge volume from base length, base width and two end heights, and reject negative dimensions with a clear error.

Civil and manufacturing estimates

From plan length, plan width and two elevation heights, recover fill or material volume for ramps, hoppers and tapered guards.

What happens if any dimension is negative?

Base length, base width, height1 and height2 must not be negative; the error message names the field.

Is a zero dimension allowed?

Yes. Zero is non-negative and yields a defined (possibly degenerate) volume—for example one zero height collapses the wedge toward a triangular prism, and a zero base edge collapses the solid to volume zero.

What does it cost?

The browser tool is free and runs locally.

How is the volume of a rectangular wedge calculated?

Multiply the base area by the average of the two end heights, which equals half the base length times the width times the sum of the heights. When one height is zero, the result is exactly half of the matching box.

What if both end heights are the same?

Then the top is flat and the wedge is simply a box, so the result equals the volume of a rectangular prism with that base and that height.

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.

POSThttps://api.kit.forhosting.com/geom/wedge

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.

curl -X POST https://api.kit.forhosting.com/geom/wedge \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"base_length":10,"base_width":4,"height1":6,"height2":2}'
{
  "base_length": 10,
  "base_width": 4,
  "height1": 6,
  "height2": 2
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geom.wedge",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Any negative dimension is rejected with a clear invalid_input error instead of a silent nonsense volume. No network calls, no random sampling, and no floating-point surprises beyond ordinary IEEE-754 arithmetic on the numbers you provide.

How rectangular wedge volume is computed

Label the rectangular base edges as base_length and base_width, and the vertical heights at the two ends of the length as height1 and height2. Integrating the height profile over the base recovers a simple closed form: volume equals one-half times base_length times base_width times the sum of height1 and height2. Huge magnitudes can still overflow IEEE-754 double range; when intermediates are non-finite the request fails with a clear overflow message instead of returning Infinity in JSON. That closed form matches solid-geometry textbooks for rectangular wedges and tapered boxes and keeps automated graders aligned with hand computation on the same four numbers.

What you send and what you get back

None of the four may be negative; zero is allowed and produces a mathematically defined (possibly degenerate) volume. Wire the free browser tool for quick sanity checks, then call the identical contract from scripts for bulk evaluation without reimplementing the wedge formula in every language. Provide four required finite numbers: base_length and base_width are the edges of the rectangular base, and height1 and height2 are the end heights along the length. Missing fields, empty strings, non-numeric text, NaN, Infinity, and any negative dimension are rejected with invalid_input and are not charged. On success the JSON response returns base_length, base_width, height1, height2, volume, and method set to rectangular_wedge_avg_height so logs and teaching UIs can document the algorithm. Example checks: base_length ten, base_width four, height1 six and height2 two yield volume one hundred sixty; equal heights recover a rectangular prism; a negative height2 fails naming the field. API pricing is the published base of $0.002 per successful item.

Where rectangular wedge calculations show up in real work

Because this capability is a pure parse engine, failed validation does not consume balance and successful runs stay at $0.002 per item.

CAD and parametric props

Turn four scalars into a deterministic wedge volume for layout panels, collision proxies and synthetic geometry fixtures.

What formula does this calculator use?

volume = (base_length × base_width × (height1 + height2)) / 2, which is the base area times the average of the two end heights. The response includes method: "rectangular_wedge_avg_height".

What if height1 equals height2?

The solid is a rectangular prism (cuboid). The formula reduces to volume = base_length × base_width × height, matching the classic box volume.

Read the full KIT documentation →