ForHosting KIT · Math

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
Use it from WebAPIEmailTelegramApp soon
If you enter
X1
0
Y1
0
X2
4
Y2
0
X3
0
Y3
3
You get
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.

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.

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.

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.

POSThttps://api.kit.forhosting.com/math/circumscribed-circle

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.

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}'
{
  "x1": 0,
  "y1": 0,
  "x2": 4,
  "y2": 0,
  "x3": 0,
  "y3": 3
}
{
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

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.

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.

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.

Read the full KIT documentation →