Tangent-secant theorem calculator
With a tangent of 6 and an outer secant part of 4, the whole secant is 9, because PT² = PA·PB and both sides give 36. Enter two of the three segments from a point outside the circle and get the third. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- PT
- 6
- PA
- 4
- Decimal places
- 6
- PB
- 9
- Product PA PB
- 36
- PT squared
- 36
PT²=PA·PB; solve for missing segment. Search intent: tangent secant theorem. No network calls or random seeds are required. Failed jobs are not billed.
What the tangent-secant theorem says
Take a point P outside a circle. From P, draw a tangent that touches the circle at a single point T, and a secant that cuts through the circle, entering at A and leaving at B. The theorem ties the three lengths together: the tangent squared equals the outer part of the secant times the whole secant, written PT² = PA·PB. Geometry books call this the outside form of the power of a point. With a tangent of 6 and an outer part of 4, the whole secant has to be 9, since 6 squared and 4 times 9 both give 36.
Finding the missing segment without mistakes
Enter the two lengths you know and the calculator solves for the third. The whole secant is the tangent squared divided by the outer part; the outer part is the tangent squared divided by the whole secant; and the tangent is the square root of their product. The most common slip is to use only the chord inside the circle instead of the whole secant. PB runs from P all the way to the far point, so it is always longer than PA. Results are checked against the relation and rounded only once, to the decimals you ask for.
What you can do with it
Teaching
Pinned goldens.
FAQ
How do I find the whole secant from the tangent and the outer part?
Square the tangent and divide by the outer part of the secant. With a tangent of 6 and an outer part of 4, that is 36 divided by 4, so the whole secant measures 9.
What is the difference between PA and PB in the theorem?
PA runs from the outside point to where the secant first enters the circle. PB runs from the same point to where it leaves on the far side, so PB is the whole secant and always the longer of the two.
How do I get the tangent length from the two secant segments?
Multiply the outer part by the whole secant and take the square root. An outer part of 4 and a whole secant of 9 give 36, whose square root is a tangent of 6.
Can I choose how many decimals the answer has?
Yes. Ask for the number of decimals you need and the result is rounded once, at the very end, with halves rounded up. Nothing is rounded along the way, so no error builds up.
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/math/tangent-secant-theorem \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"PT":6,"PA":4}'const res = await fetch("https://api.kit.forhosting.com/math/tangent-secant-theorem", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"PT": 6,
"PA": 4
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/tangent-secant-theorem",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"PT": 6,
"PA": 4
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/tangent-secant-theorem", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"PT":6,"PA":4}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"PT":6,"PA":4}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/tangent-secant-theorem", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"PT": 6,
"PA": 4
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.tangent_secant_theorem",
"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
The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.
How it works
PT²=PA·PB; solve for missing segment. Power of a point exterior form. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.
Inputs, limits and rounding
Optional decimals use half-up once. Outputs echo inputs. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. Provide required JSON fields. Invalid types raise invalid_input. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.
When to use it
Use when search intent matches. PT²=PA·PB; solve for missing segment. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.
Integration use cases
Quick check
Free widget.
Automation
Same JSON via API.
Technical questions
Free?
Yes tier A.
Network?
No.
Bad input?
invalid_input.
API?
Yes.
Locales?
EN-only; Nitro hydrates.