Intermediate

Ratios of Directed Line Segments Calculator — Section Formula

Enter the endpoints A(x₁, y₁) and B(x₂, y₂) and the ratio m:n to find the point P that divides segment AB in that ratio — supports both internal and external division.

Division type

Point P — x coordinate
5

P = (5, 6)

P (x)
5
P (y)
6
Length |AB|
8.4853
Length |AP|
5.6569
Length |PB|
2.8284
Ratio AP : PB
5.6569 : 2.8284
APB
67%
33%
AP (m = 2)
PB (n = 1)
The ratio m : n in which P divides AB
Step by step
  1. 1

    m × x₂

    2 × 7 = 14
  2. 2

    n × x₁

    1 × 1 = 1
  3. 3

    Denominator m + n

    2 + 1 = 3
  4. 4

    x coordinate of P

    (14 + 1) ÷ 3 = 5
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

The section formula finds point P dividing AB in ratio m:n. Internally: P = ((mx₂ + nx₁)/(m+n), (my₂ + ny₁)/(m+n)). Externally: replace + with − in numerator and denominator. The midpoint is the special case m = n = 1.

Formula
Internal: P = ((mx₂ + nx₁)/(m+n), (my₂ + ny₁)/(m+n)) • External: P = ((mx₂ − nx₁)/(m−n), (my₂ − ny₁)/(m−n))
How this is calculated

The section formula locates the point P that divides the segment AB in the ratio m:n. For internal division, P lies between A and B: the x-coordinate is the weighted average (m·x₂ + n·x₁)/(m + n), and the y-coordinate follows the same pattern. Geometrically, AP:PB = m:n, meaning the first segment is m/(m+n) of the total length and the second is n/(m+n).

For external division, P lies on the extension of AB beyond one of the endpoints. The formula changes to (m·x₂ − n·x₁)/(m − n) for both coordinates. External division is undefined when m = n because the denominator is zero (the point would be at infinity on the line). A negative ratio in the external case indicates the point lies on the opposite side.

The section formula is a cornerstone of coordinate geometry: it generalises the midpoint formula (which is simply m = n = 1 for internal division), and underpins centroid calculations, trisection, and many computer graphics interpolation problems.

Frequently asked questions

When m = n = 1 the internal section formula gives ((x₁ + x₂)/2, (y₁ + y₂)/2), which is the standard midpoint formula. Any equal ratio (m = n) gives the midpoint for internal division.

External division means P lies outside the segment AB on the line through A and B — either beyond B (when m > n) or beyond A (when m < n). The ratio AP:PB still equals m:n but the signs of the segments are opposite because they point in different directions.

Yes. The formula works for any positive real ratio. For example m = 1.5, n = 0.5 gives P three-quarters of the way from A to B.

Also known as

section formula calculator
internal division of line segment
external division of line segment
point dividing line segment ratio
coordinate geometry section formula
ratios directed line segments
division point line segment calculator

APA

TG we-Calculate Editorial Team. (2026). Ratios of Directed Line Segments Calculator — Section Formula [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/ratios-of-directed-line-segments-calculator

Chicago

TG we-Calculate Editorial Team. "Ratios of Directed Line Segments Calculator — Section Formula." TG we-Calculate. 2026. https://we-calculate.com/calculator/ratios-of-directed-line-segments-calculator.

IEEE

TG we-Calculate Editorial Team, "Ratios of Directed Line Segments Calculator — Section Formula," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/ratios-of-directed-line-segments-calculator

BibTeX

@misc{wecalculate_ratios_of_directed_line_segments_calculator, title = {Ratios of Directed Line Segments Calculator — Section Formula}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/ratios-of-directed-line-segments-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?