# Ratios of Directed Line Segments Calculator

URL: https://speedycalculator.com/calculators/math/ratios-of-directed-line-segments/
Last updated: 2026-10-30

> The directed line segment calculator finds the point P that divides the segment from A to B in a given ratio m : n, internally or externally.

## Inputs

- Endpoint A – x
- Endpoint A – y
- Endpoint B – x
- Endpoint B – y
- The line is partitioned
- Ratio m
- Ratio n

## Results

- Point P – x
- Point P – y
- Fraction of the way from A to B

## Formula

```
Internal: P = ((m·x₂ + n·x₁)/(m + n), (m·y₂ + n·y₁)/(m + n))
External: P = ((m·x₂ − n·x₁)/(m − n), (m·y₂ − n·y₁)/(m − n))
```

## Explanation

The section formula locates a point a given fraction of the way along a segment – a centre of mass on a rod, a point on a map route, or the centroid of a triangle (which divides each median 2 : 1).

### How to use the Ratios of Directed Line Segments Calculator

- **Endpoint A – x**
- **Endpoint A – y**
- **Endpoint B – x**
- **Endpoint B – y**
- **The line is partitioned**
- **Ratio m**
- **Ratio n**

Results update as you type, and everything is calculated in your browser.

### How it works

For an internal division, P lies between A and B with AP : PB = m : n. For an external division, P lies on the extension of AB.

### Inputs explained

FieldWhat to enterEndpoint A – xA numberEndpoint A – yA numberEndpoint B – xA numberEndpoint B – yA numberThe line is partitionedChoose one: Internally, ExternallyRatio mA numberRatio nA number

### Example values

How the main result changes when **Endpoint A – x** changes and everything else stays at the example values above:

Endpoint A – xPoint P – x0.56.8750.756.9375171.257.06251.57.12527.25

## Worked example

Inputs — Endpoint A – x: 1; Endpoint A – y: 2; Endpoint B – x: 9; Endpoint B – y: 6; The line is partitioned: Internally; Ratio m: 3; Ratio n: 1.

Results — **Point P – x = 7**; Point P – y = 5; Fraction of the way from A to B = 0.75.

## Key terms

- **Section formula**: The coordinates of a point dividing a segment in a ratio.

## FAQ

**What does a ratio of 3 : 1 mean?**
P is three quarters of the way from A to B.

**What is the midpoint ratio?**
1 : 1.

**What is an external division?**
P lies outside AB with AP : PB = m : n.

**Why can't m = n externally?**
The formula divides by m − n = 0.


## Sources

- [OpenStax – College Algebra 2e](https://openstax.org/details/books/college-algebra-2e)
- [OpenStax – Precalculus 2e](https://openstax.org/details/books/precalculus-2e)
