Point to Line Distance Calculator
Find the distance from a point to a line.
Result
How it is calculated
The line must be written in general form A·x + B·y + C = 0. The perpendicular distance from the point (x₀, y₀) is d = |A·x₀ + B·y₀ + C| / √(A² + B²). The numerator measures how far the point is from satisfying the line equation, and the denominator is the length of the normal vector (A, B), which scales that into real length units. The result is always zero or positive because of the absolute value, and it is zero exactly when the point lies on the line. If A and B are both 0 there is no line, so no result is given. Units are whatever your coordinates use.
Worked example
Take the line 3x + 4y − 10 = 0 (A = 3, B = 4, C = −10) and the point (5, 6). Substitute: 3·5 + 4·6 − 10 = 15 + 24 − 10 = 29. The denominator is √(3² + 4²) = √25 = 5. So d = |29| / 5 = 5.80 units.
Common mistakes
- Leaving the line as y = mx + k and typing m and k into A and B; first rearrange to the form Ax + By + C = 0 (for y = mx + k use A = −m, B = 1, C = −k).
- Getting the sign of C wrong when moving the constant to the left-hand side.
- Swapping the point's x and y coordinates.
- Dropping the absolute value by hand and reporting a negative distance; distance is never negative.
- Using this for a line segment: the tool measures to the infinite line, so the nearest point may lie beyond the segment's ends.
About this calculator
This calculator finds the shortest distance from a point to a line using the standard formula d = |Ax₀ + By₀ + C| / √(A² + B²), where the line is written as Ax + By + C = 0 and (x₀, y₀) is the point. That shortest path is always the perpendicular segment from the point to the line.
Students use it to check analytic geometry homework, and it shows up in real applications like computer graphics (collision detection), robotics (path planning), and CAD software (measuring clearances).
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
This tool expects the line as ax + by + c = 0, so a slope-intercept equation needs rewriting first. For y = 2x + 1, move everything to one side to get 2x - y + 1 = 0, which means a = 2, b = -1 and c = 1. With the point (3, 0) the answer is about 3.13. The result is the shortest, perpendicular distance, always shown as a positive number. Do you want other line forms supported? Tell us which.