Distância Ponto-Reta
- Created by
- Renato Passos, Eng. de Software
- Reviewed by
- Renato Passos, Eng. de Software
Last updated: Apr 18, 2026
About this calculator
This calculator determines the perpendicular distance between a point and a line in the Cartesian plane. The formula used is |ax₀ + by₀ + c| / √(a² + b²), where (x₀, y₀) are the point coordinates and a, b, c are the coefficients of the line's general equation (ax + by + c = 0). The result is always positive or zero, representing the shortest distance from the point to the line.
To use it, enter the point coordinates and the line coefficients. The calculator checks if the line is valid (a and b cannot both be zero) and computes the distance. If the point lies on the line, the result is zero. This tool is useful in analytic geometry, engineering, computer graphics, and optimization problems involving distances.
Caution: ensure the line equation is in general form (ax + by + c = 0). If the line is in another form, such as y = mx + n, convert it to general form before using. Remember that the calculated distance is the shortest distance, i.e., the perpendicular distance.
Frequently asked questions
What does a zero result mean?
It means the point lies exactly on the line, as the distance is zero.
Can I use the line equation in the form y = mx + n?
Not directly. You must convert it to the general form ax + by + c = 0. For example, y = 2x + 3 becomes 2x - y + 3 = 0.
Is the distance always positive?
Yes, the absolute value in the numerator ensures a non-negative result. If the point is on the line, the distance is zero.
What are practical applications of this distance?
It is used in analytic geometry, computer graphics (collision detection), engineering (safety distances), and optimization problems.
What if a and b are both zero?
That does not represent a valid line. The calculator will show an error. Check your coefficients.