Understanding the tangent to a circle calculator — concept and principle
This calculator finds the tangent lines from a point to a circle. Given the circle's centre and radius and a point P, it gives the tangent length, the distance from P to the centre, both tangent points, the equations of both tangent lines and the angle between them. Use it for coordinate geometry homework, CAD, belt and pulley layouts and line-of-sight problems.
How it is calculated
With centre C = (h, k), radius r and P at distance d from C:
- Tangent length PT = √(d² − r²).
- Tangent points: T = (h + r·cos(φ ± α), k + r·sin(φ ± α)), where φ is the direction of P from C and α = arccos(r ÷ d).
- Tangent line at T: (Tx − h)(x − h) + (Ty − k)(y − k) = r², shown as y = mx + b (or x = c if vertical).
- Angle between the two tangents = 2·arcsin(r ÷ d).
A point on the circle has one tangent; a point inside has none.
The principle
A tangent touches the circle at exactly one point and is perpendicular to the radius there. From an outside point, the centre, the tangent point and P form a right triangle with the right angle at T. The hypotenuse is CP = d, one leg is the radius r, so the other leg, the tangent length, is √(d² − r²) by Pythagoras. There are two such triangles, mirror images across the line CP, which is why an outside point always has two tangents of equal length.
Worked example
Default inputs: centre (0, 0), r = 5, P = (10, 5).
- d = √(10² + 5²) = √125 ≈ 11.1803.
- Tangent length = √(125 − 25) = √100 = 10.
- Tangent point 1 = (0, 5); its tangent line is y = 5.
- Tangent point 2 = (4, −3); its tangent line is 4x − 3y = 25, or y = 1.33333x − 8.33333.
- Angle between the tangents = 2·arcsin(5 ÷ 11.1803) ≈ 53.13°.
| Point P: x | Tangent length from the point |
|---|---|
| 2.5 | 2.5 |
| 5 | 5 |
| 7.5 | 7.5 |
| 10 | 10 |
| 12.5 | 12.5 |
| 15 | 15 |
| 20 | 20 |
How to read the result
Both tangents from the same point have the same length. Check each tangent point: it should be exactly r from the centre, and the tangent line should pass through P. A small angle between the tangents means P is far from the circle; the angle approaches 180° as P moves close to the circle.
Common mistakes
- Using d + r or d − r instead of √(d² − r²).
- Forgetting the second tangent.
- Applying the formula to a point inside the circle, which has no tangents.
- Writing the tangent line through the centre rather than perpendicular to the radius.
Frequently asked questions
Why is a tangent perpendicular to the radius?
The radius to T is the shortest distance from the centre to the line; the shortest segment from a point to a line is perpendicular to it.
Are the two tangent lengths from a point always equal?
Yes. The two right triangles are congruent.
What is the tangent line at a point on the circle?
The line through that point perpendicular to the radius: (x₀ − h)(x − h) + (y₀ − k)(y − k) = r².
Sources: OpenStax, Prealgebra 2e, §9.3 (Pythagorean theorem); circle tangent–radius theorem (Euclid, Elements, Book III, Proposition 18)