Torus volume calculator
Size a ring-shaped solid such as an O-ring, a toroidal vessel or a doughnut box from two radii: a tube radius of 1 around a centre radius of 3 gives a volume of 59.2176264065 and a surface of 118.4352528131. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Minor
- 1
- Major
- 3
- Volume
- 59.2176264065
- Surface area
- 118.4352528131
- Formula volume
- V = 2 π² R r²
- Formula surface area
- A = 4 π² R r
This calculator turns a positive tube radius and a larger center radius into the classic ring-torus metrics you need for homework, design, and code: the exact volume two pi squared times R times r squared, and the surface area four pi squared times R times r.
What a torus calculator returns and why tube and center radii matter
A ring torus is the solid of revolution you get by sweeping a disk of radius r whose center stays at a fixed distance R from an axis in the plane of the disk, with R greater than or equal to r so the tube does not cross itself. The tube radius is the minor radius of that circular cross-section; the center radius is the major radius from the geometric center of the doughnut hole to the centerline of the tube.
This tool exists to turn those two positive lengths into a single deterministic response without forcing you to look up whether volume uses two pi squared or four, or whether surface area multiplies R and r once or twice. If you need cone volume, sphere surface, or cylinder metrics, use a tool dedicated to those problems; the search intent here is the torus from tube and center radius and a clear answer or an honest error when the solid would self-intersect.
What you can do with it
Homework and exam preparation
Compute torus volume and surface area from textbook tube and center radii, and verify that self-intersecting or non-positive dimensions are rejected.
O-rings, vessels, and packaging design
Size toroidal vessel capacity, O-ring coating area, or doughnut packaging volume from known tube and center radii in CAD and manufacturing tools.
FAQ
What does the torus volume calculator cost?
It is free in your browser on this page.
What are the volume and surface of a torus with tube radius 1 and centre radius 3?
The volume is 59.2176264065 and the surface area 118.4352528131, in cubic and square units of the length you used. Both come from the same two radii, so they always agree.
How do I measure the two radii of a ring?
The tube radius goes across the round cross-section, from the middle of the tube to its surface. The centre radius runs from the middle of the hole to the middle of the tube, and it cannot be smaller than the tube radius.
Why is a tube radius larger than the centre radius rejected?
Because the tube would then cross itself through the hole, and that self-intersecting shape is not an ordinary ring. The calculator stops with a clear message instead of giving a misleading number.
What is a torus calculation used for in practice?
For the capacity of a toroidal vessel, the coating area of an O-ring, the volume of doughnut-shaped packaging, and for checking textbook exercises on solids of revolution.
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/torus \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"tube_radius":1,"center_radius":3}'const res = await fetch("https://api.kit.forhosting.com/geom/torus", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"tube_radius": 1,
"center_radius": 3
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/torus",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"tube_radius": 1,
"center_radius": 3
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/torus", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"tube_radius":1,"center_radius":3}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"tube_radius":1,"center_radius":3}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/torus", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"tube_radius": 1,
"center_radius": 3
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.torus",
"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
You enter tube_radius (the minor radius of the circular tube cross-section) and center_radius (the major radius from the torus center to the tube centerline) as finite positive lengths; the engine returns both radii, volume, surface_area, and formula strings so a student or a log line can verify the identity without reading the source. When either radius is missing, zero, negative, or non-finite, or when the tube radius exceeds the center radius and the solid would self-intersect as a spindle torus, the tool returns invalid_input instead of a silent NaN. Through the API a successful request costs $0.002; validation failures are not charged.
What a torus calculator returns and why tube and center radii matter
The response always echoes tube_radius and center_radius, reports volume as two pi squared R r squared, surface_area as four pi squared R r, and formula strings for both so a student or a log line can verify the identity without reading the source. Missing tube or center radius, non-finite values, a non-positive dimension, or a tube radius that exceeds the center radius all raise invalid_input with a message that names the failing condition. That discipline keeps automated tests stable, makes caching safe, and prevents a script from treating a self-intersecting spindle as a standard ring torus.
How the closed forms are evaluated: volume, surface, and the self-intersection guard
Volume is the exact product of two, pi squared, center radius, and tube radius squared, which is the solid of revolution formula equivalent to integrating the circular cross-section along the major circle of circumference two pi R. Surface area multiplies four, pi squared, center radius, and tube radius, equal to the product of the minor circumference two pi r and the major circumference two pi R. Optional precision only rounds the published fields; the internal solve always uses full double precision before that final rounding step. The engine resolves tube radius from the field tube_radius with aliases r, minor_radius, and tube, and center radius from center_radius with aliases R, major_radius, center, and R0, requiring each to be finite and strictly greater than zero. Before any product is formed it rejects tube_radius greater than center_radius, because that configuration is the spindle torus whose tube crosses itself through the center and is not the ring solid people mean by a torus volume calculator. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the two-pi-squared volume rule or the self-intersection check yourself.
Where torus metrics fit in study, design, and code
Students meet the torus when a textbook asks for the volume of a doughnut from major and minor radii, when an exam demands surface area of a ring solid, or when solid-geometry homework wants both metrics before material or capacity estimates. Teachers can pre-generate answer keys that list volume and surface for integer tube and center radii, and that refuse a tube larger than the center instead of printing NaN. Mechanical and civil design often needs the capacity of a toroidal vessel, the surface of an O-ring for coating estimates, or the exterior area of a doughnut-shaped tank; knowing that a requested tube radius would self-intersect is as valuable as the number itself. Surveying and CAD workflows place toroidal volumes as construction geometry, and game or simulation teams use volume and surface for collision approximations, particle rings, and procedural mesh sizing that should stay deterministic across platforms. On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split—free interactive exploration and a priced, identical API—matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with other free geometry endpoints when you need cone volume, pyramid metrics, or ellipse solvers for a lab of deterministic tools, and with documentation that shows both radii and the finished metrics so the numbers and the picture stay aligned for learners and reviewers. Whether you arrived searching for a torus volume calculator or for surface area from tube and center radius, the contract is the same: positive tube and center radii with tube not exceeding center in, finite metrics or a clear invalid_input out.
Integration use cases
Deterministic geometry fixtures
Generate reproducible torus metrics for unit tests, contest validators, and CI assertions without hand-rolled two-pi-squared volume or surface logic.
Technical questions
What if the tube radius is larger than the center radius?
The handler returns invalid_input because the solid would self-intersect as a spindle torus. A standard ring torus requires tube_radius ≤ center_radius.
How is torus volume computed?
Volume is V = 2 π² R r², where r is the tube (minor) radius and R is the center (major) radius. For r = 1 and R = 3 the volume is about 59.2176.
How is surface area computed?
Surface area is A = 4 π² R r, the product of the minor circumference 2πr and the major circumference 2πR. The same r = 1, R = 3 case yields about 118.4353.
Can I control rounding?
Yes. Set precision (aliases decimals, dp) to an integer from 0 to 15; the default is 10 decimal places on all numeric fields.