Section Formula and Midpoint

The point dividing the segment between two points in the ratio m : n.

P = ((n x₁ + m x₂) ÷ (m + n), (n y₁ + m y₂) ÷ (m + n))

With m = n = 1 it is the midpoint.

With t = m ÷ (m + n) it is the same as linear interpolation (lerp).

Calculator

Change a value and the result and picture update instantly.

Result

Point x2
Point y1

Animated picture

The picture follows your values. Some points and shapes can be dragged.

Use in game development

Use it to place a camera between two players or to find a point along a path.

Code example (JavaScript)

// m:n internal division is lerp with t = m / (m + n)

What the symbols mean

SymbolMeaning
x1A: x
y1A: y
x2B: x
y2B: y
mm
nn
XPoint x
YPoint y

More formulas in this category

Frequently asked questions

What is the formula for Section Formula and Midpoint?
The formula for Section Formula and Midpoint is P = ((n x₁ + m x₂) ÷ (m + n), (n y₁ + m y₂) ÷ (m + n)). The point dividing the segment between two points in the ratio m : n.

Math Formula Quiz Coordinate Geometry

Sources

Checked: 2026-11-29