AnsRioSmart tools. Clear answers.
Home / Math & statistics / Distance from a point to a line
Math & statistics

Distance from a point to a line

Distance from a point to a line: For line ax + by + c = 0, perpendicular distance is |ax₀ + by₀ + c| / √(a² + b²).

Enter your values ⌁ Runs on your device

Your inputs stay in this browser and are not saved to an account.

YOUR RESULT
Ready when you are.

Enter your values, then select Calculate.

QUICK ANSWER

4

Use the inputs above for your own values. The result follows the method and assumptions shown below.

How it works

For line ax + by + c = 0, perpendicular distance is |ax₀ + by₀ + c| / √(a² + b²).

Input definitions

Line coefficient a
Enter the value in the labeled unit.
Line coefficient b
Enter the value in the labeled unit.
Line coefficient c
Enter the value in the labeled unit.
Point x
Enter the value in the labeled unit.
Point y
Enter the value in the labeled unit.

A worked example

Line coefficient a
3
Line coefficient b
4
Line coefficient c
0
Point x
0
Point y
5
4

Assumptions & limits

Uses the units and scope stated in the input labels. Results are rounded for display; verify the model is appropriate for your situation.

Sources & review

Maintained by AnsRio. Methods and examples are reviewed against the stated formula; this is not professional certification.

Method updated 2026-10-18. Reviewed against the stated method and example. Our verification approach.

Report an issue with this tool or suggest an improvement ↗

Common questions

Can a vertical line be used?

Yes. Use b = 0 and a nonzero coefficient a. Both coefficients cannot be zero because that does not define a line.

How does Distance from a point to a line work?

For line ax + by + c = 0, perpendicular distance is |ax₀ + by₀ + c| / √(a² + b²).

What should I check before using Distance from a point to a line?

Uses the units and scope stated in the input labels. Results are rounded for display; verify the model is appropriate for your situation.

↗
Private tools for everyday decisions.

No sign-up. Tool inputs stay on your device.

How we work