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 x
Point y
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
| Symbol | Meaning |
|---|---|
x1 | A: x |
y1 | A: y |
x2 | B: x |
y2 | B: y |
m | m |
n | n |
X | Point x |
Y | Point 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