Angle of twist calculator
The angle of twist calculator applies the classical torsion formula to a solid circular shaft: given the applied torque in newton-metres, the shaft length and diameter in metres, and the shear modulus of the material in pascals, it returns how far one end of the shaft rotates relative to the other, in radians.
Run — free
It is the standard first check in any drivetrain, axle or coupling design — a shaft can be strong enough not to break and still twist far enough to be useless. The same closed-form computation runs free in your browser and costs $0.002 per request when you call it through the API.
What the angle of twist tells you
When a torque is applied to one end of a shaft while the other end is held, the shaft does not rotate as a rigid body: it winds up, and every cross-section rotates slightly more than the one behind it. The total relative rotation between the two ends is the angle of twist, and it is the stiffness counterpart of the stress calculation. A shaft that fails a stress check breaks; a shaft that fails a twist check still works mechanically but misaligns whatever is bolted to it — gears hunt, encoders drift, and couplings wear. That is why engineers size torsion members against both limits. The angle of twist calculator gives you the deformation number directly: send the torque, the length, the outer diameter and the shear modulus, and you get the rotation in radians along with a degrees copy and the polar moment of the section, so you can see at a glance whether your design twists thousandths of a radian or whole degrees under the working load.
How the number is computed
The computation is the closed-form torsion formula from mechanics of materials: φ = T·L/(G·J), where T is the applied torque, L the shaft length, G the shear modulus of the material, and J the second polar moment of area of the cross-section. For a solid circular section J = π·d⁴/32, which is why the diameter dominates the result — doubling the diameter divides the twist by sixteen. The formula assumes linear elastic behaviour, a prismatic shaft and a torque applied about the axis; inside those assumptions it is exact, not a numerical approximation. The endpoint validates every field before computing: torque may be any finite number and its sign is preserved as the twist direction, but diameter, length and shear modulus must be strictly positive, because a zero or negative value for any of them has no physical meaning. All four inputs are echoed back cleaned, together with J, so the response is self-contained and auditable.
Where it fits in a workflow
Typical callers are design scripts and validation pipelines rather than humans typing into a form. A parametric CAD export emits candidate shaft geometries; a script sweeps them through this endpoint and discards the ones that twist past the allowed fraction of a degree before they ever reach a finite-element run. Maintenance teams use it the other way around: they measure a twist or a misalignment in the field and back-calculate whether the installed shaft was ever adequate for the load it now carries. Because the same code runs free in the browser widget on this page, an engineer can sanity-check a single case by hand and then automate the sweep through the API at $0.002 per request with the certainty that both paths return identical numbers. The computation is deterministic, stateless and sub-millisecond, so it sits comfortably inside tight loops, CI checks on mechanical parameters, or serverless functions that validate designs on every commit.
What you can do with it
Size a driveshaft for stiffness
Sweep candidate diameters against the allowed twist per metre and keep the smallest section that stays inside the limit.
Validate a coupling or axle design in CI
Fail the build when a parameter change makes the shaft twist more than the encoder or gear train tolerates.
Back-check an installed shaft
Take the measured torque and geometry from the field and verify the twist was ever within the design envelope.
FAQ
What does it cost?
$0.002 per request via the API. It is also free to run in your browser on this page, with the same code and identical results.
What units does it expect?
SI units throughout: torque in newton-metres, length and diameter in metres, and shear modulus in pascals. The angle of twist is returned in radians, with a degrees copy included.
Can torque be negative?
Yes. Torque may be any finite number; its sign indicates the twist direction and is preserved in the result. Diameter, length and shear modulus must be strictly positive.
Does it work for hollow shafts?
No. The polar moment is computed as π·d⁴/32, which is the solid circular section. For a hollow section you would need the inner diameter to be subtracted as d⁴ − dᵢ⁴, which this endpoint does not accept.
What assumptions does the formula make?
Linear elastic material, a prismatic solid circular shaft, and torque applied about the shaft axis. Within those limits φ = T·L/(G·J) is exact; it does not model stress concentrations, keyways or yielding.
What shear modulus should I use?
Use the value for your material at the working temperature: about 79.3 GPa for steel, 26 GPa for aluminium, 44 GPa for titanium and 45 GPa for brass are common starting points.
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/phys/angle-of-twist \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"torque":100,"length":1.5,"diameter":0.02,"shear_modulus":79000000000}'const res = await fetch("https://api.kit.forhosting.com/phys/angle-of-twist", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"torque": 100,
"length": 1.5,
"diameter": 0.02,
"shear_modulus": 79000000000
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/phys/angle-of-twist",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"torque": 100,
"length": 1.5,
"diameter": 0.02,
"shear_modulus": 79000000000
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/phys/angle-of-twist", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"torque":100,"length":1.5,"diameter":0.02,"shear_modulus":79000000000}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"torque":100,"length":1.5,"diameter":0.02,"shear_modulus":79000000000}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/phys/angle-of-twist", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"torque": 100,
"length": 1.5,
"diameter": 0.02,
"shear_modulus": 79000000000
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "phys.angle_of_twist",
"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. |