External tangent length calculator
Get the length of the outer common tangent between two separate circles: radii 5 and 3 with centres 10 apart give 4√6, just under 10. It is the straight belt span between two pulleys. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- R1
- 5
- R2
- 3
- D
- 10
- External tangent length
- 9.7979589711
- Relation
- separate
The external common tangent of two circles is the straight segment that touches each circle once without crossing between them, and its length is a standard geometry result used in belt design, packaging clearances, drafting, and exam problems. Given only the two radii and the distance between centers you do not need full center coordinates: the similar-triangles construction that reduces the unequal-radius case to a right triangle yields the closed form L equals the square root of d squared minus the square of the radius difference.
What the external common tangent length measures
Imagine two non-overlapping disks in the plane and a straight line that touches the first circle at one point and the second circle at another point without cutting between the centers. That line is a direct or external common tangent. There are typically two such tangents, one on each side of the line of centers, and both have the same length.
To derive that length, shrink or enlarge one circle so the radii become equal by a homothety centered at the external center of similitude; the external tangents become parallel for equal radii and the distance between contact points along the tangent equals the center distance. When the radii are equal the difference vanishes and L collapses cleanly to d, matching the parallel-tangent picture.
What you can do with it
Belt and pulley free-span design
Compute the straight external-tangent segment between two pulley radii and center distance when laying out open belt drives or conveyor wraps.
Classroom and exam grading
Check student answers for external common tangent length with a deterministic formula that rejects overlapping circles instead of returning a fake zero.
FAQ
What happens if the circles overlap?
Overlapping disks do not have a defined real external common-tangent length under this formula, and the failure is not billed.
What is the formula for the external tangent length?
Take the square root of the centre distance squared minus the square of the difference between the radii. You only need the two radii and the distance between the centres, never their coordinates.
What if both circles have the same radius?
The difference between the radii is zero, so the tangent length equals the distance between the centres. In that case the two outer tangents run parallel to each other.
How many external tangents do two circles have?
Usually two, one on each side of the line through the centres, and both have exactly the same length. That is why a single number answers the question for either side.
Does it give the points where the tangent touches the circles?
No, it reports the length only. If you need the touching points or the direction of the lines, draw them in your own drafting or CAD software and use this length as a check.
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/external-tangent-two-circles \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"r1":5,"r2":3,"d":10}'const res = await fetch("https://api.kit.forhosting.com/geom/external-tangent-two-circles", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"r1": 5,
"r2": 3,
"d": 10
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/external-tangent-two-circles",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"r1": 5,
"r2": 3,
"d": 10
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/external-tangent-two-circles", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"r1":5,"r2":3,"d":10}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"r1":5,"r2":3,"d":10}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/external-tangent-two-circles", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"r1": 5,
"r2": 3,
"d": 10
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.external_tangent_two_circles",
"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
What the external common tangent length measures
Intersecting disks or containment make the radicand or the geometric model invalid for this free external-length formula, which is why the capability refuses overlapping configurations rather than returning an empty success payload.
Input contract, response shape, and overlap errors
Each field may arrive as a JSON number or as a numeric string; missing values, empty strings, non-finite numbers, non-positive radii, and a negative distance fail with invalid_input naming the problem. Pair the length with your own drafting or CAD layer if you need the actual tangent lines in coordinates; this endpoint reports length only and does not emit contact points or direction vectors.
Where an external tangent length API earns its keep
Mechanical designers size open belt drives and conveyor wraps by treating pulleys as circles and taking the free span between external tangents as the straight belt segment between contact arcs. Secondary-school and entrance-exam platforms need a deterministic oracle for the standard formula so graders never argue about floating-point order or whether overlapping circles should yield zero. Failed validation does not consume balance.
Integration use cases
Clearance and fixture layout
Verify that two cylindrical posts leave enough room for a taut guide wire or fence by comparing geometry to the external tangent length.
Technical questions
How do I calculate the external tangent length of two circles?
Send positive radii r1 and r2 and the center distance d with d ≥ r1 + r2. The API returns L = sqrt(d² − (r1 − r2)²) as external_tangent_length.
Does equal radii simplify the formula?
Yes. When r1 equals r2 the difference term is zero, so L equals d—matching the parallel external tangents of two equal circles.
Is external contact (touching circles) allowed?
Yes. When d equals r1 + r2 the relation is external_contact and a positive external tangent length is still returned for positive radii.
What does the external tangent length calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.