Section Formula

Find the point that divides a segment in a given ratio m:n

Reviewed by [email protected], Geometry Calculator Developer & Online Math Educator Last updated May 12, 2026

The section formula tells you the coordinates of a point that divides a line segment AB in a specific ratio m:n. Internal division places the point between A and B; external division places it outside the segment on the extension of AB. The midpoint formula is just the special case m = n = 1.

The Formulas

Name Formula Notes
Internal Division (2D) P = ((m·x₂ + n·x₁) / (m + n), (m·y₂ + n·y₁) / (m + n)) P divides A(x₁, y₁) → B(x₂, y₂) internally in ratio m:n. P lies between A and B.
External Division (2D) P = ((m·x₂ − n·x₁) / (m − n), (m·y₂ − n·y₁) / (m − n)) P lies on extension of AB beyond B (or beyond A if m < n). m ≠ n.
Midpoint Formula M = ((x₁ + x₂)/2, (y₁ + y₂)/2) Special case m = n = 1 of the internal section formula.
Centroid of Triangle G = ((x₁+x₂+x₃)/3, (y₁+y₂+y₃)/3) The centroid divides each median in 2:1 ratio. Average of the three vertices.
Section Formula (3D) P = ((mx₂+nx₁)/(m+n), (my₂+ny₁)/(m+n), (mz₂+nz₁)/(m+n)) Same logic in three dimensions — add the z-coordinate.
Ratio from Coordinates k = AP / PB = (x − x₁) / (x₂ − x) Inverse: given the dividing point, find the ratio. Same formula works for y.

Worked Examples

Example 1: Internal division of A(2, 3) and B(8, 9) in ratio 2:1

  1. x = (2·8 + 1·2) / (2 + 1) = 18 / 3 = 6
  2. y = (2·9 + 1·3) / (2 + 1) = 21 / 3 = 7
  3. P = (6, 7)

Example 2: External division of A(1, 2) and B(4, 8) in ratio 3:1

  1. x = (3·4 − 1·1) / (3 − 1) = 11 / 2 = 5.5
  2. y = (3·8 − 1·2) / (3 − 1) = 22 / 2 = 11
  3. P = (5.5, 11) — on AB extended beyond B

Example 3: Midpoint of A(−2, 4) and B(6, −2)

  1. M = ((−2 + 6)/2, (4 + (−2))/2)
  2. M = (4/2, 2/2) = (2, 1)

Frequently Asked Questions

What is the section formula?
The section formula finds the coordinates of a point P that divides a line segment AB in a ratio m:n. For internal division: P = ((m·x₂ + n·x₁)/(m+n), (m·y₂ + n·y₁)/(m+n)). The midpoint formula is the special case m = n = 1.
What is internal vs external division?
Internal division places P between A and B (m and n both positive). External division places P outside the segment, on the extension of AB. For external, the formula uses subtraction: P = ((m·x₂ − n·x₁)/(m−n), …).
How do I find the centroid of a triangle?
The centroid G is the average of the three vertices: G = ((x₁+x₂+x₃)/3, (y₁+y₂+y₃)/3). It divides each median in a 2:1 ratio measured from the vertex, which the section formula confirms.
Can the section formula find the ratio given the point?
Yes — rearrange to k = AP/PB = (x − x₁)/(x₂ − x). The same formula works for the y-coordinate; both should give the same k if P actually lies on segment AB.
Does it work in 3D?
Yes — just add the z-coordinate using the same logic: P_z = (m·z₂ + n·z₁)/(m+n). Everything else identical.

Skip the manual calculation

Plug in your numbers and get instant step-by-step results.

Use Section Formula Calculator See All Geometry Formulas