A line from a corner of a triangle to the opposite side has a length that depends on where it lands. Stewart’s theorem finds that length from the sides. This Stewart’s theorem calculator takes the two sides next to the vertex and the two segments of the opposite side to give the cevian length, the third side, the median, the angle bisector, the altitude and the area of the triangle.
How the calculation works
- Stewart’s theorem: b² × m + c² × n = a × (d² + m × n), where a = m + n is the side cut by the point D and d is the length of the cevian AD.
- Cevian length d = √((b² × m + c² × n) ÷ a − m × n).
- Median (m = n = a ÷ 2) = √((2b² + 2c² − a²) ÷ 4), and angle bisector = √(b × c × (1 − (a ÷ (b + c))²)).
- Altitude from A = 2 × area ÷ a, with the area found from Heron’s formula using the sides a, b and c.
Example
A triangle has sides b = 7, c = 9, and the point D cuts the third side into m = 4 and n = 6, so a = 10. The cevian is √((49 × 4 + 81 × 6) ÷ 10 − 4 × 6) = √(68.2 − 24) = 6.648. The median is √((98 + 162 − 100) ÷ 4) = 6.325, the angle bisector is 6.196, and the area from Heron’s formula is √(13 × 3 × 6 × 4) = 30.59, so the altitude from A is 6.119.
Why it matters
Students use the theorem in geometry problems about triangle centers, and surveyors and engineers use it to find the length of a brace or a cable from a corner to a point on the opposite side. Seeing the cevian next to the median, bisector and altitude shows how the length changes with the landing point.
Good to know
The point D must lie on the side between the two vertices, so m and n are positive lengths. All lengths use the same unit, and the area is in the square of that unit. The calculator assumes a flat triangle, and measurement errors in the sides are amplified when the triangle is almost degenerate, with one side close to the sum of the other two.
Related tools
The triangle solver calculator finds angles and sides from the three sides, and the triangle centers calculator locates the centroid, the incenter and others.