Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Equation of a Circle Calculator (General and Standard Form, Center, Radius, Circle and Line)

Choose the direction of the conversion and enter the coefficients of the circle. The equation below is linked to the input fields, so you can also edit the coefficients in the equation directly. To check how a line meets the circle, choose "Also check the line px + qy + s = 0" in the last drop-down.

Enter numbers only. Decimals, negative numbers and fractions such as 3/4 are OK. A blank coefficient of x or y counts as 1 (x is the same as 1x), and a blank constant or center coordinate counts as 0. Enter 0 for terms you do not use.
Result and graph
Enter the coefficients in the fields on the left and press "Calculate". The result and a figure of the circle will appear here.

What you can do on this page

  • Complete the square to turn the general form of a circle \(x^{2} + y^{2} + lx + my + n = 0\) into standard form \((x - a)^{2} + (y - b)^{2} = r^{2}\), and get the center and radius as exact values with fractions and \(\sqrt{\ }\) (with steps)
  • You can also go the other way: expand from the center and the right side (the radius squared) to get the general form
  • If the right side \(r^{2}\) is 0 or less, the equation is not a circle (it is a single point, or there is no graph). The calculator tells you which, and why
  • It also tells you how a line \(px + qy + s = 0\) meets the circle (at two points, tangent, or not at all) by comparing the distance \(d\) from the center to the line with the radius \(r\), and gives the intersection points as exact values
  • The calculator shows the equation of the circle the way you would write it by hand, and you can edit the coefficients right in the equation. You can check the result on a figure of the circle and the line
Coordinates and coefficients can be decimals, negative numbers or fractions such as 3/4.

What is this calculation used for?

Collision detection in games (circular hitboxes)

In 2D games, it is standard to model the hitbox of a character or a bullet as a circle. Whether a bullet's path (a line) hits an enemy's circle is decided exactly by this page's check: compare the distance \(d\) from the center to the line with the radius \(r\). Whether two circles overlap is decided the same way, by comparing the distance between their centers with the sum of their radii.
Circles are used because their shape does not change when they turn, and one distance calculation settles the check. If you learn game programming, you will see equations of circles at work in every frame.

Modeling signal coverage (cell towers and Wi-Fi)

Under ideal conditions with no obstacles, the area a cell tower or Wi-Fi router can reach is modeled as a circle centered at the antenna (radius = the range). "Is this spot in range?" is a comparison of the distance from the center with the radius, in other words, a check of whether the spot is inside or outside the circle.
Real signals are affected by terrain and buildings, so they do not follow this exactly. Still, circle models are a starting point for deciding where to put towers so that there are no gaps in coverage.

The idea behind positioning (GPS and your phone's location)

GPS positioning is based on this idea: once you know your distance from a satellite, the places you could be narrow down to a sphere (a circle, if you think in a plane). Solving the circles (spheres) of distances from several satellites together gives the point where they meet, which is your location.
The real calculation is in 3D and also corrects for clock errors, so it is more complicated. But the idea of the equation of a circle, "the set of points at a fixed distance", is its foundation.

Design, drafting and CAD (managing arcs and hole positions)

Drawings of machine parts and buildings are full of circles: bolt holes, curved edges, cross sections of pipes and so on. CAD software stores a circle as "the coordinates of the center and the radius", which is the information in the standard form, and it calculates where circles and lines cross, and tangent lines, every time you edit a shape.
Checks like "if I drill a hole here, is it far enough from the edge?" also come down to calculating distances from a center.

Designing curves on roads and railways (circular curves)

The basic shape of a curve on a road or railway is an arc of a circle, called a circular curve, and design drawings manage it by its center and radius. The smaller the radius, the sharper the curve, so road design standards set a minimum curve radius for each design speed.
Where a straight section joins a curve smoothly, the condition "the line is tangent to the circle" is used directly. The idea of a tangent line shapes real roads.

Formulas and figures

Equation of a circle (standard form)
Figure
Standard notation (the usual math form)
\((x - a)^{2}\) \(+\) \((y - b)^{2}\) \(=\) \(r^{2}\)
In words (symbols replaced with words)
① square of the difference between \(x\) and the center's \(a\) \(+\) ② square of the difference between \(y\) and the center's \(b\) \(=\) ③ \(r^{2}\): radius squared
The formula in words
① For any point \((x,\ y)\) on the circle, the square of the \(x\) distance from the center, \(x - a\)
② plus the square of the \(y\) distance from the center, \(y - b\)
③ equals the square of the radius \(r\)
Quick example
The equation of the circle with center (1, 2) and radius 3 is
\((x - 1)^{2}\) \(+\) \((y - 2)^{2}\) \(=\) \(3^{2} = 9\)
\((x - 1)^{2} + (y - 2)^{2} = 9\)
Key idea
A circle is the set of all points at a fixed distance (the radius \(r\)) from the center. Write the distance between a point \((x,\ y)\) on the circle and the center \((a,\ b)\) with the Pythagorean theorem, and you get \(\sqrt{(x-a)^{2} + (y-b)^{2}} = r\). Squaring both sides gives the standard form. In other words, the standard form is the definition of a circle, "distance \(r\) from the center", written as an equation. Note that the right side is \(r^{2}\), the radius squared. The radius of \((x-1)^{2} + (y-2)^{2} = 9\) is not 9 but \(\sqrt{9} = 3\).
General form → standard form (finding the center and radius by completing the square)
Standard notation (the usual math form)
\(\mathrm{C}\) \(=\) \(\left(-\dfrac{l}{2},\ -\dfrac{m}{2}\right)\)
\(r^{2}\) \(=\) \(\dfrac{l^{2}}{4} + \dfrac{m^{2}}{4} - n\)
In words (symbols replaced with words)
② \(\mathrm{C}\): center \(=\) ① half of the \(x\) coefficient \(l\) and of the \(y\) coefficient \(m\), with signs changed
④ \(r^{2}\): radius squared \(=\) ③ sum of the squares of the half coefficients, minus the constant \(n\)
The formula in words
① Complete the square on the general form \(x^{2} + y^{2} + lx + my + n = 0\). The halves of the coefficients \(l\) and \(m\), with signs changed,
② give the center \(\mathrm{C}\)
③ and the sum of the squares of the half coefficients minus the constant \(n\)
④ is the radius squared \(r^{2}\)
Quick example
Completing the square on \(x^{2} + y^{2} - 4x - 6y + 9 = 0\) gives
center \((2,\ 3)\) \(,\) \(r^{2} = 4 + 9 - 9 = 4\)
\(x^{2} - 4x = (x - 2)^{2} - 4\)
\(y^{2} - 6y = (y - 3)^{2} - 9\)
\((x - 2)^{2} + (y - 3)^{2} = 4 + 9 - 9 = 4\)
\(r = \sqrt{4} = 2\)
Key idea
Completing the square rewrites "a squared term plus a linear term", such as \(x^{2} - 4x\), as "(something) squared plus a constant", such as \((x - 2)^{2} - 4\). You build \((x - 2)^{2}\) from half the \(x\) coefficient (half of \(-4\) is \(-2\)). Expanding it gives an extra \(+4\), so you subtract that amount to keep the two sides equal. The right side of the result is \(r^{2}\). Always check its sign here. If the right side is 0, only one point, the center, satisfies the equation. If it is negative, no point satisfies it at all, because a sum of squares is never negative. So an equation in general form does not always describe a circle. It is a circle only when the right side is positive.
How a line meets a circle (comparing the distance d from the center to the line with the radius r)
Figure
Standard notation (the usual math form)
\(d\) \(=\) \(\dfrac{\left|\,pa + qb + s\,\right|}{\sqrt{p^{2} + q^{2}}}\)
In words (symbols replaced with words)
② \(d\): distance from the center \((a,\ b)\) to the line \(=\) ① absolute value of the line's left side at the center, divided by \(\sqrt{p^{2} + q^{2}}\)
The formula in words
① For the line \(px + qy + s = 0\), the absolute value of the left side with the center \((a,\ b)\) plugged in, divided by \(\sqrt{p^{2} + q^{2}}\),
② is the distance \(d\) from the center to the line . Compare this \(d\) with the radius \(r\) to see how the line meets the circle
Quick example
For the circle \((x - 2)^{2} + (y - 3)^{2} = 4\) (center \((2,\ 3)\), radius 2) and the line \(3x + 4y - 8 = 0\)
distance \(d = 2\) \(=\) radius \(r = 2\)
\(d = \dfrac{|3 \times 2 + 4 \times 3 - 8|}{\sqrt{3^{2} + 4^{2}}} = \dfrac{10}{5} = 2\)
\(d = r\)
Key idea
There are three cases, depending on which is larger, the distance \(d\) or the radius \(r\). If \(d < r\), the line crosses the circle at two different points. If \(d = r\), it touches the circle at exactly one point (the line is a tangent line, and the shared point is the point of tangency). If \(d > r\), they do not meet. Comparing numbers with \(\sqrt{\ }\) is easy to get wrong, so this calculator compares \(d^{2}\) and \(r^{2}\) as exact fractions. You can use the same trick by hand. Another method is to solve the equations of the circle and the line together: eliminate \(y\) (or \(x\)) and look at the sign of the discriminant \(D\) of the resulting quadratic equation (\(D > 0\): two points, \(D = 0\): tangent, \(D < 0\): no points). To find the coordinates of the intersection points, you solve this system.
The equation of a circle can be written in two forms: the standard form \((x - a)^{2} + (y - b)^{2} = r^{2}\), which shows the center and radius, and the expanded general form \(x^{2} + y^{2} + lx + my + n = 0\). Completing the square turns the general form into the standard form, but it is a circle only when the right side (the value in the place of \(r^{2}\)) is positive. How a line meets a circle is decided by comparing the distance \(d\) from the center to the line with the radius \(r\).

Symbols and terms

Symbols

\((x,\ y)\) x, y The coordinates of a point moving on the circle. The equation of a circle says: "collect every \((x,\ y)\) that makes this true, and you get the circle".
\(a,\ b\) a, b The letters for the center \((a,\ b)\) of the circle. Letters from the start of the alphabet are usually used for fixed numbers. Unlike the moving \(x\) and \(y\), they stay fixed for one circle. Many US textbooks write the center as \((h,\ k)\).
\(r\) are The radius of the circle, from the first letter of "radius". Note that the right side of the standard form is not \(r\) itself but its square \(r^{2}\).
\(\mathrm{C}\) see A letter often used for the center of a circle, from the first letter of "center". The circle itself is sometimes named \(C\) too.
\(l,\ m,\ n\) l, m, n The coefficients of the general form \(x^{2} + y^{2} + lx + my + n = 0\). Many textbooks write them as \(D,\ E,\ F\) (\(x^{2} + y^{2} + Dx + Ey + F = 0\)); the meaning is the same.
\(d\) dee The distance from the center to the line, from the first letter of "distance". Comparing it with the radius \(r\) tells you how the line meets the circle.
\(p,\ q,\ s\) p, q, s The coefficients of the line \(px + qy + s = 0\) on this page. A line is usually written \(ax + by + c = 0\), but this page uses other letters so they do not clash with the center \((a,\ b)\).
\(\sqrt{\ }\) square root (radical sign) The sign for the positive number whose square is the number inside (the square root). The radius is found as \(r = \sqrt{r^{2}}\). For example, if \(r^{2} = 8\), then \(r = \sqrt{8} = 2\sqrt{2}\).

Terms

circle The figure made of all the points in a plane at a fixed distance (the radius) from one point (the center). The equation of a circle is this "fixed distance" definition written as an equation.
equation of a circle An equation that describes a circle on the coordinate plane. The points \((x,\ y)\) that satisfy it make up exactly the circle. It is taught in high school Geometry and Algebra 2.
standard form The form \((x - a)^{2} + (y - b)^{2} = r^{2}\) (often written \((x - h)^{2} + (y - k)^{2} = r^{2}\)). Its strength is that you can read the center \((a,\ b)\) and the radius \(r\) just by looking at it.
general form The form \(x^{2} + y^{2} + lx + my + n = 0\), made by expanding and simplifying the standard form. You cannot read the center or radius directly, but since it is already expanded, it is easy to work with during calculations.
completing the square Rewriting an expression such as \(x^{2} + lx\) as "(something) squared plus a constant", as in \(\left(x + \dfrac{l}{2}\right)^{2} - \dfrac{l^{2}}{4}\). It is also used to find the vertex of a quadratic function, and it is the core technique of this page.
center The middle point of a circle, the same distance (the radius) from every point on the circle. The \((a,\ b)\) in the standard form is the center.
radius The distance \(r\) from the center to a point on the circle. As a length, it is always positive. It is found by taking the square root of the right side \(r^{2}\) of the standard form.
Pythagorean theorem The theorem that in a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. It is the basis of the distance between two points, and the standard form of a circle is this theorem written as an equation. It is taught in Grade 8.
intersection point A point that lies on both of two figures. For a circle and a line, there are 2 when the line crosses the circle, 1 when it is tangent, and 0 when it misses. The coordinates are found by solving the two equations together.
tangent A line is tangent to a circle when they share exactly one point. The line is called a tangent line, and the shared point is the point of tangency. The distance from the center to a tangent line is exactly the radius.
chord When a line crosses a circle at two points, the segment between those points is a chord. The perpendicular from the center to a chord cuts it exactly in half, so half the chord, the distance \(d\) from the center to the line and the radius \(r\) are linked by the Pythagorean theorem.
distance from a point to a line The length of the perpendicular from a point to a line (the shortest distance from the point to the line). It is calculated with \(d = \dfrac{|ax_0 + by_0 + c|}{\sqrt{a^{2} + b^{2}}}\) and is used to decide how a line meets a circle.
discriminant The expression \(D = b^{2} - 4ac\) that tells how many solutions the quadratic equation \(ax^{2} + bx + c = 0\) has. The discriminant of the quadratic you get by solving the circle and line equations together also tells how they meet (\(D > 0\): two points, \(D = 0\): tangent, \(D < 0\): no points).
coordinate plane A plane made by crossing a horizontal number line (the \(x\)-axis) and a vertical number line (the \(y\)-axis) at a right angle, so that every point can be written as a pair of numbers \((x,\ y)\). It is where geometry and equations meet.

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back to review these topics is the fastest way forward.

The coordinate plane and coordinates of points (Grades 5–6)
  • Being able to write the position of a point as a pair of numbers \((x,\ y)\) (for example, the point \((2,\ 3)\) is 2 right and 3 up from the origin)
  • Having a feel for the idea that "all the points that satisfy an equation make up its graph (a figure)"
The Pythagorean theorem and the distance formula (Grade 8)
  • Knowing that in a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides
  • Knowing that the distance between two points is \(\sqrt{(x_2 - x_1)^{2} + (y_2 - y_1)^{2}}\) (this is the Pythagorean theorem itself)
Square roots (Grade 8 and Algebra 1)
  • Being able to find the positive number whose square is a given number, as in \(\sqrt{4} = 2\)
  • Being able to simplify a root by taking out square factors, as in \(\sqrt{8} = 2\sqrt{2}\)
Expanding, factoring and completing the square (Algebra 1 and Algebra 2)
  • Being able to expand expressions such as \((x - 2)^{2} = x^{2} - 4x + 4\)
  • Being able to complete the square, as in \(x^{2} - 4x = (x - 2)^{2} - 4\) (the same step used to find the vertex of a quadratic function)
  • Being able to solve quadratic equations by factoring or the quadratic formula, and knowing how the sign of the discriminant \(D = b^{2} - 4ac\) relates to the number of solutions
Distance from a point to a line (Geometry and Precalculus)
  • Being able to write a line as \(ax + by + c = 0\) (general form), including rewriting it from \(y = mx + k\)
  • Knowing that the distance from the point \((x_0,\ y_0)\) to the line \(ax + by + c = 0\) is \(\dfrac{|ax_0 + by_0 + c|}{\sqrt{a^{2} + b^{2}}}\)

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table for general form → standard form (center and radius)
x coefficient l -4
y coefficient m -6
Constant n 9
Center x-coordinate (−l/2) =-B1/2
Center y-coordinate (−m/2) =-B2/2
Radius squared r² (l²/4 + m²/4 − n) =B1^2/4+B2^2/4-B3
Radius r (a circle only if r² > 0) =IF(B6>0,SQRT(B6),"not a circle")
Table for standard form → general form
Center x-coordinate a 1
Center y-coordinate b -2
Right side (radius squared r²) 9
x coefficient l (−2a) =-2*B1
y coefficient m (−2b) =-2*B2
Constant n (a² + b² − r²) =B1^2+B2^2-B3
Table to check how a line meets the circle
Center x-coordinate a 2
Center y-coordinate b 3
Radius r 2
Line's x coefficient p 3
Line's y coefficient q 4
Line's constant s -8
Distance d from center to line =ABS(B4*B1+B5*B2+B6)/SQRT(B4^2+B5^2)
Result =IF(B7<B3,"two points",IF(B7=B3,"tangent","no points"))
After pasting, the upper rows (coefficients and so on) are your inputs and the lower rows are calculated automatically. "^" is a power, SQRT gives the square root, and ABS gives the absolute value.
The first table is the example x²+y²−4x−6y+9=0: center (2, 3), r²=4 and radius 2. If r² is 0 or less, the equation is not a circle, and the cell shows "not a circle".
The second table is the example with center (1, −2) and r²=9: l=−2, m=4, n=−4, so the equation is x²+y²−2x+4y−4=0.
The third table is the example of the circle (x−2)²+(y−3)²=4 and the line 3x+4y−8=0. d=2 equals the radius 2, so the result is "tangent". SQRT can have small decimal errors, so for an exact tangent check it is safer to compare d² and r² (compare =(B4*B1+B5*B2+B6)^2/(B4^2+B5^2) with B3^2).

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table for general form → standard form (center and radius)
x coefficient l -4
y coefficient m -6
Constant n 9
Center x-coordinate (−l/2) =-B1/2
Center y-coordinate (−m/2) =-B2/2
Radius squared r² (l²/4 + m²/4 − n) =B1^2/4+B2^2/4-B3
Radius r (a circle only if r² > 0) =IF(B6>0,SQRT(B6),"not a circle")
Table for standard form → general form
Center x-coordinate a 1
Center y-coordinate b -2
Right side (radius squared r²) 9
x coefficient l (−2a) =-2*B1
y coefficient m (−2b) =-2*B2
Constant n (a² + b² − r²) =B1^2+B2^2-B3
Table to check how a line meets the circle
Center x-coordinate a 2
Center y-coordinate b 3
Radius r 2
Line's x coefficient p 3
Line's y coefficient q 4
Line's constant s -8
Distance d from center to line =ABS(B4*B1+B5*B2+B6)/SQRT(B4^2+B5^2)
Result =IF(B7<B3,"two points",IF(B7=B3,"tangent","no points"))
The same formulas as in Excel work as is. Copy the whole table, paste it into cell A1, and replace the coefficients with your own numbers.

How to calculate it in Python

from fractions import Fraction
import math

# Coefficients of the general form x² + y² + lx + my + n = 0 (a fraction such as 3/4 can be written as Fraction(3, 4))
coef_l = Fraction(-4)
coef_m = Fraction(-6)
coef_n = Fraction(9)

center_x = -coef_l / 2
center_y = -coef_m / 2
radius_squared = coef_l ** 2 / 4 + coef_m ** 2 / 4 - coef_n

print(f"Center: ({center_x}, {center_y})")
print(f"Radius squared r²: {radius_squared}")
if radius_squared > 0:
    print(f"Radius r: {math.sqrt(radius_squared)}")
elif radius_squared == 0:
    print("Not a circle: it describes only one point, the center")
else:
    print("Not a circle: no point satisfies this equation")

# Position relative to the line px + qy + s = 0 (d² and r² are compared as fractions, so there is no rounding error)
line_p = Fraction(3)
line_q = Fraction(4)
line_s = Fraction(-8)
distance_squared = (line_p * center_x + line_q * center_y + line_s) ** 2 / (line_p ** 2 + line_q ** 2)
if distance_squared < radius_squared:
    print("The circle and the line meet at two different points")
elif distance_squared == radius_squared:
    print("The line is tangent to the circle")
else:
    print("The circle and the line do not meet")
With the fractions module from the standard library, the calculation stays in exact fractions with no rounding error. This example uses the circle x²+y²−4x−6y+9=0 and the line 3x+4y−8=0. Running it shows the center (2, 3), r²=4, the radius 2.0 and "The line is tangent to the circle". The distance and the radius are compared as d² and r² so that decimal errors from the square root cannot throw off the tangent check. Change the coefficients and run it again.

How to write it in LaTeX and other math languages (copy and paste)

Equation of a circle (standard form)
(x − a)² + (y − b)² = r²
(x - a)^{2} + (y - b)^{2} = r^{2}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msup><mrow><mo>(</mo><mi>x</mi><mo>&#x2212;</mo><mi>a</mi><mo>)</mo></mrow><mn>2</mn></msup>
    <mo>+</mo>
    <msup><mrow><mo>(</mo><mi>y</mi><mo>&#x2212;</mo><mi>b</mi><mo>)</mo></mrow><mn>2</mn></msup>
    <mo>=</mo>
    <msup><mi>r</mi><mn>2</mn></msup>
  </mrow>
</math>
(x - a)^2 + (y - b)^2 = r^2
(x - a)^2 + (y - b)^2 == r^2
(x - a)^2 + (y - b)^2 = r^2;
(x - a)^2 + (y - b)^2 == r^2
(x - a)^2 + (y - b)^2 = r^2
General form → standard form (finding the center and radius by completing the square)
(x + l/2)² + (y + m/2)² = l²/4 + m²/4 − n
\left(x + \frac{l}{2}\right)^{2} + \left(y + \frac{m}{2}\right)^{2} = \frac{l^{2}}{4} + \frac{m^{2}}{4} - n
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msup><mrow><mo>(</mo><mi>x</mi><mo>+</mo><mfrac><mi>l</mi><mn>2</mn></mfrac><mo>)</mo></mrow><mn>2</mn></msup>
    <mo>+</mo>
    <msup><mrow><mo>(</mo><mi>y</mi><mo>+</mo><mfrac><mi>m</mi><mn>2</mn></mfrac><mo>)</mo></mrow><mn>2</mn></msup>
    <mo>=</mo>
    <mfrac><msup><mi>l</mi><mn>2</mn></msup><mn>4</mn></mfrac>
    <mo>+</mo>
    <mfrac><msup><mi>m</mi><mn>2</mn></msup><mn>4</mn></mfrac>
    <mo>&#x2212;</mo>
    <mi>n</mi>
  </mrow>
</math>
(x + l/2)^2 + (y + m/2)^2 = l^2/4 + m^2/4 - n
Simplify[(x + l/2)^2 + (y + m/2)^2 - (l^2/4 + m^2/4 - n) == x^2 + y^2 + l x + m y + n]
Student:-Precalculus:-CompleteSquare(x^2 + y^2 + l*x + m*y + n, [x, y]);
expand((x + l/2)^2 + (y + m/2)^2 - (l^2/4 + m^2/4 - n))
(x + l/2)^2 + (y + m/2)^2 = l^2/4 + m^2/4 - n
How a line meets a circle (comparing the distance d from the center to the line with the radius r)
d = |pa + qb + s| / √(p² + q²)
d = \frac{\left|pa + qb + s\right|}{\sqrt{p^{2} + q^{2}}}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>d</mi>
    <mo>=</mo>
    <mfrac>
      <mrow><mo>|</mo><mi>p</mi><mi>a</mi><mo>+</mo><mi>q</mi><mi>b</mi><mo>+</mo><mi>s</mi><mo>|</mo></mrow>
      <msqrt><mrow><msup><mi>p</mi><mn>2</mn></msup><mo>+</mo><msup><mi>q</mi><mn>2</mn></msup></mrow></msqrt>
    </mfrac>
  </mrow>
</math>
d = |p a + q b + s| / sqrt(p^2 + q^2)
d = Abs[p a + q b + s]/Sqrt[p^2 + q^2]
d := abs(p*a + q*b + s)/sqrt(p^2 + q^2);
d = abs(p*a + q*b + s)/sqrt(p^2 + q^2);
d = |pa + qb + s|/√(p^2 + q^2)

How to have ChatGPT  do the calculation

You are a math assistant for coordinate geometry. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

For the circle x² + y² − 4x − 6y + 9 = 0, show each of the following:
1. The equation rewritten in standard form (x−a)² + (y−b)² = r² by completing the square
2. The center and the radius (as exact values)
3. How the line 3x + 4y − 8 = 0 meets the circle (at two different points / tangent / not at all), and the coordinates of any intersection points

In Python, use the fractions module from the standard library (or sympy) to calculate exactly, and compare the distance with the radius by comparing d² with r². Show the formulas you used and the numbers from the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.