ProMathTools
ProMathTools

Point to Line Distance

Find the shortest distance between a given point and a straight line. This calculator helps you solve geometry problems quickly and accurately, using the standard formula for the distance from a point to a line.

Enter the coefficient of x in Ax + By + C = 0

Enter the coefficient of y in Ax + By + C = 0

Enter the constant term C in Ax + By + C = 0

Enter the x-coordinate of the point

Enter the y-coordinate of the point

How it works

Find the shortest distance between a given point and a straight line. This calculator helps you solve geometry problems quickly and accurately, using the standard formula for the distance from a point to a line.


The Formula

The distance (D) from a point (x₀, y₀) to a line Ax + By + C = 0 is given by:
D = |Ax₀ + By₀ + C| / √(A² + B²)

Worked Example

  1. Example: Point (3, 2) to Line 4x + 3y - 6 = 0

    Let's find the distance from the point (3, 2) to the line 4x + 3y - 6 = 0. Here, x₀ = 3, y₀ = 2, A = 4, B = 3, C = -6. Substitute these values into the formula: D = |(4 * 3) + (3 * 2) + (-6)| / √(4² + 3²) D = |12 + 6 - 6| / √(16 + 9) D = |12| / √25 D = 12 / 5 D = 2.4 The distance is 2.4 units.


Tips, Assumptions & Limitations

  • Ensure your line equation is in the standard form Ax + By + C = 0 before entering coefficients.
  • The order of A, B, and C matters; make sure they correspond to x, y, and the constant term respectively.
  • This formula calculates the perpendicular distance, which is the shortest possible distance.
FAQ

The distance from a point to a line is the shortest possible distance between that point and any point on the line. This shortest distance is always along a line segment that is perpendicular to the given line.

The absolute value ensures that the distance is always a non-negative number, as distance is a scalar quantity and cannot be negative. The term (Ax₀ + By₀ + C) can be positive or negative depending on which side of the line the point (x₀, y₀) lies.

Yes, but you'll need to convert your line equation first. For example, if you have y = mx + b, rewrite it as mx - y + b = 0. Then, A = m, B = -1, and C = b. If you have a vertical line x = k, rewrite it as x - k = 0, so A = 1, B = 0, C = -k.

Companion article

Distance from a Point to a Line Explained: Formula & Examples

Related Calculators

Browse Category

All Math Calculators

Related Guides


How this calculator works

Understanding how to find the distance from a point to a line is a fundamental concept in geometry and algebra. Whether you're working on homework, preparing for an exam, or just curious, this skill helps you grasp the relationship between points and lines in a coordinate system. This guide will break down the formula, walk you through examples, and show you how our online calculator can make these calculations a breeze.

Explanation

The distance from a point to a line refers to the shortest possible distance between a given point and any point on the line. This shortest path is always along a line segment that is perpendicular to the original line. To calculate this, we use a specific formula that involves the coordinates of the point and the coefficients of the line's equation. Consider a point P with coordinates (x₀, y₀) and a straight line L defined by the equation Ax + By + C = 0. The formula for the perpendicular distance (D) from point P to line L is derived using principles of vector projection or by minimizing the distance function, and it looks like this:

Formula

D = |Ax₀ + By₀ + C| / √(A² + B²)

Worked example

Let's apply this formula to a real example. Suppose we want to find the distance from the point (5, -3) to the line 3x - 4y + 10 = 0. First, identify your values: Point (x₀, y₀) = (5, -3) Line Ax + By + C = 0, so A = 3, B = -4, C = 10 Now, plug these values into the formula: D = |(3 * 5) + (-4 * -3) + 10| / √(3² + (-4)²) D = |15 + 12 + 10| / √(9 + 16) D = |37| / √25 D = 37 / 5 D = 7.4 So, the shortest distance from the point (5, -3) to the line 3x - 4y + 10 = 0 is 7.4 units.

How to use this tool

Using our Distance from a Point to a Line Calculator is straightforward. First, make sure your line equation is in the standard form Ax + By + C = 0. Then, simply enter the coefficients A, B, and C into their respective fields. Next, input the x-coordinate (x₀) and y-coordinate (y₀) of your point. Once all values are entered, the calculator will instantly display the shortest distance, helping you check your work or quickly solve problems.

Frequently asked questions

What if my line equation is in y = mx + b form?
If your line is in slope-intercept form (y = mx + b), you need to rearrange it into the standard form Ax + By + C = 0. For example, y = 2x + 5 becomes 2x - y + 5 = 0. In this case, A = 2, B = -1, and C = 5.
Does the order of A, B, and C matter?
Yes, the order is crucial. A is always the coefficient of x, B is the coefficient of y, and C is the constant term. Ensure you match them correctly to avoid errors in your calculation.
Can this formula be used for 3D space?
The formula presented here is specifically for 2D Cartesian coordinates. Calculating the distance from a point to a line in 3D space involves a slightly different vector-based approach.

Read the full guide →

About UsBlogChrome ExtensionFAQsTerms and ConditionsPrivacy PolicySitemap
EmailLinkedInFacebook

© 2025-2026 PromathTools. All rights reserved.

Built by KruskalCode – SaaS & Automation Experts · EverydayDevTools