Tangent to Circle Calculator
A tangent to a circle is a line that touches the circle at exactly one point.
At the point of tangency, the tangent line is perpendicular to the radius drawn to that point.
This calculator finds the tangent line(s) from a point to a circle and the length of the tangent segment.
1) Circle forms used in this tool
The most common circle equation is the center–radius form:
\[
(x-h)^2 + (y-k)^2 = r^2,\qquad r>0
\]
The tool also accepts a general circle form (with the same coefficient on \(x^2\) and \(y^2\)):
\[
A(x^2+y^2) + Dx + Ey + F = 0,\qquad A\ne 0
\]
Dividing by \(A\) gives the normalized form:
\[
x^2+y^2 + Dx' + Ey' + F' = 0
\]
Completing the square shows:
\[
h=-\frac{D'}{2},\qquad k=-\frac{E'}{2},\qquad
r^2=h^2+k^2-F'
\]
2) How many tangents exist from a point?
Let \(C=(h,k)\) be the center and let \(P=(x_0,y_0)\) be the point. Define:
\[
d = \sqrt{(x_0-h)^2 + (y_0-k)^2}
\]
- If \(d>r\): two tangents from \(P\) to the circle.
- If \(d=r\): one tangent (the point is on the circle).
- If \(d<r\): no real tangents (the point is inside).
3) Tangent segment length
If \(P\) is outside the circle, both tangent segments have the same length \(L\). The radius to the tangency point is
perpendicular to the tangent line, so a right triangle forms with hypotenuse \(d\) and one leg \(r\):
\[
L=\sqrt{d^2-r^2}
\]
This is the same right-triangle idea used in many geometry proofs: radius ⟂ tangent.
4) Tangent at a known point on the circle
Suppose \(T=(x_t,y_t)\) lies on the circle \((x-h)^2+(y-k)^2=r^2\). In shifted coordinates \(X=x-h,\;Y=y-k\),
the circle is \(X^2+Y^2=r^2\). The tangent line at \(T\) is:
\[
(x-h)(x_t-h) + (y-k)(y_t-k) = r^2
\]
This comes from the origin-centered fact \(X X_t + Y Y_t = r^2\), then shifting back.
5) Finding the two tangency points from an external point
When \(P\) is outside the circle, there are two tangency points \(T_1\) and \(T_2\).
One clean way to compute them is to translate the circle to the origin:
\[
u=x_0-h,\qquad v=y_0-k,\qquad d^2=u^2+v^2
\]
For \(d^2>r^2\), the tangency points (in centered coordinates) are:
\[
(X,Y)=\frac{r^2}{d^2}(u,v)\ \pm\ \frac{r\sqrt{d^2-r^2}}{d^2}(-v,\;u)
\]
Then shift back using \(x=X+h,\;y=Y+k\).
The \((-v,u)\) vector is perpendicular to \((u,v)\), so the “\(\pm\)” term generates the two symmetric tangency points.
6) Equation of each tangent line
Once a tangency point \(T\) is known, the tangent line is simply the line through \(P\) and \(T\). If
\(P=(x_0,y_0)\) and \(T=(x_t,y_t)\), a robust form is:
\[
a x + b y + c = 0
\]
where one convenient choice is:
\[
a = y_0-y_t,\qquad b = x_t-x_0,\qquad c = x_0y_t-x_ty_0
\]
This avoids slope issues for vertical tangents. If \(b\neq 0\), you may rewrite as:
\[
y = -\frac{a}{b}x - \frac{c}{b}
\]
7) Worked example
Circle: \(x^2+y^2=25\) so \(r=5\) and center \(C=(0,0)\). Point: \(P=(6,8)\).
Then:
\[
d=\sqrt{6^2+8^2}=10,\qquad L=\sqrt{10^2-5^2}=\sqrt{75}\approx 8.660
\]
If you want an example where the tangent length is exactly \(7\), choose \(d=\sqrt{r^2+7^2}\). For \(r=5\), that is \(d=\sqrt{74}\).
Graph note: this calculator uses square units so circles appear as true circles (not stretched ellipses).