Section Formula Calculator

Get the dividing point coordinates.

How it is calculated

The segment runs from A(x1, y1) to B(x2, y2), and the point P divides it so that AP : PB = m : n. The engine uses Px = (m·x2 + n·x1) ÷ (m + n) and Py = (m·y2 + n·y1) ÷ (m + n). Note which end carries which weight: m multiplies the coordinates of B, so a larger m pulls P toward B. Coordinates share any one unit, the ratio has none, and results show 4 decimal places. When m = n the formula gives the midpoint. A negative m or n is accepted and produces an external division point, which lies outside the segment. If m + n = 0, or any box is empty, there is no result.

Worked example

Divide the segment from A(2, 3) to B(10, 11) in the ratio 2:3. The total weight is m + n = 5. For x: (2 × 10 + 3 × 2) ÷ 5 = 26 ÷ 5 = 5.2. For y: (2 × 11 + 3 × 3) ÷ 5 = 31 ÷ 5 = 6.2. The tool gives P = (5.2000, 6.2000). Check: AP should be 2/5 of the way from A to B, and 2 + 0.4 × 8 = 5.2 for x, 3 + 0.4 × 8 = 6.2 for y.

Try this example →

Common mistakes

  • Swapping m and n. Here m is the part next to A and n the part next to B, so 2:3 gives a point closer to A than to B; reversing the numbers moves P to the other side of the midpoint.
  • Entering a fraction of the distance, such as 0.4, in one box. The tool needs the two parts of the ratio, for example 2 and 3 (or 0.4 and 0.6), not a single share.
  • Using a negative value by accident. A minus sign turns it into an external division, so P can land outside the segment, for example with 3:−1.
  • Treating m = n = 0 as a midpoint. The ratio 0:0 has no meaning and the tool gives nothing; use 1 and 1 for the midpoint.
  • Mixing up the order of the endpoints. Swapping A and B flips which end the ratio is measured from.

About this calculator

The section formula is a coordinate-geometry tool for finding the exact point that divides a line segment between two given endpoints in a chosen ratio m:n. For a segment from (x₁,y₁) to (x₂,y₂), the internal division point is ((mx₂+nx₁)/(m+n), (my₂+ny₁)/(m+n)). When m equals n, this collapses to the familiar midpoint formula, which is why the midpoint calculation is really just a special case of the more general section formula.

Students meet it first in analytic geometry to prove properties of triangles and quadrilaterals (like locating a centroid, which divides each median in a 2:1 ratio), but the same math drives practical work elsewhere: computer graphics programmers use it for linear interpolation (lerp) between two points when animating motion or blending colors, and surveyors and civil engineers use it to place stakes or way-points at a specified fractional distance along a boundary line.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators