Section Formula Calculator

x-coordinate—
y-coordinate—
Point P—

How Section Formula Calculator is calculated: Internal: P = ((mx2 + nx1)/(m + n), (my2 + ny1)/(m + n)); External: P = ((mx2 − nx1)/(m − n), (my2 − ny1)/(m − n))

What is the section formula?

The section formula finds the coordinates of a point that divides a line segment in a given ratio. If a point P divides the segment joining A and B in the ratio m to n, the formula gives the coordinates of P as a weighted average of the coordinates of A and B, with the weights swapped: the x-coordinate is m times x2 plus n times x1, divided by m plus n. The same holds for y. It is one of the most used formulas in coordinate geometry, and it is the basis for the midpoint formula, which is the special case where m equals n.

This calculator finds the dividing point for both internal division, where P lies between A and B, and external division, where P lies outside the segment on the line through A and B. For the distance between the two endpoints, a distance calculator covers the same two points in a different way.

No data leaves your device: the maths runs entirely in your browser, with no sign-up and no server round-trip. You can change a number, see the answer move, and change it back, all instantly. It is a private way to check a figure before you talk to a professional about it. The page has no tracking of the numbers you enter, and closing the tab leaves nothing behind.

How the section formula works

For internal division in the ratio m to n, the point P has coordinates ((m times x2 plus n times x1) divided by (m plus n), (m times y2 plus n times y1) divided by (m plus n)). The weights are swapped because the point is closer to the endpoint with the larger weight on the other side: if m is larger than n, P is closer to B, because the m weight multiplies B's coordinates. For external division, the plus signs become minus signs, and the denominator becomes m minus n, because P lies outside the segment.

The two points are the endpoints of the segment, given by their x and y coordinates. The ratio m to n is the ratio in which P divides the segment, and it is entered as two separate numbers. The division type picks internal or external: internal puts P between the endpoints, and external puts P outside, on the side of the endpoint with the smaller ratio part.

The x and y coordinates are the headline answers, and they are the coordinates of the dividing point P. The point row shows them together as an ordered pair, which is the form most textbooks use. For external division with m equal to n, the formula breaks down, because the denominator becomes zero and the point is at infinity, and the calculator says so instead of giving a number.

A dash in a result row means the value does not apply to the inputs you entered, not that the calculation failed. Some rows only make sense for certain methods or certain inputs, and the calculator leaves them blank rather than inventing a number. If every row shows a dash, check the inputs: a missing or zero value in a required field is the usual cause, and the field labels say which values are needed.

The ratio m to n, explained

The ratio is the input that decides where P sits, and it is the one people most often enter backwards. The ratio m to n means that the distance from P to A and the distance from P to B are in the ratio m to n, but the formula multiplies A's coordinates by n and B's coordinates by m, which looks backwards. The reason is that P is closer to the endpoint whose ratio part is smaller, so the larger weight belongs to the further endpoint.

The midpoint is the simplest case: when m equals n, the ratio is 1 to 1, and the formula gives the average of the coordinates, which is the midpoint. The centroid of a triangle is another case: it divides each median in the ratio 2 to 1, so the section formula with m equal to 2 and n equal to 1 gives the centroid from any vertex and the midpoint of the opposite side.

Changing the ratio moves P along the segment in a predictable way. A ratio of 1 to 2 puts P one third of the way from A to B, because the weights are 2 and 1, and P is twice as close to A as to B. A ratio of 2 to 1 puts P two thirds of the way from A to B. A ratio of 1 to 1 puts P exactly in the middle. The position is a weighted average, so it always lies between the endpoints for internal division.

A worked example: dividing (0, 0) to (6, 8) in ratio 1 to 2

Take the segment from A at (0, 0) to B at (6, 8), and divide it internally in the ratio 1 to 2. The point P should lie one third of the way from A to B.

The x-coordinate is (1 times 6 plus 2 times 0) divided by 3, which is 2.00. The y-coordinate is (1 times 8 plus 2 times 0) divided by 3, which is 2.67. The point is (2.00, 2.67), which is one third of the way from A to B, as expected.

The point (2.00, 2.67) is one third along the segment, which makes sense: the ratio 1 to 2 means P is twice as far from B as from A, so it sits closer to A. The distance from A to P is about 3.33 units, and the distance from P to B is about 6.67 units, which are in the ratio 1 to 2. The section formula gives the coordinates directly, without needing to work out those distances.

Who uses the section formula

School students in Class 10 and 11 use it constantly, because it is the standard tool for dividing a line segment, finding a midpoint, and finding the centroid of a triangle. Most coordinate geometry problems in those classes reduce to the section formula applied once or twice, so knowing it by heart is essential.

Computer graphics uses it for interpolation: finding a point part of the way between two points is how lines are drawn, how animations move, and how colours are blended. The weighted average in the section formula is the same calculation as linear interpolation, which is one of the most common operations in graphics.

Surveyors and engineers use it to find points along a line between two known landmarks, such as a point one third of the way along a boundary, or a point dividing a road into sections. The formula works in any coordinate system, so it applies to maps, plans and site layouts alike. A Pythagorean theorem calculator is the tool for the right-angled triangle that underlies the coordinate system.

No calculator replaces professional advice where money, safety or a legal obligation is involved. The figures here are computed correctly from the inputs and the formula shown, but the choice of formula, the choice of inputs and the decision that follows are yours. When the stakes are high, take the calculated figure to someone qualified and ask them to confirm it before you commit. For a related calculation, the triangle area calculator covers the next number most people need after this one.

Internal division vs external division

Internal division puts the point between the two endpoints, on the segment itself, and the ratio parts are both positive. External division puts the point outside the segment, on the line through the endpoints but beyond one of them, and the formula uses subtraction instead of addition. The external point is on the side of the endpoint with the smaller ratio part.

The two cases are related: external division in the ratio m to n is the same as internal division with one part negative. That is why the formula changes plus to minus. In practice, internal division is far more common, and external division appears in problems about harmonic division, angle bisectors and Apollonius circles, where the point outside the segment has a special meaning.

Keep both tools in mind. The right choice is the one whose inputs match the numbers you actually have, not the one with the fancier name. When in doubt, run both and compare: the pair of answers is usually more useful than either one alone.

Common mistakes with the section formula

The first is not swapping the weights, and multiplying A's coordinates by m instead of n, which puts the point on the wrong side of the midpoint. The second is using the ratio the wrong way round, so that 1 to 2 becomes 2 to 1, which mirrors the point across the midpoint.

The third is using plus signs for external division, which gives a point inside the segment instead of outside it. The fourth is trying external division with m equal to n, where the denominator is zero and the point is at infinity.

Check your answer by measuring the distances: for internal division in the ratio m to n, the distance from P to A divided by the distance from P to B must equal m divided by n. If it does not, the weights are swapped or the ratio is backwards.

How to use this section formula calculator

To use it, enter x1; enter y1; enter x2; enter y2, then read the results box at the top. The main result is highlighted, and the other rows give the supporting figures. If an answer looks wrong, check the inputs first: a misplaced decimal or a wrong unit is the usual cause, not the formula.

Enter the two endpoints, the two parts of the ratio, and pick internal or external division. Read the coordinates first, then the point as an ordered pair. If the ratio is 1 to 1, the answer is the midpoint, which is a good check that the calculator is working.

Everything on this page runs in your browser, so the numbers you type never leave your device. There is no sign-up, no upload and no waiting for a server. Change any input and the results update straight away, which makes it easy to test a few values side by side before you decide anything. You can also use it offline once the page has loaded, because the calculation needs no connection at all.

Frequently Asked Questions

The section formula gives the coordinates of a point dividing the segment joining (x1, y1) and (x2, y2) in the ratio m to n. For internal division, the point is ((m times x2 plus n times x1) divided by (m plus n), (m times y2 plus n times y1) divided by (m plus n)).

Set m equal to n, so the ratio is 1 to 1. The formula then gives the average of the coordinates: ((x1 plus x2) divided by 2, (y1 plus y2) divided by 2), which is the midpoint of the segment.

External division is when the point divides the segment from outside, lying on the line through the endpoints but beyond one of them. The formula uses subtraction: ((m times x2 minus n times x1) divided by (m minus n), and similarly for y). It is undefined when m equals n.

The centroid is the point where the three medians of a triangle meet, and it divides each median in the ratio 2 to 1. Its coordinates are the average of the three vertices: ((x1 plus x2 plus x3) divided by 3, (y1 plus y2 plus y3) divided by 3).

More free tools

More calculators and utilities from Sortrun — free, no sign-up.