Internal tangent length calculator
Two circles with radii 3 and 2 whose centers are 10 apart have an internal common tangent of 5√3, measured between the two touch points of the crossed line. Enter both radii and the center distance to get it. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- R1
- 3
- R2
- 2
- D
- 10
- Sum of radii
- 5
- Internal tangent length
- 8.6602540378
The internal common tangent of two circles is the crossed, or transverse, tangent: the line that touches each circle once while the circles lie on opposite sides of the line. Its length between the two points of tangency is a standard result in Euclidean geometry and school-exam circle theorems.
Internal and external tangents of two circles
Two separate circles can share up to four tangent lines. Two of them are external, or direct: both circles stay on the same side of the line. The other two are internal, or transverse: the circles sit on opposite sides of the line, and the two internal tangents cross each other between the centers. This calculator measures the internal kind, that is, the stretch of one crossed tangent between the point where it touches the first circle and the point where it touches the second. It gives that length only, which is what circle theorem exercises, entrance exams and clearance checks between two disks usually ask for.
How the length is worked out, and what trips people up
The rule comes from Pythagoras. The distance d between the centers is the hypotenuse of a right triangle whose one leg is the sum of the radii, and the tangent length is the other leg, so it equals the square root of d squared minus the square of the sum of the radii. With radii 3 and 2 and centers 10 apart, the sum is 5 and the length is 5√3. When both radii are equal, the rule shortens to the square root of d squared minus four r squared. The usual slip is entering circles that overlap: if the centers are closer than the sum of the radii, there is no internal tangent, so the input is rejected rather than turned into a meaningless number. A radius of zero or below is refused as well, because it is not a proper circle.
Where the internal tangent length is used
Secondary-school geometry and entrance-exam prep constantly ask for the length of the internal common tangent of two circles given only radii and center distance. Tutoring platforms and LMS plugins need a deterministic oracle that marks intersecting configurations as invalid instead of returning NaN that a buggy grader might treat as zero. CAD and drafting scripts, packing layouts, and simple mechanism sketches often need the crossed-tangent clearance between two disks without importing a full computational-geometry library.
Content sites that rank for internal tangent length calculator benefit from a live free browser path that matches the paid automation path byte-for-byte on the same pure module. Failed validation—missing radii, non-positive radius, or intersecting circles—does not consume balance.
What you can do with it
Classroom and exam practice
Students enter two radii and the center distance to check the internal common tangent length against textbook Pythagoras methods.
LMS auto-grading for circle theorems
Mark internal-tangent items with a deterministic oracle that rejects intersecting circles and never returns a complex length.
Layout and disk-clearance scripts
Compute crossed-tangent length between two circles in packing or mechanism sketches without a full CAD geometry stack.
FAQ
Is this the external or the internal (transverse) tangent?
Internal (transverse/crossed) only: circles on opposite sides of the tangent.
What happens if the two circles overlap?
When the distance between the centers is less than the sum of the radii, the circles intersect and no internal tangent exists. The input is rejected with a clear message instead of returning an impossible length.
What if the circles just touch from outside?
If the center distance equals the sum of the radii, the circles meet at a single point and the formula gives a length of zero. Any larger distance gives a positive tangent length.
Is there a shorter formula when both radii are equal?
Yes. With two equal radii r, the length is the square root of d squared minus four r squared. It is the same rule with 2r as the sum of the radii, so you can simply enter the same value twice.
Does it also give the tangent points or the external tangent?
No. It returns the length of the internal tangent only, with the sum of the radii shown alongside. It gives no contact point coordinates and no external tangent length, so pair the number with your own sketch if you need the lines drawn.
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/internal-tangent-two-circles \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"r1":3,"r2":2,"d":10}'const res = await fetch("https://api.kit.forhosting.com/geom/internal-tangent-two-circles", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"r1": 3,
"r2": 2,
"d": 10
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/internal-tangent-two-circles",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"r1": 3,
"r2": 2,
"d": 10
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/internal-tangent-two-circles", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"r1":3,"r2":2,"d":10}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"r1":3,"r2":2,"d":10}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/internal-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": 3,
"r2": 2,
"d": 10
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.internal_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 internal tangent length means and when it exists
Two distinct circles in the plane admit up to four common tangent lines: two external (direct) tangents, where both circles lie on the same side of the line, and two internal (transverse) tangents, where the circles lie on opposite sides and the tangent segments cross between the centers. The internal tangent length is the distance along an internal tangent between the two points of contact. Equal radii simplify the formula to L equals the square root of d squared minus four r squared, but the implementation never special-cases equality: the general sum-of-radii form already covers it with the same rounding contract. This endpoint therefore returns a clear invalid_input error instead of inventing a complex length.
Input contract, response fields, and validation rules
Either radius must be strictly greater than zero; a zero or negative radius is not a proper circle for this problem. The center distance must be non-negative. Pair the numeric result with your own sketch if you need the tangent line coordinates; this capability returns length only and does not emit contact points or external-tangent lengths. Missing fields, empty strings, non-finite values, and non-numeric types fail with invalid_input naming the field.
Where an internal tangent length API earns its keep
Keep requests small, pin the rounded internal_tangent_length in tests, and you get reproducible lengths for homework, exam generators, and edge workers without standing up symbolic math or graphics toolkits of your own.
Technical questions
How do I compute the internal tangent length of two circles?
Send positive radii r1 and r2 and center distance d with d ≥ r1+r2. The API returns L = √(d² − (r1+r2)²) as internal_tangent_length.
What happens if the circles intersect?
The task fails with invalid_input. When d < r1+r2 the radicand is negative, so no real internal common tangent length is returned and the call is not billed.
What if the circles touch externally?
When d equals r1+r2 the internal tangent length is zero, which is a valid result, not an error.
What does the internal 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.