Spherical cap calculator
Get the volume and the curved dome area of a spherical cap together from two numbers, the sphere radius and the cap height, with the volume given by (1/3)πh²(3R − h). Heights above the diameter are rejected. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Radius
- 5
- Height
- 2
- Diameter
- 10
- Volume
- 54.4542726622
- Curved surface area
- 62.8318530718
A spherical cap is the portion of a ball cut off by a plane: a curved dome of height h taken from a sphere of radius R. Given those two positive numbers, this calculator returns the enclosed volume and the curved surface area of the dome.
How volume and curved surface area are computed
Label the parent sphere radius R and the perpendicular height of the cap h, measured from the cutting plane to the pole of the dome. The solid volume of the cap is one-third pi times h squared times three R minus h: volume equals (1/3) π h² (3R − h). When h equals R you recover the solid hemisphere formulas volume (2/3) π R³ and curved area 2 π R²; when h equals the diameter 2R you recover the full sphere volume (4/3) π R³ and surface 4 π R².
Classic checks include radius five and height two, which yield volume about 54.454272662223 and curved surface about 62.831853071796; radius one and height one (hemisphere) yield volume about 2.094395102393 and curved surface about 6.28318530718. Because the path uses only multiplication, a fixed fraction one-third, and Math.PI, it is deterministic, O(1), and free of iterative solvers.
Where spherical-cap calculations show up in real work
Secondary-school and college solid-geometry courses constantly ask students for the volume and curved surface of a spherical cap given radius and height, and often contrast a shallow dome with a deep cap on the same sphere; a trusted calculator with a strict diameter gate speeds homework grading and removes spreadsheet mistakes where someone uses the hemisphere formula when height is not equal to radius.
Architecture, roofing and fabrication workflows size partial domes, tank heads and decorative spherical segments from outer radius and rise height; volume feeds capacity and concrete estimates while curved area informs cladding and paint. Storage tanks and chemical vessels are sometimes modeled with spherical heads of a given crown radius and dish depth; the cap formulas recover head volume and shell area before the cylindrical body is added.
Game, graphics and CAD libraries clip spheres with planes; deterministic volume and surface metrics support debug readouts and material estimates without a full mesh library. If you only ever need a pure hemisphere, treat that as a separate search intent (geom.hemisphere) rather than overloading this spherical-cap landing.
What you can do with it
Homework and exam checks
Compute spherical-cap volume and curved surface area from radius and height, and reject height above the diameter with a clear error.
Domes, tank heads and fabrication
From sphere radius and rise height, recover capacity volume and cladding curved area for partial spherical shells.
CAD and game sphere-clip metrics
Turn radius and plane offset (as height) into volume and surface figures for layout, material estimates and property panels.
FAQ
What happens if the cap height exceeds the diameter?
Height must not be greater than twice the radius; a spherical cap taller than the sphere is not defined.
Does the result include the flat base disk?
Base area π a² (with a² = h(2R − h)) is not returned; add it yourself if you need total surface.
Is a hemisphere the same as this calculator?
For a dedicated hemisphere-only landing, see the hemisphere calculator.
What does it cost?
The browser tool is free and runs locally.
How do you calculate the volume of a spherical cap?
Multiply π by the cap height squared and by three times the radius minus the height, then divide by three. With radius 5 and height 2 the volume is 54.454272662223 cubic units.
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/spherical-cap \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"radius":5,"height":2}'const res = await fetch("https://api.kit.forhosting.com/geom/spherical-cap", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"radius": 5,
"height": 2
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/spherical-cap",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"radius": 5,
"height": 2
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/spherical-cap", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"radius":5,"height":2}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"radius":5,"height":2}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/spherical-cap", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"radius": 5,
"height": 2
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.spherical_cap",
"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
Height greater than the sphere diameter 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 values you provide.
How volume and curved surface area are computed
The curved surface area of the dome alone—the spherical zone, not the flat circular base—is two pi times R times h: curved_surface_area equals 2 π R h. 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 and keeps automated graders aligned with hand computation on the same radius and height.
What you send and what you get back
Provide two required finite numbers: radius is the radius of the parent sphere and must be strictly greater than zero; height is the cap height and must be strictly greater than zero and not greater than the sphere diameter (twice the radius). Example checks: radius five and height two scale by the formulas above; radius five and height five match the hemisphere special case; radius five and height twelve fails because twelve exceeds the diameter ten. Wire the free browser tool for quick sanity checks, then call the identical contract from scripts for bulk evaluation without reimplementing the spherical-cap formulas in every language. Missing fields, empty strings, non-numeric text, NaN, Infinity, non-positive radius or height, and height exceeding the diameter are rejected with invalid_input and are not charged. On success the JSON response returns radius, height, diameter (2×radius for convenience), volume, curved_surface_area, and method set to spherical_cap_volume_curved_surface so logs and teaching UIs can document the algorithm. API pricing is the published base of $0.002 per successful item.
Where spherical-cap 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
What formulas does this calculator use?
volume = (1/3) π h² (3R − h); curved_surface_area = 2 π R h. The response includes method: "spherical_cap_volume_curved_surface" and echoes diameter = 2R.