Circle center from three points
Recover the circle behind three measured points: (0, 0), (4, 0) and (0, 3) give a center at (2, 1.5), a radius of 2.5 and the equation (x − 2)² + (y − 1.5)² = 6.25, all at once. 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
- Equation
- (x − 2)² + (y − 1.5)² = 6.25
Send six coordinates, get back the center, the radius, the diameter and the circle equation in a single call.
One circle, three points, no iteration
Three non-collinear points define exactly one circle, and its center is the point equidistant from all three. Because the answer is closed form, there is no iterative solver, no convergence tolerance and no warm-up: the same six numbers always produce the same center and radius, down to the last rounded decimal. You send x1, y1, x2, y2, x3 and y3 as numbers or numeric strings, and you receive the center coordinates, the radius, the diameter and the standard-form equation of the circle, rounded to the precision you choose.
The response also echoes whether the input was degenerate, so a pipeline can branch on geometry instead of parsing error text. Everything runs on our edge worker in microseconds, with nothing stored after the response leaves, so coordinates from drawings, sensors or surveys are never persisted anywhere between your request and your result.
When three points do not make a circle
If the three points lie on a straight line — or two of them coincide — no finite circle passes through all of them, and pretending otherwise is how bad geometry propagates into a design or a report. The determinant that detects collinearity is the same one that produces the center, so the check costs nothing extra and cannot disagree with the result. Nearly collinear points still compute, but you should treat very large radii as a warning sign in your own logic.
Input validation is strict on purpose: every coordinate must be a finite number, NaN and Infinity are rejected, and the precision option is bounded from zero to fifteen decimal places. Strictness at the boundary is what keeps a deterministic contract deterministic across every runtime that executes it.
Where a circle center earns its keep
The obvious use is geometry homework and CAD-style tooling, but the quiet majority of calls come from data pipelines. Metrology software reconstructs an arc from three probe touches and needs its center to compute roundness; mapping code fits a turning circle through three GPS fixes; game and robotics code derives a curvature center from three waypoints to plan a smooth path. In each case the caller wants a number it can trust, not a library dependency.
If your three points ever disagree between environments, that is a bug report we want, not a rounding mode you should accept.
What you can do with it
Reconstruct an arc from three probes
Fit the circle behind a measured curve in metrology or reverse-engineering, and get its center and radius in one call.
Fit a turning circle through waypoints
Derive curvature from three GPS fixes or path waypoints to plan motion or validate a route.
FAQ
What input does it expect?
Six coordinates: x1, y1, x2, y2, x3, y3. Numbers or numeric strings both work, and an optional precision field sets the decimal places of the response.
Is any of my data stored?
No. The coordinates are processed in memory and discarded; only the computed result is returned.
How accurate is the result?
The center comes from an exact determinant formula in double precision, then rounded to the precision you request (0–15 decimals, default 10).
What if the three points lie on a straight line?
Then no circle passes through all three, and the calculator says so with a clear message instead of inventing one. The same happens when two of the points coincide.
What does a very large radius mean?
It usually means the three points are almost in a straight line. The result is still computed, but treat a huge radius as a warning sign that the measurements may not describe a real arc.
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/circle-center \
-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/circle-center", {
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/circle-center",
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/circle-center", 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/circle-center", 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.circle_center",
"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 circle center API takes three points in the plane and returns the exact center and radius of the one circle that passes through all of them. It is the geometric primitive behind fit checks, arc reconstruction, calibration and layout work, computed deterministically from a closed-form determinant rather than by approximation.
One circle, three points, no iteration
The classic construction draws the perpendicular bisector of two chords and reads the intersection; algebraically that is a small determinant formula, and that is what this endpoint evaluates.
When three points do not make a circle
This capability refuses instead of guessing: a collinear or coincident input raises an invalid_input error with a message that says exactly what is wrong, so your caller can catch it and ask for better data rather than silently receiving a circle of absurd radius.
Where a circle center earns its keep
Pricing is flat: $0.002 per request, one item per call, with no surcharge for higher coordinate magnitudes. The same code that answers the API runs free in your browser on this page, so you can verify a result by hand before you wire the endpoint into production.
Integration use cases
Guard a geometry pipeline
Reject collinear or coincident triples with a clear invalid_input error instead of a silently huge radius.
Technical questions
What does it cost?
$0.002 per request. It is also free to run in your browser on this page with the same code.
What happens if the points are collinear?
The request fails with an invalid_input error explaining that no finite circle passes through three collinear points.