Apollonius Theorem Calculator
Work out all three medians of a triangle from its side lengths using Apollonius' theorem.
What it does
Apollonius' theorem relates the length of a median to the lengths of the three sides of a triangle. A median runs from a vertex to the midpoint of the opposite side, so it cuts that side into two equal pieces. The theorem is older than Stewart's theorem and is in fact the special case of Stewart's theorem in which the foot of the cevian is the midpoint.
The statement is short. Draw the median from A to the midpoint M of BC, and write AB and AC for the two sides that meet at A. Then AB squared plus AC squared equals twice AM squared plus twice BM squared. Since BM is half of BC, this can be solved for AM without knowing any angle.
That rearrangement is the formula used here. It gives the length of each median from the three side lengths alone. Enter the sides once and the tool returns all three medians, together with the sum of their squares and the matching expression in the sides.
The sum of squares is a useful check. The three median squares always add up to three quarters of the sum of the three side squares, so a misplaced side or a arithmetic slip shows up as a mismatch between the last two results.
The calculation uses unitless lengths. Centimetres, inches or any other consistent scale all give the same ratio between a median and the sides, so there is no unit selector on this page.
How to use
- Identify which side you want the first median to reach, and enter it as side a.
- Enter the two remaining sides as b and c. The order of b and c does not affect the medians.
- Check that the three numbers can be sides of a triangle. The tool rejects sets that fail the triangle inequality.
- Read the median to side a from the first result, then the other two from the next lines.
- Compare the sum of the three median squares with the three quarters value as a built in check.
- Try an equilateral or an isosceles triangle to see how the medians become equal or pair up.
Formula
- a
- The side bisected by the first median.
- b
- The side from the same vertex as c, opposite vertex B.
- c
- The third side of the triangle.
- m_a
- Length of the median drawn to side a.
- m_b
- Length of the median drawn to side b.
- m_c
- Length of the median drawn to side c.
Apollonius' theorem is often written as b squared + c squared = 2 times (m_a squared + (a/2) squared). In a right triangle the median to the hypotenuse is exactly half the hypotenuse, and in an equilateral triangle every median is also an altitude. In an isosceles triangle the median to the unequal side is perpendicular to it, and the three side lengths then form a right triangle with half of that side.
Worked example
Example: an isosceles triangle with sides 6, 5 and 5
Defaults: a = 6, b = 5 and c = 5. Side a is the unequal base, so its median is also the altitude.
- Median to side a: m_a squared = (2 x 25 + 2 x 25 minus 36) / 4 = (100 minus 36) / 4 = 64 / 4 = 16, so m_a = 4.
- Median to side b: m_b squared = (2 x 25 + 2 x 36 minus 25) / 4 = (50 + 72 minus 25) / 4 = 97 / 4 = 24.25, so m_b = 4.9244.
- Median to side c: by the same calculation m_c squared is also 24.25, giving m_c = 4.9244.
- Add the median squares: 16 + 24.25 + 24.25 = 64.5.
- Check with the sides: three quarters of (36 + 25 + 25) is 0.75 x 86 = 64.5, so the two values agree.
- Geometric check: half of side a is 3, and 3 squared plus 4 squared equals 25, the square of side b.
- The tool shows medians of 4, 4.9244 and 4.9244, with both square totals at 64.5.
Reference table
| Sides a, b, c | Median to a | Median to b | Median to c |
|---|---|---|---|
| 6, 5, 5 | 4 | 4.9244 | 4.9244 |
| 5, 4, 3 | 2.5 | 3.6056 | 4.272 |
| 13, 14, 15 | 12.9711 | 12.1655 | 11.2361 |
Limits
- Only works for non degenerate triangles. The three side lengths must satisfy the triangle inequality.
- Returns the length of a median, not the point where it cuts the opposite side or the centroid that divides it.
- Assumes a flat Euclidean triangle, so the relation does not hold on a spherical surface.
- Caps each side at 10,000,000 units to keep the squares within a safe numeric range.
Common mistakes
- Entering the side you want to bisect in the b or c slot, which changes which median is reported first.
- Forgetting to halve the side inside the formula, so the median comes out too long.
- Expecting the medians to form a triangle whose sides are the original sides. They do not.
- Reading the sum of median squares as the area of the triangle, which is a different quantity.
- Using sides that fail the triangle inequality, such as 1, 2 and 3, which gives a zero area triangle.
Try it yourself
Quick checks. Answers sit tucked under each question.
What are the three medians of an equilateral triangle of side 6?
Each median squared is (2 x 36 + 2 x 36 minus 36) / 4 = 108 / 4 = 27, so each median is 5.1962.
In a right triangle with sides 5, 4 and 3, how long is the median to side 5?
It is (1/2) times the square root of (2 x 16 + 2 x 9 minus 25) = (1/2) times 5 = 2.5, exactly half the hypotenuse.
For sides 6, 5 and 5, what is the sum of the median squares?
It is 16 + 24.25 + 24.25 = 64.5, which equals three quarters of (36 + 25 + 25).
Questions
What does Apollonius' theorem state?
That the sum of the squares of two sides of a triangle equals twice the square of the median to the third side plus twice the square of half of that third side.
How is this related to Stewart's theorem?
Stewart's theorem covers any cevian. Apollonius' theorem is the case where the cevian lands at the midpoint of the opposite side, which makes the two base pieces equal.
Is the median to the hypotenuse special?
Yes. In a right triangle it has exactly half the length of the hypotenuse, because the midpoint of the hypotenuse is the centre of the circumcircle.
Do the three medians meet at a point?
Yes. They meet at the centroid, which lies two thirds of the way along each median from its vertex.
Why do the median squares add to three quarters of the side squares?
Adding the three Apollonius equations cancels the mixed terms and leaves three times the sum of the median squares equal to three quarters of twice the side squares.
Can I use these lengths in inches?
Yes. The formula only uses ratios of squared lengths, so any single consistent unit works and the numbers come out in that same unit.
Sources
- University of New South Wales, Parabola journal: The Legacy of Pythagoras' Theorem
- University of Kentucky, MA 341 notes: Stewart's theorem and the length of the median
- Archive of Formal Proofs: Stewart's Theorem and Apollonius' Theorem