Circle Equation Calculator – From 3 Points or Center & Radius
A circle is the set of all points at a fixed distance \(r\) from a center \((h,k)\).
The standard (center-radius) form is:
\[
(x-h)^2 + (y-k)^2 = r^2.
\]
1) From center and radius
If the center \((h,k)\) and radius \(r\) are known, the equation is immediately:
\[
(x-h)^2 + (y-k)^2 = r^2.
\]
Expanding gives the “general” circle form:
\[
x^2 + y^2 - 2hx - 2ky + (h^2 + k^2 - r^2) = 0.
\]
2) Circle through three points
Three non-collinear points determine a unique circle.
Let:
\[
P_1(x_1,y_1),\quad P_2(x_2,y_2),\quad P_3(x_3,y_3).
\]
Define:
\[
D = 2\Big(x_1(y_2-y_3)+x_2(y_3-y_1)+x_3(y_1-y_2)\Big).
\]
If \(D=0\), the points are collinear, so there is no unique circle.
When \(D\neq 0\), the circumcenter \((h,k)\) is:
\[
h=\frac{(x_1^2+y_1^2)(y_2-y_3)+(x_2^2+y_2^2)(y_3-y_1)+(x_3^2+y_3^2)(y_1-y_2)}{D},
\]
\[
k=\frac{(x_1^2+y_1^2)(x_3-x_2)+(x_2^2+y_2^2)(x_1-x_3)+(x_3^2+y_3^2)(x_2-x_1)}{D}.
\]
Then the radius is the distance from the center to any point, e.g.
\[
r=\sqrt{(x_1-h)^2+(y_1-k)^2}.
\]
Finally, substitute \(h,k,r\) into:
\[
(x-h)^2 + (y-k)^2 = r^2.
\]
3) Worked example
For points \((1,2)\), \((3,4)\), \((5,2)\), the calculator finds:
\[
(h,k)=(3,2),\qquad r=2.
\]
So the circle is:
\[
(x-3)^2+(y-2)^2=4.
\]
Graph note
The plot uses square units (equal x/y scaling) so circles are not distorted into ellipses.
Tick labels are drawn near the axes for readability while panning/zooming.