What this calculator does
Given the two endpoints of a circle's diameter, this tool finds the complete standard-form equation of the circle, \((x - h)^2 + (y - k)^2 = r^2\). It also reports the center (h, k), the radius r, the full diameter length, and r² (the right-hand side of the equation). It is a pure geometry tool that works for any pair of points in the coordinate plane.
How to use it
Enter the coordinates of the first diameter endpoint as (x₁, y₁) and the second as (x₂, y₂). Negative and decimal values are allowed. Press calculate to see the equation and all supporting values. The two points must be distinct — identical points produce a degenerate circle of radius 0.
The formula explained
A diameter passes through the center, so the center is exactly the midpoint of the two endpoints: \(h = \dfrac{x_1 + x_2}{2}\) and \(k = \dfrac{y_1 + y_2}{2}\). The diameter's length is the distance between the endpoints, found with the distance formula \(\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\). The radius is half of that. Substituting the center and r² into the equation gives:
$$\begin{gathered} (x-h)^2 + (y-k)^2 = r^2 \\[1.5em] \text{where}\quad \left\{ \begin{aligned} h &= \dfrac{\text{x}_1 + \text{x}_2}{2} \\ k &= \dfrac{\text{y}_1 + \text{y}_2}{2} \\ r &= \dfrac{\sqrt{\left(\text{x}_2 - \text{x}_1\right)^2 + \left(\text{y}_2 - \text{y}_1\right)^2}}{2} \end{aligned} \right. \end{gathered}$$
Worked example
Endpoints (−2, 3) and (4, 11). Center: \(\left(\dfrac{-2+4}{2}, \dfrac{3+11}{2}\right) = (1, 7)\). Diameter:
$$\text{Diameter} = \sqrt{(4-(-2))^2 + (11-3)^2} = \sqrt{36 + 64} = \sqrt{100} = 10$$so \(r = 5\) and \(r^2 = 25\). The equation is:
$$(x - 1)^2 + (y - 7)^2 = 25$$FAQ
What if the endpoints are the same point? The radius is 0 and the "circle" is a single point; the equation becomes \((x - h)^2 + (y - k)^2 = 0\).
Does the order of the points matter? No. The midpoint and distance are symmetric, so swapping the endpoints gives the same circle.
Can I use negative or decimal coordinates? Yes — any real numbers work, including negatives and fractions/decimals.