Skip to content
D DocNectar

Free Ratios of Directed Line Segments Calculator

Find the point dividing a segment in a given ratio m:n, internally or externally.

100% Free No Signup Works on all devices

Last updated October 5, 2026 · Report an error

Thanks for rating!

The section formula finds the exact point that divides a directed line segment from P1 to P2 in a given ratio m:n — either internally, landing somewhere between the two endpoints, or externally, landing on the extended line beyond one of them. It generalizes the familiar midpoint formula: a plain midpoint is just the special case where the ratio is 1:1. This formula appears throughout coordinate geometry and its applications: finding a point that divides a segment in a specific proportion is used to compute a triangle's centroid (dividing each median in a 2:1 ratio), to locate a point along a route or cable at a specified fraction of the total distance in engineering and mapping software, and to interpolate positions in computer graphics when an object needs to sit at a precise proportional point between two anchors.

How it works

Enter both endpoints P1(x1, y1) and P2(x2, y2), the ratio m:n, and whether the division should be internal or external. For internal division, the dividing point lands between P1 and P2 and is found with P = ((mx2+nx1)/(m+n), (my2+ny1)/(m+n)) — essentially a weighted average of the two endpoints, weighted by the opposite ratio term. For external division, the point lands on the same line but beyond one of the endpoints, and one sign in the formula flips: P = ((mx2−nx1)/(m−n), (my2−ny1)/(m−n)). Because the external formula divides by (m − n), it becomes undefined whenever m equals n, since an external division in an exact 1:1 ratio has no finite solution — the "point" would need to sit infinitely far away.

  1. Enter p1 — x1.
  2. Enter p1 — y1.
  3. Enter p2 — x2.
  4. Enter p2 — y2.
  5. Enter ratio — m.
  6. Enter ratio — n.
  7. Enter division type.
  8. Click Calculate to see your results.

Examples

(0,0) to (10,15), ratio 2:3 internal

P = ((2×10+3×0)/(2+3), (2×15+3×0)/(2+3)) = (20/5, 30/5) = (4, 6) — a point closer to P1 since the ratio weights it more heavily toward that end.

(0,0) to (10,15), ratio 3:2 external

P = ((3×10−2×0)/(3−2), (3×15−2×0)/(3−2)) = (30/1, 45/1) = (30, 45) — a point well beyond P2, since external division always places the result outside the original segment.

(2,2) to (8,10), ratio 1:1 internal

P = ((1×8+1×2)/2, (1×10+1×2)/2) = (10/2, 12/2) = (5, 6) — exactly the midpoint of the segment, confirming that a 1:1 internal ratio is just the ordinary midpoint formula in disguise.

Common mistakes to avoid

  • Using equal m and n values for external division, which causes an undefined division-by-zero result (m − n = 0).
  • Swapping P1 and P2 without also swapping which end of the ratio (m or n) corresponds to which point.
  • Confusing internal and external division and expecting a point between the endpoints when external division was actually selected.
  • Assuming the ratio m:n must be written in lowest terms — it doesn't; 4:6 and 2:3 produce exactly the same dividing point.

Frequently asked questions

The dividing point still lies on the infinite line through P1 and P2, but it falls outside the segment itself — beyond one of the two endpoints rather than between them.
The external formula divides by (m − n) in the denominator. When m = n, that denominator becomes zero, which is undefined — geometrically, this corresponds to a case where the "external" point would need to sit infinitely far along the line, since the two ends are being weighted exactly equally but pulled in opposite directions.
The midpoint formula is simply the internal section formula with m = n = 1 (or any equal ratio like 1:1, 2:2, etc.) — it's a special case, not a separate formula.
Yes — the ratio m:n specifically measures the segment from P1 toward P2, so swapping P1 and P2 (while keeping the same m:n) generally produces a different point, equivalent to using the ratio n:m from the original order instead.
No — as long as m and n are both positive, the internal formula always produces a point strictly between P1 and P2 (or exactly on one of them in a degenerate ratio), by construction as a weighted average.
A triangle's centroid divides each median in a 2:1 ratio from the vertex to the midpoint of the opposite side — that specific proportion is found using exactly this internal section formula.

Get new calculators and guides in your inbox

No spam — just new tools like Ratios of Directed Line Segments Calculator and practical guides.

Favorites