The midpoint formula finds the exact center of a segment. The section formula generalizes it: given a segment from P₁ to P₂, find the point that divides it in any ratio m:n. Whether you want the one-third point, the three-quarter point, or any custom split, the section formula handles it.

Internal division

If a point P divides the segment from P₁ to P₂ internally in the ratio m:n (meaning P is between the endpoints, closer to P₁ if n > m):

P = ((mx₂ + nx₁)/(m + n), (my₂ + ny₁)/(m + n))

Reading the ratio: m:n means "P is m parts of the way from P₁ toward P₂, with a total of m + n parts." If m:n = 1:1, you're at the midpoint. If m:n = 1:3, you're 1/4 of the way (closer to P₁). If m:n = 3:1, you're 3/4 of the way (closer to P₂).

Worked example: 1/3 of the way

Find the point 1/3 of the way from P₁ = (2, 4) to P₂ = (8, 10). The ratio is 1:2 (one part toward P₂, two parts toward P₁).

  • P_x = (1 × 8 + 2 × 2) / (1 + 2) = (8 + 4) / 3 = 4
  • P_y = (1 × 10 + 2 × 4) / 3 = (10 + 8) / 3 = 6
  • P = (4, 6)

Verify by checking distances. From (2, 4) to (4, 6): √(4 + 4) = √8 ≈ 2.83. From (4, 6) to (8, 10): √(16 + 16) = √32 ≈ 5.66. Total: 8.49. The ratio of the two parts: 2.83/5.66 = 0.5 = 1/2. ✓

Why it works: similar triangles

Drop perpendiculars from P₁, P, and P₂ to the x-axis. The three resulting parallel lines plus the slanted segment create two similar right triangles. Corresponding sides are in proportion, so the x-coordinates split in the same ratio m:n as the segment itself. Same for y-coordinates.

The section formula is just a clean way to write that proportional split. The midpoint case (m = n) reduces it to a simple average.

External division

Sometimes you want a point that divides a segment externally — extending the line beyond an endpoint, with the ratio applied to the parts on each side. The formula:

P = ((mx₂ − nx₁)/(m − n), (my₂ − ny₁)/(m − n))

Notice the minus signs. This finds the point on the extension of P₁P₂ such that P₁P : PP₂ = m : n in directed-segment terms, with P outside the segment.

External division is rarer in U.S. high-school math but appears in problems about projective geometry, harmonic conjugates, and similar advanced topics.

3D and higher

The section formula extends to 3D and beyond by applying it independently to each coordinate:

P = ((mx₂ + nx₁)/(m + n), (my₂ + ny₁)/(m + n), (mz₂ + nz₁)/(m + n))

And generally to n dimensions in the same way. Always weight each coordinate by the same ratio.

Centroid of a triangle

The centroid of a triangle with vertices A, B, C is the average of all three:

G = ((A_x + B_x + C_x)/3, (A_y + B_y + C_y)/3)

This is the centroid formula, and it's a special case of the section formula applied to medians: the centroid divides each median in the ratio 2:1 from the vertex. So you can build the centroid from any two medians using the section formula with m:n = 2:1.

Center of mass for unequal masses

For two masses m₁ and m₂ at positions P₁ and P₂, the center of mass divides the segment in the inverse ratio:

COM = ((m₂ × P₁ + m₁ × P₂) / (m₁ + m₂))

The heavier mass pulls the center of mass closer to itself. This is the section formula in physics dress.

Common applications

  • Computer graphics: finding interpolated points along a path, smooth animations, Bézier curves.
  • Engineering: finding centroids of composite shapes by combining sub-centroids weighted by area.
  • Physics: center of mass for systems of particles, balance points, lever arms.
  • Geometry proofs: showing that a point divides a segment in a specific ratio is often the cleanest way to prove things about triangles and parallelograms.

Tips for working problems

  • Always identify which point is "1" and which is "2" before applying the formula. Switching them flips the ratio.
  • The formula uses m for the multiplier of the second point and n for the first — easy to swap. Memorize the pattern: "the part nearer P₂ multiplies P₂'s coordinates."
  • For a fraction-of-the-way question (e.g., 2/5 of the way from P₁ to P₂), use ratio m:n = 2:3.

Start with the midpoint case

Most U.S. high-school problems involve the midpoint (m:n = 1:1). Our midpoint calculator handles that case directly. For arbitrary ratios, apply the section formula by hand using the pattern above — the math is trivial once you've parsed the ratio correctly.