Equation of Circle Calculator
Get the equation of a circle from center and radius.
Formula
(x-h)²+(y-k)²=r²
Example
Center (3,4), r=5 → (x-3)²+(y-4)²=25.
Embed this calculator on your site
Add this free calculator to your own website with one line of code. The embedded version is responsive, ad-free, and includes a small attribution link back to CalcNest AI.
<iframe src="https://calcnestai.com/embed/equation-of-circle-calculator.html" width="100%" height="700" frameborder="0" style="border: 1px solid #e5e5e5; border-radius: 12px; max-width: 720px;" loading="lazy" title="Equation of Circle Calculator — Free Tool by CalcNest AI"></iframe>
Understanding the Equation of Circle Calculator
A circle equation calculator converts a centre and radius into both standard and general form. The two forms carry the same information and suit different purposes, and converting between them is completing the square, which is the same operation that produces the quadratic formula.
How it actually works
Enter a centre and radius. The calculator writes the standard form directly and expands it to general form. Centre (2, −3) with radius 5 gives the standard form and a general form with coefficients −4, 6, and −12.
| Form | Shows directly |
|---|---|
| (x−h)² + (y−k)² = r² | Centre and radius |
| x² + y² + Dx + Ey + F = 0 | Coefficients for algebra |
| Convert to standard | Complete the square |
| Convert to general | Expand |
The deeper context most people miss
Going from general to standard requires completing the square in both variables, and the result reveals whether the equation describes a real circle at all: if the constant works out negative, no real points satisfy it, and if it is zero the circle degenerates to a single point.
Why the general form can describe nothing
Any equation of the general form can be rearranged by completing the square into the shape of a standard circle equation, with the right side equal to a quantity computed from the coefficients. That quantity plays the role of the radius squared, and it can be positive, zero, or negative. Positive gives a genuine circle. Zero gives a single point, since the only way a sum of two squares equals zero is for both to be zero, which is sometimes called a degenerate circle or point circle. Negative gives no real solutions at all, since a sum of squares cannot be negative, and the equation describes an imaginary circle with no points in the real plane. That trichotomy is exactly parallel to the discriminant of a quadratic determining whether roots are real, repeated, or complex, and the parallel is not coincidental: both come from completing the square and asking whether the resulting square equals a positive, zero, or negative quantity. The practical consequence is that fitting a circle to data through the general form can return coefficients describing no real circle, which is a possibility any implementation must handle. It also means that recognising an equation as a circle requires checking that computed quantity rather than merely observing that both squared terms are present with equal coefficients.
A worked example: fitting a circle to points
The centre (2, −3) with radius 5 expands to a general form whose coefficients are twice the negated centre coordinates and a constant combining both with the radius. Running that backwards is how circles are fitted to measured points, and the general form is what makes it tractable. Fitting through the standard form is a non-linear least squares problem requiring iteration, since the unknowns appear inside squares. Fitting through the general form is linear in its coefficients, so it reduces to ordinary least squares with a closed-form solution, and the centre and radius are then recovered by completing the square. That reformulation trick, turning a non-linear fit into a linear one by changing the parameterisation, is broadly useful and appears throughout curve fitting. It has a cost: the algebraic fit minimises a quantity that is not the geometric distance from the points to the circle, so it can be biased when points cover only a short arc, and geometric fitting minimising actual perpendicular distances gives better results at the cost of iteration. Three non-collinear points determine a circle uniquely, which is the circumcircle of the triangle they form, and its centre is the circumcentre found by intersecting perpendicular bisectors.
Deciding where circle equations get used
Collision detection is the most common computational use, since testing whether a point lies inside a circle compares squared distance against squared radius and avoids a square root entirely, and circle-circle overlap compares centre separation against the sum of radii. Bounding circles and spheres accelerate collision and visibility testing by allowing a cheap rejection test before expensive exact geometry, which is why they appear throughout graphics and physics engines. In computer vision, the Hough transform detects circles in images by accumulating votes in a parameter space of centre and radius, and it is robust to partial occlusion because each edge point votes independently. In navigation and positioning, trilateration finds a location from distances to known points by intersecting circles or spheres, which is the geometric principle underlying GPS, though the actual system solves for a clock offset simultaneously and therefore needs a fourth satellite. Circle fitting appears in metrology for measuring roundness of machined parts, in astronomy, and in particle physics for reconstructing charged particle tracks curving in magnetic fields. In each case the same equation appears in whichever form makes the computation convenient, which is the practical reason for keeping both.
Circles, conics, and the equation that unifies them
The general second-degree equation in two variables describes all the conic sections, with the circle being the special case where the squared coefficients are equal and there is no cross term. Changing those coefficients produces ellipses, and adding a cross term rotates them. The discriminant of the general second-degree equation classifies which conic results, in a manner analogous to the quadratic discriminant. That single equation family covering circles, ellipses, parabolas, and hyperbolas is what makes conics a coherent subject rather than four separate curves, and it corresponds geometrically to slicing a cone at different angles, which Apollonius established around 200 BC. The physical significance arrived nearly two millennia later, when Kepler found planetary orbits to be ellipses and Newton derived all the conic trajectories from the inverse square law, with the shape determined by the object's energy: bound orbits elliptical, exact escape parabolic, and unbound hyperbolic. A circular orbit is the special case of zero eccentricity requiring an exact velocity, which is why genuinely circular orbits do not occur naturally and why every planetary orbit is at least slightly elliptical. Interstellar objects passing through the solar system are identified precisely by their hyperbolic trajectories.
Variations: parametric form, spheres, and generalisations
Parametric form expresses a circle as centre plus radius times cosine and sine of a parameter, which is convenient for drawing, for animation along a circular path, and for integration around the circle. Polar form makes a circle centred at the origin simply r equals a constant, which is why polar coordinates suit circular problems. In three dimensions the sphere equation adds a third squared term, and a circle in space requires both a sphere and a plane or a parametric description with two basis vectors. The general quadric surface equation in three variables covers spheres, ellipsoids, paraboloids, hyperboloids, and cones. Circles generalise to any dimension as hyperspheres, whose volume formula has the surprising property of peaking at five dimensions and then decreasing toward zero. Non-Euclidean geometries have their own circles with different circumference to radius relationships. In complex analysis, circles and lines are unified under Möbius transformations, which map the family to itself and treat a line as a circle through the point at infinity, which is a genuinely elegant unification that removes the special case.
Working with circle equations
Use standard form when you want the centre and radius visible, and general form when the algebra is easier with a polynomial. Convert from general to standard by completing the square in both variables separately. Check the resulting right-hand side, since a negative value means no real circle exists and zero means it degenerates to a single point. Recognise that this trichotomy parallels the quadratic discriminant, since both come from completing the square. Fit circles to data through the general form, which is linear in its coefficients and has a closed-form least squares solution, then recover the centre and radius. Consider geometric fitting minimising perpendicular distances where points cover only a short arc, since the algebraic fit is biased there. Compare squared distances against squared radius for containment tests, avoiding the square root. Use bounding circles as a cheap rejection test before exact collision geometry. And remember that three non-collinear points determine a unique circle, which is the circumcircle of the triangle they form.
What people get wrong
- Assuming any equation with equal squared coefficients describes a circle, when completing the square can yield a negative value meaning no real points satisfy it.
- Fitting a circle through the standard form, which is a non-linear problem requiring iteration, when the general form is linear in its coefficients with a closed-form solution.
- Taking a square root for a containment test, when comparing squared distance against squared radius answers the same question without it.
- Using an algebraic circle fit on points covering a short arc, where it is biased and a geometric fit minimising perpendicular distances gives a better result.
Where the math comes from
Standard form is (x − h)² + (y − k)² = r² for centre (h, k) and radius r. Expanding gives the general form x² + y² + Dx + Ey + F = 0 with D = −2h, E = −2k, and F = h² + k² − r². Converting back requires completing the square, and the resulting right-hand side is positive for a real circle, zero for a point, and negative for no real solution.
Questions and answers
How do I check my answer?
Plug the answer back into the original equation. If both sides match, the answer is correct. This works for any algebraic problem.
Can the calculator handle complex roots?
Most basic calculators handle real roots only. Complex roots (when discriminant is negative for quadratics) require a complex-number-aware calculator.
What if the equation has no solution?
Some equations have no real solutions. The calculator should indicate this rather than returning nonsense. If it does not, try simplifying the equation first.
How do I solve systems of equations?
Substitution, elimination, or matrix methods. Two-equation, two-unknown systems are simplest; larger systems need matrix calculators.
Is there one method that always works?
For polynomials up to degree 4, yes - the quadratic, cubic, and quartic formulas. Degree 5+ generally requires numerical methods. For most real-world problems, factoring, formula, or graphing handles everything.
How do I convert general form to standard?
Complete the square in x and in y separately, moving the constant to the other side. The resulting right-hand side is the radius squared, and checking its sign reveals whether the equation describes a real circle at all.
Can a circle equation have no solution?
Yes. If completing the square gives a negative right-hand side, no real points satisfy the equation since a sum of squares cannot be negative. Zero gives a single point. It parallels the quadratic discriminant exactly.
How do I fit a circle to measured points?
Through the general form, which is linear in its coefficients so ordinary least squares gives a closed-form solution. Recover the centre and radius by completing the square. Fitting the standard form directly is non-linear and requires iteration.
How many points determine a circle?
Three, provided they are not collinear. The resulting circle is the circumcircle of the triangle they form, and its centre is the circumcentre found by intersecting the perpendicular bisectors of the sides.
How do I test whether a point is inside?
Compare the squared distance from the centre against the squared radius, which avoids taking a square root. It's the standard approach in collision detection and is meaningfully faster in inner loops.
How does GPS use circle geometry?
By trilateration, intersecting spheres of known radius around each satellite. A receiver needs four rather than three because it must solve for its own clock offset simultaneously, since an inaccurate clock shifts every distance measurement together.
How does a circle relate to the other conics?
It's the zero-eccentricity case of the general second-degree equation, with ellipses, parabolas, and hyperbolas following as eccentricity increases. Physically that corresponds to orbital energy, which is why truly circular orbits don't occur naturally.
Related calculators
Quadratic Equation · Matrix Determinant 2x2 · Boolean Algebra · Absolute Value Equation · Matrix 3x3 Determinant