Circumcenter of a triangle
Find the point that sits at the same distance from a triangle's three corners: for vertices (0, 0), (4, 0) and (0, 3) the circumcenter is (2, 1.5), the midpoint of the hypotenuse, as in every right triangle. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Ax
- 0
- Ay
- 0
- Bx
- 4
- By
- 0
- Cx
- 0
- Cy
- 3
- X
- 2
- Y
- 1.5
center of the circumscribed circle
What the circumcenter is and why it matters
Every non-degenerate triangle has exactly one circle that passes through its three vertices, called the circumscribed circle or circumcircle. The center of that circle is the circumcenter, and it is the unique point in the plane that sits at the same distance from all three vertices.
That single property makes it appear everywhere: it is the natural choice for the pivot of a triangular part in CAD, the answer to 'where do I place an antenna so it reaches three towns equally', and a building block of Delaunay triangulation, where triangles are chosen precisely so that no vertex lies inside another triangle's circumcircle.
How the coordinates are computed
The circumcenter is the intersection of the perpendicular bisectors of the sides. Algebraically, a point U = (x, y) is the center exactly when 2(B−A)·U = |B|² − |A|² and 2(C−A)·U = |C|² − |A|², where A, B and C are the three vertices. Results are rounded to ten decimal places so that floating-point noise does not leak between machines.
Input, output and the collinear edge case
You send six required fields — ax, ay, bx, by, cx, cy — the coordinates of the three vertices, and you receive an object with two fields, x and y, the coordinates of the circumcenter. Nearly collinear points are caught by a small epsilon on the denominator, because a triangle whose area is numerically zero would produce a center arbitrarily far away with no practical meaning.
What you can do with it
Equidistant facility placement
Find the point equally far from three sites — a depot, an antenna, a meeting point — by feeding their coordinates as the three vertices.
Geometry and CAD pipelines
Compute circumcenters in bulk as part of a Delaunay triangulation or a mesh-generation step, one deterministic call per triangle.
Check homework and teaching material
Verify analytic-geometry exercises: paste the three vertices and confirm the circumcenter coordinates before publishing the answer key.
FAQ
What exactly does it return?
An object with two fields, x and y: the coordinates of the circumcenter, the center of the circle through the three vertices. The radius is not returned.
Does the order of the vertices matter?
No. The circumcenter is a property of the set of three points, so any ordering of A, B and C gives the same result.
Where can the circumcenter lie?
Inside the triangle for acute triangles, at the midpoint of the hypotenuse for right triangles, and outside for obtuse triangles. The formula handles all cases without special branches.
Is the result deterministic?
Yes. It is a closed-form determinant computation rounded to ten decimal places, so identical input always yields identical output on any machine.
How do I find a spot equally far from three places?
Enter the three locations as the vertices of a triangle. The circumcenter is the one point at the same distance from all three, which makes it the natural place for a depot, an antenna or a meeting 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/math/circumcenter-of-a-triangle \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"ax":0,"ay":0,"bx":4,"by":0,"cx":0,"cy":3}'const res = await fetch("https://api.kit.forhosting.com/math/circumcenter-of-a-triangle", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"ax": 0,
"ay": 0,
"bx": 4,
"by": 0,
"cx": 0,
"cy": 3
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/circumcenter-of-a-triangle",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"ax": 0,
"ay": 0,
"bx": 4,
"by": 0,
"cx": 0,
"cy": 3
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/circumcenter-of-a-triangle", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"ax":0,"ay":0,"bx":4,"by":0,"cx":0,"cy":3}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"ax":0,"ay":0,"bx":4,"by":0,"cx":0,"cy":3}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/circumcenter-of-a-triangle", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"ax": 0,
"ay": 0,
"bx": 4,
"by": 0,
"cx": 0,
"cy": 3
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.circumcenter_of_a_triangle",
"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 circumcenter of a triangle API takes the coordinates of the three vertices of a triangle and returns the x and y coordinates of its circumcenter: the center of the unique circle that passes through all three vertices. It is the point equidistant from the three corners, found where the perpendicular bisectors of the sides meet. Send six numbers, get two back — no collinear input accepted, no ambiguity, and the same deterministic code runs free in your browser and behind the paid API.
What the circumcenter is and why it matters
The circumcenter can fall inside the triangle (acute), on the midpoint of the hypotenuse (right), or outside it (obtuse) — the API returns the correct point in all three cases, because it solves the perpendicular-bisector equations directly rather than reasoning about the triangle's shape.
How the coordinates are computed
That is a two-by-two linear system, and this endpoint solves it in closed form with the determinant formula: the denominator is proportional to the signed area of the triangle, so the system has a unique solution whenever the triangle has a non-zero area.
Input, output and the collinear edge case
There is exactly one way the request can fail geometrically: when the three points are collinear, there is no circle through them, so the endpoint rejects the input with an invalid_input error instead of returning a point at infinity. The call costs $0.002 per request with no per-unit surcharge, and the identical algorithm runs for free on this page, so you can verify a result by hand before wiring the endpoint into a batch pipeline over thousands of triangles.
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 and the same output.
What happens if the three points are collinear?
The request is rejected with an invalid_input error, because collinear points have no circumscribed circle. Nearly collinear input is rejected too.