ForHosting KIT · Math

Torus sector calculator

A torus with major radius 5 and tube radius 1, swept through half a turn, has a volume of 49.348022 and an outer area of 98.696044. Enter both radii and the angle, in radians or degrees, for any pipe bend or ring segment. 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
Major radius (R)
5
Tube radius (r)
1
Sector angle (θ)
3.1415926536
You get
Angle unit
rad
Torus-sector volume
49.348022
Torus-sector surface area
98.696044
Full torus volume
98.696044

Computes the partial volume and outer surface area of a torus sector — a torus of major radius R and minor radius r swept through a central angle theta (radians or degrees) — and also returns the full-revolution volume, the full outer area, and the swept fraction theta/2pi.

What a torus sector is

A torus is a ring-shaped solid, like an inner tube: a circle swept around an axis. The major radius R runs from the center of the ring to the middle of the tube, and the minor radius r is the radius of the tube itself. A torus sector is the piece you get when that sweep stops partway, at a central angle. A pipe elbow, a curved duct and a ring segment in a 3D model are all torus sectors. The calculator gives the sector's volume and outer surface, along with the values for the full ring and the fraction of a turn that was swept.

How it is calculated, and what to watch

The full ring has a volume of 2π²Rr² and an outer area of 4π²Rr, both from Pappus's theorem. Both grow in step with the angle, so the sector is simply the full value times the angle divided by 2π. With a major radius of 5, a tube radius of 1 and half a turn, the fraction is 0.5, so the volume is 49.348022 and the area 98.696044. The angle is read in radians unless you choose degrees, which is the most common slip. It cannot go beyond one full turn, and results are rounded to 6 decimals unless you pick another number.

Inputs, angle units and validation

Three numeric inputs are required: R and r are the major and minor radii and theta is the central angle. Validation is strict — R must be a positive number, r must be positive and strictly less than R (if r were greater than or equal to R the tube would pass through its own axis and self-intersect), and theta must be positive. After conversion the angle may not exceed a full turn, so a theta above 2·pi (with a 1e-12 tolerance) is rejected.

Pipe bends and toroidal ducts

Estimate the swept material volume and wetted outer surface of a pipe elbow or toroidal duct bent through a known central angle.

CAD and 3D geometry

Get exact partial-torus volume and outer area for a fillet, ring segment, or arc primitive without deriving Pappus's theorem by hand.

What formulas does it use?

The response also returns the full values and the fraction.

Can I give the angle in degrees?

The angle cannot exceed one full turn (2·pi).

How is rounding controlled?

The decimals field (default 6) rounds each output once, half-up, from the raw value — never from another already-rounded field.

Why must the tube radius be smaller than the major radius?

Because a tube wider than its distance to the axis would pass through the axis and cut into itself, and the formulas no longer describe a real solid. The calculator asks for a tube radius strictly below the major radius.

How do I find the volume of a pipe elbow?

Use the bend radius, measured to the middle of the pipe, as the major radius, the pipe's own radius as the tube radius, and the bend angle as the swept angle. The result is the material volume and the outer surface of that elbow.

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/math/torus-sector

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/math/torus-sector \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"R":5,"r":1,"theta":3.141592653589793}'
{
  "R": 5,
  "r": 1,
  "theta": 3.141592653589793
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.torus_sector",
  "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.

Torus sector volume and area formulas

A torus sector is the solid you get by sweeping that circular tube through only part of a revolution — a central angle theta. A full torus of major radius R (the center-to-tube distance) and minor radius r (the tube radius) has volume V_full = 2·pi²·R·r² and outer surface area A_full = 4·pi²·R·r, both obtained from Pappus's centroid theorem. Because both quantities scale linearly with the swept angle, this capability multiplies each full value by the fraction theta/(2·pi): the returned volume is V_full·theta/2pi and surface_area is A_full·theta/2pi. It also echoes full_volume, full_area, and the fraction itself so you can verify the scaling. With R=5, r=1, and theta=pi the fraction is 0.5, giving a volume of 49.348022 and surface_area of 98.696044 against a full torus of 98.696044 and 197.392088.

Inputs, angle units and validation

The optional angle_unit selects radians (the default) or degrees; degrees are converted internally as theta·pi/180 before any area or volume is computed. Any violation throws a typed invalid_input error that names the offending field, so a form can highlight exactly one input rather than surfacing an opaque exception. The interpreted angle_unit is echoed back in the response next to R, r, and theta so the caller can confirm which unit was used.

Rounding, determinism and where it runs

The optional decimals field (default 6) controls precision. Every numeric output — volume, surface_area, full_volume, full_area, and fraction — is rounded once with an explicit half-up rule applied to the raw IEEE-754 value, never chained from an already-rounded field, so the swept volume and the full volume stay mutually consistent to the last place. Failed API calls are never billed; prepaid KIT balance is charged only for successful tasks at the published base price of $0.002.

Teaching and reference

Show that a torus sector scales linearly with angle: the returned fraction theta/2pi times full_volume and full_area reproduces volume and surface_area.

Why must r be smaller than R?

If r is greater than or equal to R the tube would reach its own central axis and self-intersect, so that input is rejected as invalid_input.

Is it free?

The on-device browser widget is free (tier A). The API costs $0.002 per successful task, and failed calls are not billed.

Read the full KIT documentation →