N-gonal bipyramid calculator
Enter how many sides the middle polygon has, its edge and the height of one tip, and get the bipyramid's volume and surface: a square one with edge 2 and height 1 has a base area of 4 and a volume of 8/3. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Sides
- 4
- Side
- 2
- Height
- 1
- Base area
- 4
- Volume
- 2.6666666667
- Surface area
- 11.313708499
- Face slant
- 1.4142135624
A regular n-gonal bipyramid is the dual-apex solid formed when two congruent pyramids share a regular n-gon as their common base: the equatorial polygon has n equal sides, and the two apexes sit on opposite sides of that plane along the common axis. Given the integer side count n, the equatorial edge length, and the perpendicular height from one apex to the equator, this calculator returns the equatorial base area, the enclosed volume of the full bipyramid, the face slant height of each isosceles triangular face, the equatorial apothem, and the total surface area of the 2n triangles.
How volume and surface area are computed
Label the number of sides of the regular equatorial polygon as sides n (an integer at least three), the common edge length of that n-gon as side a, and the perpendicular distance from either apex to the equatorial plane as height h. The equatorial apothem (inradius of the n-gon) is r equals a over two times tan of pi over n.
Each of the 2n faces is an isosceles triangle whose altitude from the apex edge midpoint down to the equatorial edge is the face slant m equals the square root of h squared plus r squared. Total surface area is n times a times m, because half-perimeter of one equator times m for each pyramid half doubles to the full solid.
Classic check: n equals four, a equals one, and h equals one over square root of two recovers the regular octahedron volume square root of two over three and surface two times square root of three, matching the dedicated octahedron formulas. Because the path uses only multiplication, division, tangent of a fixed half-angle, and one square root, it is deterministic, O(1), and free of iterative solvers.
What you send and what you get back
Provide three required fields: sides is the integer count of equatorial edges and must be at least three; side is the equatorial edge length and must be strictly positive; height is the apex-to-equator perpendicular distance and must also be strictly positive. Side counts below three fail with a message that sides must be at least three for an n-gonal bipyramid—the same digon and monogon gate used on regular-polygon landings.
There is no optional unequal half-heights, oblique apex offset, or irregular equator—this landing is the regular centered bipyramid from n, a, and h only. Example checks: square bipyramid n equals four with a equals two and h equals one yields base area four, volume eight thirds, and a surface built from eight isosceles triangles; triangular bipyramid n equals three is the dual-apex solid over an equilateral triangle.
Wire the free browser tool for quick sanity checks, then call the identical contract from scripts for bulk evaluation without reimplementing bipyramid formulas in every language.
Where n-gonal bipyramid calculations show up in real work
Secondary-school and college solid-geometry courses constantly ask students for the volume and surface area of regular bipyramids and of the regular octahedron as a special square bipyramid; a trusted calculator with a strict n-at-least-three gate and positive edge and height checks speeds homework grading and removes spreadsheet mistakes where someone applies a single-pyramid formula or forgets that surface area has no equatorial faces.
Architecture, exhibition, and fabrication workflows size dual-peak tents, pavilion spires, and decorative polyhedra from plan side count, edge length, and cut height; volume feeds fill and material estimates while total surface area feeds cladding and paint takeoffs before faces are detailed. Packaging, jewelry, and product design often use bipyramid silhouettes for point-of-sale geometry; deterministic metrics support quotes without a full mesh library. Game, graphics, and CAD libraries store regular bipyramid primitives for collision proxies and lighting volumes; echoing method plus the three inputs makes debug property panels self-describing.
If you later need a single pyramid, a pyramid frustum, or only equatorial n-gon area without the dual apexes, treat those as separate search intents rather than overloading this n-bipyramid landing.
What you can do with it
Homework and exam checks
Compute regular n-gonal bipyramid volume and surface area from sides, edge, and height, and reject n below three with a clear error.
Dual-peak tents and fabrication
From equatorial side count, edge length, and apex height, recover fill volume and cladding area for dual-peak tents and decorative polyhedra.
CAD and game bipyramid metrics
Turn n, side, and height into stable volume and surface figures for layout, material estimates, and property panels.
FAQ
What formulas does this calculator use?
Base area A = n a² / (4 tan(π/n)); volume V = (2/3) A h = n a² h / (6 tan(π/n)); apothem r = a / (2 tan(π/n)); face slant m = √(h² + r²); surface area S = n a m.
What happens if sides is below 3?
An n-gonal bipyramid requires at least three equatorial sides; digons and monogons are rejected and those calls are not charged.
Is height the full apex-to-apex distance?
No. height is the perpendicular distance from one apex to the equatorial plane. The full apex-to-apex span is twice that value when both halves share the same height.
What does it cost?
The browser tool is free and runs locally.
Is an octahedron a bipyramid?
Yes. A regular octahedron is the square bipyramid with an edge of 1 and a height of 1/√2 from each tip, and the calculator returns its known volume, √2/3, and its surface, 2√3.
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/bipyramid \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"sides":4,"side":2,"height":1}'const res = await fetch("https://api.kit.forhosting.com/geom/bipyramid", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"sides": 4,
"side": 2,
"height": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/bipyramid",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"sides": 4,
"side": 2,
"height": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/bipyramid", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"sides":4,"side":2,"height":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"sides":4,"side":2,"height":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/bipyramid", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"sides": 4,
"side": 2,
"height": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.bipyramid",
"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
Any side count below three, or any non-positive edge or height, 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 volume and surface area are computed
The area of the equatorial regular n-gon is base_area equals n times a squared over four times the tangent of pi over n. A single pyramid with that base and height h has volume one-third base times height; the bipyramid is two such pyramids joined base-to-base, so volume equals two-thirds times base_area times h, which simplifies to n a squared h over six times tan of pi over n. Huge magnitudes can still overflow IEEE-754 double range; when any result is non-finite the request fails with a clear overflow message instead of returning Infinity in JSON.
What you send and what you get back
Zero, negative, missing, empty, non-numeric, NaN, and Infinity values are rejected with invalid_input and are not charged. On success the JSON response returns sides, side, height, base_area, volume, surface_area, face_slant, apothem, and method set to regular_n_gonal_bipyramid so logs and teaching UIs can document the algorithm. API pricing is the published base of $0.002 per successful item.
Where n-gonal bipyramid 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.
Technical questions
Does surface_area include the equatorial polygon?
No. The equator is internal to the solid. surface_area is the total of the 2n outer triangular faces only.