ForHosting KIT · Math

Napkin ring volume calculator

A napkin ring 2 units high holds about 4.1887902048 cubic units, whether it came from a huge sphere with a fat hole or a small one with a thin hole: only the band height counts. Enter the height and get the volume. 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
Height
2
You get
Volume
4.1887902048

A napkin ring is the solid that remains when a cylindrical hole is drilled straight through the center of a sphere so that what is left is a curved band of height h. Students meet the paradox in calculus and geometry courses; engineers meet the same solid when sizing drilled beads, washers cut from spheres, or decorative bands. This napkin ring volume calculator accepts the remaining band height, applies the closed formula deterministically, and returns the ring volume together with a short formula string and a flag that the result is independent of radius.

What a napkin ring is and why the volume ignores the sphere radius

Imagine a solid sphere and a drill that removes a cylindrical tunnel through it, perfectly centered so the leftover outer shell is a symmetric band. The two circular openings of the tunnel sit on parallel planes a distance h apart; that distance is the remaining band height. Between those planes the material that stays is the napkin ring: the spherical zone volume minus the volume of the cylindrical hole (the spherical caps beyond the planes are also gone with the drill path in the usual statement of the problem).

Algebraically, if R is the sphere radius and r is the cylinder radius, Pythagoras on the mid-plane gives r squared equals R squared minus (h over two) squared. The zone volume formula involves R, and the cylinder volume involves r, but when you subtract them every term that still carries R cancels, leaving only pi h cubed over six.

That cancellation is the content of the napkin-ring theorem: two napkin rings with the same height have the same volume even if one came from a huge sphere with a fat hole and the other from a small sphere with a thin hole. The calculator never asks for R or r because they are not needed once h is known. Height zero yields volume zero (a degenerate flat ring); any positive finite height yields a positive volume in the cube of the same length unit you used for h.

Who uses a napkin ring volume calculator

Classrooms and tutoring platforms use a napkin ring volume calculator so learners can verify the independence paradox for many heights without redoing the zone-minus-cylinder algebra each time. Exam generators need a deterministic oracle that marks negative height as invalid instead of silently flipping a sign. Failed validation does not consume balance.

Keep requests small, pin the rounded volume in tests, and you get reproducible ring volumes for homework, LMS plugins, and edge workers without reimplementing the theorem yourself.

Classroom napkin-ring theorem checks

Let students enter only the remaining band height h and verify V = πh³/6, including the classic case where height 2 matches a unit-radius sphere volume.

Exam and LMS auto-grading

Mark napkin-ring items with a deterministic oracle that rejects negative height and never asks for the original sphere radius.

Manufacturing and CAD band sizing

Compute finished volume of a drilled spherical blank from specified band height alone in shop scripts without a full solid modeler.

How do I calculate napkin ring volume from height?

Send a non-negative finite height h. No sphere radius is required—the classic theorem makes the volume independent of R.

Why does the volume not depend on the sphere size?

When you subtract the cylindrical hole from the spherical zone of height h, every term that still involves the sphere radius R cancels, leaving only π h³ / 6.

What happens if height is negative?

Band height cannot be negative; invalid input is not billed.

What units does the calculator use?

Any consistent length unit for height. Volume is returned in the cube of that unit (for example cm³ if h is in cm). No unit conversion is performed.

Why does a ring of height 2 have the volume of a ball of radius 1?

With a height of 2 the formula gives four thirds of π, about 4.1887902048, which is exactly the volume of a sphere of diameter 2. It is the limiting case where the hole is so thin that the whole sphere is left.

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/napkin-ring

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/napkin-ring \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"height":2}'
{
  "height": 2
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geom.napkin_ring",
  "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.

The surprising classic theorem says that this remaining volume depends only on that height: V equals pi times h cubed over six, with no leftover dependence on the original sphere radius. Negative height is rejected as invalid_input rather than producing a meaningless negative volume.

Input contract, response shape, and error behaviour

Extremely large heights above an internal safety ceiling are also rejected so floating-point overflow cannot produce Infinity silently. Example: height equals two yields volume approximately four point one eight nine, which is exactly four-thirds pi, the volume of a full sphere of radius one—the classic special case where a napkin ring of height two has the same volume as a sphere of diameter two. POST a JSON body with one required field: height, a finite non-negative number (JSON number or numeric string) giving the remaining band height h in any consistent length unit. Missing height, empty strings, non-finite values, and non-numeric types fail with invalid_input naming the field. Pair the numeric answer with your own unit labels; this endpoint is unit-agnostic and does not convert millimeters to inches.

Where a napkin ring volume API earns its keep

CAD and manufacturing scripts that specify only the finished band height of a drilled spherical blank can call this tiny parse API instead of standing up a full solid-modeling kernel for a single closed formula.

What does the napkin ring volume calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →