Median of Triangle Calculator – Find All Three Medians Instantly
A median of a triangle is a line segment connecting a vertex to the midpoint of the opposite side. Every triangle has exactly three medians, and all three always intersect at a single interior point called the centroid (G). This calculator applies Apollonius's theorem to compute all three median lengths simultaneously from just the three side lengths — no angles or coordinates needed.
What Are Triangle Medians?
Given a triangle with vertices A, B, C and opposite sides a, b, c:
- Median mₐ runs from vertex A to the midpoint of side a (segment BC).
- Median m_b runs from vertex B to the midpoint of side b (segment AC).
- Median m_c runs from vertex C to the midpoint of side c (segment AB).
Medians are distinct from altitudes (which are perpendicular to the opposite side) and from angle bisectors (which bisect the vertex angle). In a scalene triangle all three are different line segments; in an equilateral triangle they all coincide.
The Formula: Apollonius's Theorem
The length of each median is given by the median length formula, derived directly from the parallelogram law (also called Apollonius's theorem):
mₐ = ½ × √(2b² + 2c² − a²)m_b = ½ × √(2a² + 2c² − b²)m_c = ½ × √(2a² + 2b² − c²)
These formulas require only the three side lengths a, b, c. The calculator also verifies the triangle inequality(a + b > c, a + c > b, b + c > a) before computing — if the sides do not form a valid triangle, a clear error message is shown.
The Centroid and the 2:1 Ratio
All three medians of any triangle intersect at the centroid G. This point has two important properties:
- 2:1 division rule: The centroid divides each median in a 2:1 ratio measured from the vertex. That means G lies two-thirds of the way from each vertex toward the midpoint of the opposite side. For example, if mₐ = 9 cm, then the distance from vertex A to G is 6 cm, and from G to the midpoint of BC is 3 cm.
- Center of mass: For a uniform triangular plate, the centroid is exactly the balance point — the point at which the plate would balance on a pin. This makes it important in structural and mechanical engineering.
Special Cases
Certain triangle types produce notable median properties:
- Equilateral triangle (a = b = c): All three medians are equal in length: m = (√3 / 2) × a ≈ 0.866a. They also coincide with the altitudes and angle bisectors.
- Isosceles triangle (a = b ≠ c): The two medians from the equal-length sides are equal: mₐ = m_b.
- Right triangle (a² + b² = c²): The median to the hypotenuse equals exactly half the hypotenuse: m_c = c / 2. This is because the midpoint of the hypotenuse is the circumcenter of a right triangle, equidistant from all three vertices.
How to Use the Calculator
- Enter the three side lengths a, b, and c in the input fields. All three must be positive numbers satisfying the triangle inequality.
- Choose a length unit (mm, cm, m, km, in, ft, yd, or mi). All three inputs share the same unit, and the outputs are expressed in the same unit.
- Adjust decimal places (0–10) for the desired precision.
- Results appear instantly: mₐ, m_b, m_c, triangle area, semi-perimeter, and the centroid's distance from each vertex.
- Use the Copy button next to each median to copy the value to your clipboard.
- Expand the Step-by-Step Breakdown panel to see the substituted formula for each median with all intermediate values shown.
- The SVG diagram shows the triangle drawn to scale with all three medians as colored dashed lines and the centroid G labeled.
Practical Applications
Median calculations appear in several real-world contexts:
- Geometry education: High school and university geometry courses cover triangle centers extensively. Ceva's theorem and the properties of concurrent cevians rely on medians as the primary example.
- Structural engineering: Finding the centroid of a triangular cross-section is essential for calculating bending moments and neutral axes. All three medians must be computed to locate G precisely.
- Computer graphics and 3D meshes: Triangular meshes used in 3D modeling require centroid computation for level-of-detail (LOD) algorithms, physics simulations, and collision detection — all based on median lengths and the centroid's position.
- Land surveying and GIS: Triangulated irregular networks (TINs) use triangle centroids to estimate area-weighted averages of elevation or other spatially distributed quantities.
Accuracy and Limitations
All calculations use JavaScript's 64-bit floating-point arithmetic (IEEE 754 double precision), providing approximately 15 significant digits of accuracy. Results are displayed to the chosen decimal precision (0–10 places). The calculator does not support input in degrees or coordinate form — it requires three positive side lengths. For coordinate-based centroid calculations, see the Centroid of Triangle Calculator.