Circumscribed circle
Find the one circle that runs through three points: for (0, 0), (4, 0) and (0, 3) the circumscribed circle is centered at (2, 1.5) with a radius of 2.5, the same distance to each point. Useful for meshes and arcs. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- X1
- 0
- Y1
- 0
- X2
- 4
- Y2
- 0
- X3
- 0
- Y3
- 3
- Radius
- 2.5
- Diameter
- 5
center and radius of the circle through three points
What a circumscribed circle is and when you need one
Given any three points that do not lie on a single straight line, there is exactly one circle that passes through all three. It is called the circumscribed circle — or circumcircle — and its center, the circumcenter, sits at the same distance from each of the three points. That equidistance property is what makes the construction useful far beyond geometry homework.
If you triangulate a terrain for a 3D mesh, the quality of each triangle is judged by its circumcircle: skinny triangles produce enormous circles and ugly shading, so meshing algorithms add or move points precisely where a circumcircle is too large. If you build a Voronoi diagram, every vertex of that diagram is the circumcenter of a triangle of input sites. And if you simply need to fit a circular object — a lens, a pipe, a turning path — through three measured positions, the circumscribed circle is the answer.
How the center and radius are computed
The computation is a closed-form determinant formula, not an iterative search. The center of the circle must lie on the perpendicular bisector of the segment joining the first two points, and also on the perpendicular bisector of the segment joining the last two; the intersection of those two lines is the circumcenter. Written out, that intersection is a ratio of two determinants built from the squared coordinates of the points, and the denominator is twice the signed area of the triangle the points form.
Once the center is known, the radius is simply the distance from the center to any of the three points; all three distances are equal by construction, which doubles as a numerical consistency check. Results are rounded to a configurable number of decimal places, ten by default, so the output is stable and reproducible.
Inputs, errors, and practical limits
The input is six numbers: x1, y1, x2, y2, x3 and y3, one pair per point. An optional precision field, from 0 to 15, controls the decimal places of every numeric field in the response. There is no rate of convergence to worry about and no randomness: the same six numbers always produce the same center and radius.
What you can do with it
Validate triangle quality in a mesh
Compute the circumcircle of each triangle in a Delaunay mesh and flag the elements whose radius blows past your quality threshold.
Fit a circular path through three waypoints
Turn three measured GPS or CNC positions into the arc that passes through them, with its center for the controller and its radius for the feed-rate table.
FAQ
Can I send coordinates as strings?
Yes. Each coordinate may be a number or a plain decimal string such as "12.5" or "-3e2".
How accurate is the result?
The formula is closed-form, so there is no convergence error; only floating-point rounding applies. The precision field (0-15, default 10) sets the decimal places in the response.
Is my data stored?
No. The coordinates are processed in memory and discarded; only the center and radius are returned.
Why does a thin triangle have such a large circumscribed circle?
Because its three corners are close to lying on one line, so the circle through them has to be enormous. Mesh tools rely on this: a triangle with an oversized circumcircle is a poor element, and points are added or moved there.
How is the circumscribed circle related to Voronoi diagrams?
Every vertex of a Voronoi diagram is the center of the circle through three input sites, because that center is the one point equally far from all three of them.
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/circumscribed-circle \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"x1":0,"y1":0,"x2":4,"y2":0,"x3":0,"y3":3}'const res = await fetch("https://api.kit.forhosting.com/math/circumscribed-circle", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"x1": 0,
"y1": 0,
"x2": 4,
"y2": 0,
"x3": 0,
"y3": 3
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/circumscribed-circle",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"x1": 0,
"y1": 0,
"x2": 4,
"y2": 0,
"x3": 0,
"y3": 3
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/circumscribed-circle", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"x1":0,"y1":0,"x2":4,"y2":0,"x3":0,"y3":3}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"x1":0,"y1":0,"x2":4,"y2":0,"x3":0,"y3":3}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/circumscribed-circle", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"x1": 0,
"y1": 0,
"x2": 4,
"y2": 0,
"x3": 0,
"y3": 3
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.circumscribed_circle",
"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 circumscribed circle API takes the x and y coordinates of three points in the plane and returns the one circle that passes through all of them: the coordinates of its center and its radius, plus the diameter for convenience. Three points that are not in a straight line determine exactly one circle, and this endpoint finds it with a closed-form formula — no iteration, no approximation, no guessing. When the three points happen to be collinear, no finite circle exists, and the API says so with a clear error instead of a meaningless number. It runs in a single deterministic pass, free in the browser on this page, and $0.002 per request when you call it through the API.
What a circumscribed circle is and when you need one
This endpoint takes the three coordinate pairs and returns the center and radius directly, saving you from deriving the formula yourself or debugging someone else's half-remembered algebra.
How the center and radius are computed
That denominator is also the collinearity test: when it is zero the three points lie on a straight line, the bisectors are parallel, and no finite circle exists — the API rejects the input with an explicit error instead of dividing by zero.
Inputs, errors, and practical limits
Common aliases such as ax, bx, cx or p1x are accepted, and values may be sent as numbers or as plain numeric strings, which makes the endpoint forgiving when the caller reads coordinates from a text file. The endpoint refuses three kinds of input with a clear invalid_input error: a missing or non-numeric coordinate, two points that coincide — three distinct points are required — and three points that are collinear, because then the circle degenerates into a line at infinity. Everything runs on our edge with nothing stored afterwards, and the same deterministic code powers the free browser version on this page, so what you test by hand is exactly what the API returns at $0.002 per request.
Integration use cases
Build Voronoi vertices from triangulations
Derive each Voronoi vertex as the circumcenter of a triangle of sites, one API call per triangle, with collinear degenerate cases cleanly rejected.
Technical questions
What does it cost?
$0.002 per request. It is also free to run in your browser on this page.
What happens if the three points are on a straight line?
No finite circle passes through three collinear points, so the API returns an invalid_input error explaining the situation instead of a number.
Can two of the points be the same?
No. Three distinct points are required; coincident points are rejected with an invalid_input error.