Chord length calculator
Get the straight length of a chord from the radius and either the central angle or the distance to the centre: a radius of 5 and an angle of 60° give a chord of 5. A distance beyond the radius is rejected, never guessed. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Radius
- 5
- Central angle
- 60
- Calculation mode
- angle
- Angle unit
- Deg
- Central angle rad
- 1.0471975512
- Chord length
- 5
This calculator finds the length of a chord of a circle from two classical inputs: the circle radius together with the central angle that the chord subtends, or the radius together with the perpendicular distance from the center to the chord line. You enter a positive radius and either a central angle (degrees by default, or radians) or a non-negative distance; the engine applies the closed-form identities L equals two r times the absolute value of sine of half the angle, or L equals two times the square root of r squared minus d squared, and returns the chord length, half-chord, sagitta, and the dual quantity so you can check either textbook form.
Where chord length fits in study, design, and code
Students meet chord length when a textbook asks for the straight distance between two points on a circle given a central angle, when a geometry exam demands the chord at a stated offset from the center, or when analytic geometry homework wants a numerical check of the isosceles triangle formed by two radii and a chord. Teachers can pre-generate answer keys that list chord length for integer radii and nice angles, and that refuse impossible distances instead of printing complex numbers or NaN.
Mechanical and civil design often needs the clear span of a circular opening, the width of a pipe cross-section at a given offset from centerline, or the straight cut across a round bar stock; knowing that a requested offset is outside the radius is as valuable as the chord itself.
Surveying and CAD workflows place chords as construction lines before arcs, fillets, and clearances, and game or simulation teams use chord length for segment hit tests, camera frustum slices through circular arenas, or UI rings that need a straight base length under a curved label. Developers call the same contract from scripts to seed deterministic test vectors for geometry libraries, to illustrate the half-angle formula in teaching tools, or to satisfy programming-challenge statements that demand a chord from radius and angle or from radius and distance.
What you can do with it
Homework and exam preparation
Compute chord length from textbook radius-and-angle or radius-and-distance problems, and verify that distances beyond the radius are rejected instead of producing NaN.
CAD, pipes, and game segments
Size circular openings, cross-sections at a given offset, or straight hit segments under arcs in design tools and simulations.
FAQ
What does the chord length calculator cost?
It is free in your browser on this page.
What is the chord length formula from the radius and angle?
Multiply twice the radius by the sine of half the central angle. A radius of 5 with an angle of 60° gives a chord of 5 and a half-chord of 2.5.
How do I find a chord from its distance to the centre?
Take twice the square root of the radius squared minus the distance squared. The closer the chord passes to the centre, the longer it gets, and at distance zero it equals the diameter.
What if the distance is larger than the radius?
Then the line misses the circle entirely and there is no chord. The calculator says so plainly instead of returning an impossible length, which matters as much as the chord itself when sizing a cut or an opening.
What else does the result show besides the chord?
It adds the half-chord, the sagitta and the other textbook quantity: with an angle you also get the distance to the centre, and with a distance you get the angle, so either form can be checked.
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/chord-length \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"radius":5,"central_angle":60}'const res = await fetch("https://api.kit.forhosting.com/geom/chord-length", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"radius": 5,
"central_angle": 60
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/chord-length",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"radius": 5,
"central_angle": 60
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/chord-length", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"radius":5,"central_angle":60}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"radius":5,"central_angle":60}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/chord-length", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"radius": 5,
"central_angle": 60
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.chord_length",
"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
When the distance from the center exceeds the radius the line misses the circle entirely, so the tool returns invalid_input instead of a complex length or a silent NaN. Through the API a successful request costs $0.002; validation failures are not charged.
What a chord length is and what the response contains
A chord is the straight line segment joining two points on a circle. Its length depends only on the radius and how far those points sit angularly or how far the chord line sits from the center: two points that subtend a larger central angle sit farther apart along the straight shortcut, and a chord that passes closer to the center is longer, reaching a maximum equal to the diameter when the distance is zero. This tool exists to turn those two standard textbook setups into a single deterministic response without forcing you to draw an isosceles triangle, bisect the angle by hand, or remember which form of the identity matches your given data. If you need arc length, sector area, or segment area as the primary answer, use a tool dedicated to those problems; the search intent here is the straight chord length and a clear answer or an honest error. Preferred inputs are the scalar radius plus either central_angle or distance as JSON numbers; decimal strings are accepted for form and spreadsheet callers. In angle mode the response reports mode angle, the echoed radius and central angle, angle_unit, central_angle_rad, chord_length, half_chord, sagitta for the minor-arc sense, distance_to_chord recovered from the half-chord Pythagorean relation, and a formula field recording the sine identity. In distance mode the response reports mode distance, the echoed radius and distance, chord_length, half_chord, sagitta as radius minus distance, central_angle_deg and central_angle_rad recovered via two arcsine of half-chord over radius, and the square-root formula. Missing radius, non-finite values, a non-positive radius, both modes supplied at once, neither mode supplied, a negative distance, or a distance that exceeds the radius all raise invalid_input with a message that names the failing condition. That discipline keeps automated tests stable, makes caching safe, and prevents a student or a script from treating a missing line as a real chord.
How the two modes are read and how the closed forms are evaluated
Exactly one of those two optional families must be present: supplying both is rejected so a caller cannot silently mix contradictory geometry, and supplying neither is rejected with a message that names the two valid modes. The central angle is converted to radians when needed, half of that angle is taken, and the chord length is two times the radius times the absolute value of the sine of the half-angle, which keeps length non-negative for positive or negative angle inputs. Companion fields fold the absolute angle into a minor arc on zero through pi so sagitta equals radius times one minus cosine of half that minor angle, and the perpendicular distance from the center to the chord is recovered as the square root of radius squared minus half-chord squared. Otherwise the chord is two times the square root of the non-negative radicand radius squared minus distance squared, sagitta is radius minus distance, and the central angle is recovered as two times arcsine of half-chord over radius, reported in both degrees and radians. Optional precision only rounds the published fields; the internal solve always uses full double precision before that final rounding step. The engine resolves radius from the field radius with aliases r and R, requiring a finite value strictly greater than zero. It then looks for central_angle with aliases angle, theta, and the theta symbol, or for distance with aliases d, dist, and offset. For angle mode the optional angle_unit field, with aliases unit and angleUnit, defaults to degrees; values deg, degree, degrees, or d select degrees, while rad, radian, radians, or r select radians. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the half-angle or Pythagorean identities yourself.
Where chord length fits in study, design, and code
On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split—free interactive exploration and a priced, identical API—matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with other free geometry endpoints when you need circle construction from three points, line intersections, or triangle solvers for a lab of deterministic tools, and with documentation that shows both the radii and the finished chord so the numbers and the picture stay aligned for learners and reviewers. Whether you arrived searching for a chord length calculator or for the chord from radius and central angle, the contract is the same: radius plus angle or distance in, a finite chord or a clear invalid_input out.
Integration use cases
Deterministic geometry fixtures
Generate reproducible chord lengths for unit tests, contest validators, and CI assertions without hand-rolled half-angle or square-root algebra.
Technical questions
What if the distance is greater than the radius?
The handler returns invalid_input with a message that the distance exceeds the radius and no real chord exists when the line misses the circle.
Can I use either central angle or distance?
Yes. Provide radius plus central_angle, or radius plus distance—exactly one of the two modes. Supplying both or neither is invalid_input.
Are angles in degrees or radians?
Degrees by default. Set angle_unit to rad (or radians) when your central_angle is already in radians.
Can I control rounding?
Yes. Set precision (aliases decimals, dp) to an integer from 0 to 15; the default is 10 decimal places on all numeric fields.