Skip to content
Omnikalc

Stewart's theorem calculator: the length of a line from a vertex to the opposite side

Enter two sides of a triangle and the two segments of the third side to get the cevian length, the median, the angle bisector, the altitude and the area.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Results

Length of the cevian AD

6.648 in

Side a = m + n
10.000 in
Median from A
6.325 in
Angle bisector from A
6.196 in
Altitude from A
6.119 in
Area of the triangle
30.594 in²

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.

The triangle solver calculator finds angles and sides from the three sides, and the triangle centers calculator locates the centroid, the incenter and others.

Frequently asked questions

What is a cevian?

A cevian is a line segment that joins a vertex of a triangle to a point on the opposite side. Medians, angle bisectors and altitudes are all special cevians. Stewart's theorem gives the length of any cevian from the two other sides and the way the opposite side is cut.

What does Stewart's theorem say?

If a cevian of length d from vertex A meets the side BC at D, with BD = m and DC = n, then b² × m + c² × n = a × (d² + m × n), where a = m + n. It is a generalization of the Pythagorean theorem and of the law of cosines, because it ties four lengths together.

How do I get the median or the bisector?

For the median, the point D is the midpoint, so m and n are equal and the formula reduces to a form with a, b and c only. For the bisector, D divides the side in the ratio of the other two sides, c to b. The calculator gives both from the three sides of the triangle.

Do the numbers have to form a triangle?

Yes. The sides b, c and a = m + n must satisfy the triangle inequality. When they do not, the area and the altitude are shown as zero, because no triangle with those sides exists.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.