Circle through three points
Enter three points and get the only circle through all of them: (0, 0), (4, 0) and (0, 3) give a center at (2, 1.5) and a radius of 2.5. Points on one straight line are rejected, since no circle fits them. 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
- Radius squared
- 6.25
- Equation
- (x − 2)² + (y − 1.5)² = 6.25
This calculator finds the unique circle that passes through three given points in the plane and reports its center coordinates and radius. You enter the six numbers x1, y1, x2, y2, x3, and y3 (or nested point objects); the engine intersects the perpendicular bisectors of two chords with a closed-form determinant formula, then returns the center, radius, diameter, squared radius, and a readable circle equation.
Why three points fix exactly one circle
Any three points that do not lie on a single straight line belong to exactly one circle. Its center has to be the same distance from all three, so it sits on the perpendicular bisector of each side of the triangle the points form. Two of those bisectors are enough: where they cross is the center, and the radius is the distance from there to any of the points. For the points (0, 0), (4, 0) and (0, 3), the center is (2, 1.5), the radius is 2.5 and the circle is (x − 2)² + (y − 1.5)² = 6.25. The radius is also worked out a second way, from the three side lengths and the area of the triangle, so rounding noise does not creep in.
When to use it and the usual mistakes
Students use it to check textbook coordinate problems, and designers, surveyors and game developers use it to lay an arc through three control points or to find the circle around a triangle. The most common mistake is giving three points on one line: no circle passes through them, and the calculator says so instead of printing an infinite radius. Two identical points are refused as well, with the pair named. Keep in mind that this is the exact circle through three points, not a best fit through many noisy measurements, a circle in three dimensions or another triangle center. Results are rounded to the decimals you choose, ten by default, while the calculation itself runs at full precision.
How coordinates are read and how the closed form is evaluated
You may also pass points as an array of three [x, y] pairs. After parsing, pairwise distances are checked so that coincident points fail fast with a message naming the pair. Otherwise the center coordinates follow the standard expansion: the x-coordinate equals the weighted sum of squared norms times the opposite y-differences divided by D, and the y-coordinate equals the analogous sum with x-differences.
Radius is the Euclidean distance from the center to the first point; an independent check R equals the product of the three chord lengths over four times the triangle area uses the same geometry and the two estimates are averaged for a stable reported radius under floating-point noise. Optional precision only rounds the published fields; the internal solve always uses full double precision before that final rounding step.
What you can do with it
Homework and exam preparation
Compute the center and radius of the circle through textbook coordinate triples, and verify collinear inputs are rejected instead of producing Infinity.
CAD, surveying, and game bounds
Fit a circle through three control points for layout checks, clearances, or triangle bounding circles in tools and simulations.
FAQ
What does the circle-through-three-points calculator cost?
It is free in your browser on this page.
How do I pass the three points?
You can also pass p1, p2, p3 as [x, y] or {x, y}, or a points array of three pairs.
Is the result unique?
Yes for three non-collinear points: there is exactly one circle through all three.
What happens if the three points are on a straight line?
There is no finite circle through three points in a row, so the calculator rejects them instead of returning an endless radius. Two identical points are refused too, and the message names the pair.
How is the center of the circle found?
The center is the same distance from all three points, so it lies on the perpendicular bisector of each side of their triangle. Where two of those bisectors cross is the center; the radius is its distance to any point.
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/circle-from-3-points \
-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/geom/circle-from-3-points", {
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/geom/circle-from-3-points",
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/geom/circle-from-3-points", 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/geom/circle-from-3-points", 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": "geom.circle_from_3_points",
"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 three points lie on a straight line there is no finite circle through all three, so the tool returns invalid_input instead of Infinity or a silent NaN. Through the API a successful request costs $0.002; validation failures are not charged.
What a circle through three points is and what the response contains
In the Euclidean plane, any three points that do not lie on a single straight line determine exactly one circle. That circle is the set of all points at a fixed distance R from a unique center C; the three given points are chords of the circle, so C is equidistant from all three and must lie at the intersection of the perpendicular bisectors of any two sides of the triangle they form. This tool exists to turn raw coordinates into that center and radius without forcing you to set up bisector equations by hand or to expand the general circle equation x squared plus y squared plus D x plus E y plus F equals zero and solve a three-by-three system yourself. If you need a least-squares fit through many noisy samples, a circle in three dimensions, or a different triangle center such as the incenter, use a tool dedicated to those problems; the search intent here is the exact circle through three coordinates and a clear answer of center, radius, or an honest error. The preferred inputs are the six scalars x1, y1, x2, y2, x3, and y3 as JSON numbers; decimal strings are accepted for form and spreadsheet callers, and nested points p1, p2, p3 as [x, y] or {x, y} are also read, as is a points array of three pairs. The response echoes the three points, returns center as an {x, y} object, radius and diameter as numbers, radius_squared for equation work, a collinear flag that is always false on success, a human-readable equation string of the form (x − h) squared plus (y − k) squared equals R squared, and a formula field that records the determinant identity used. Missing coordinates, non-finite values, coincident points, and collinear triples 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 degenerate triple as a circle of infinite radius.
How coordinates are read and how the closed form is evaluated
The engine resolves the first point from x1 and y1 (aliases ax, a_x, p1x and ay, a_y, p1y) or from nested field p1 or a; likewise the second point from x2 and y2 and the third from x3 and y3. 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 bisector algebra yourself. Near-degenerate triples with very small area can amplify floating-point error; if consistency between point-to-center distances fails, the engine surfaces invalid_input rather than a silently inconsistent circle.
Where finding a circle through three points fits in study, design, and code
Students meet this construction when a textbook asks for the circle through three given points, when a geometry exam demands the center equidistant from three map pins, or when analytic geometry homework wants the general circle equation from three coordinate pairs. Teachers can pre-generate answer keys that list center and radius for integer-coordinate triples and refuse collinear inputs instead of printing Infinity. Game and simulation teams use the three-point circle as a cheap bounding circle for a triangle mesh face, for hit-test regions, or for placing a light or camera that must sit equally far from three landmarks. Developers call the same contract from scripts to seed deterministic test vectors for geometry libraries, to illustrate perpendicular bisectors in teaching tools, or to satisfy programming-challenge statements that demand the circle through three coordinates. 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 unit converters when coordinates arrive in mixed units, with other free geometry endpoints when you need line intersections or triangle side-angle companions for a lab of deterministic tools, and with documentation that shows both the chords and the finished circle so the numbers and the picture stay aligned for learners and reviewers. Whether you arrived searching for a circle through three points or for the center and radius of that construction, the contract is the same: six coordinates in, a unique circle or a clear invalid_input out.
Integration use cases
Deterministic geometry fixtures
Generate reproducible center and radius values for unit tests, contest validators, and CI assertions without hand-rolled perpendicular-bisector algebra.
Technical questions
What if the three points are collinear?
The handler returns invalid_input with a message that the points are collinear and no finite circle through all three exists.
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.