Orthocenter Calculator

The orthocenter is the point where the three altitudes of a triangle meet. Type the three corners to get it exactly, with each altitude drawn and the working shown. For A(0, 0), B(6, 0) and C(2, 4), the altitudes y = x and x = 2 cross at H = (2, 2) (see the steps).

Find the orthocenter of a triangle

Type each corner as x, y. The answer updates as you type.

Fractions such as 7/2 and negative numbers work. Paste a whole question like A(0,0), B(6,0), C(2,4) into any field.

Examples:

How to Use This Calculator

  1. Type the three corners

    One corner per field, as x, y. Fractions and negative numbers work, or paste the whole question into one field.

  2. Read the orthocenter

    You get H exactly, where it lands, and the equation, foot and length of each altitude.

  3. Follow the working

    Two altitudes from their slopes, the point where they meet, and a check with the third.

What is the orthocenter?

Drop a line from one corner of a triangle so that it meets the opposite side at a right angle. That line is an altitude, and its length is the height of the triangle measured from that side. Do the same from the other two corners and you have three altitudes. They always cross at a single point, the orthocenter, usually labelled H. British books spell it orthocentre.

The point where an altitude meets the side is called its foot. In an obtuse triangle, two of the feet fall on the side lines carried on past the triangle, so you have to extend those sides to draw them. The calculator draws those extensions as dashed lines.

How to find the orthocenter by hand

You only need two altitudes. They cross at H, and the third altitude goes through the same point, so it makes a good check. For each altitude:

  1. Find the slope of the opposite side: rise over run, (y₂ − y₁) ÷ (x₂ − x₁).
  2. Take the negative reciprocal to get the slope of the altitude. A slope of 2 becomes −1/2, and −3/4 becomes 4/3.
  3. Write the line through the corner with that slope: y − y₁ = m(x − x₁).

Then solve the two line equations together. Set the two right sides equal, solve for x, and put x back into either line to get y.

Example 1: A(0, 0), B(6, 0), C(2, 4)

Side AB lies on the x-axis, so it is horizontal. The altitude from C to AB is therefore vertical, and it passes through C, so it is x = 2 with no algebra needed.

For the altitude from A, look at side BC. Its slope is (4 − 0) ÷ (2 − 6) = 4 ÷ (−4) = −1. The negative reciprocal of −1 is 1, and the line through A(0, 0) with slope 1 is y = x.

Put x = 2 into y = x and you get y = 2, so H = (2, 2). To check, the altitude from B is at right angles to CA, whose slope is 2. Its slope is −1/2, and through B(6, 0) it is y = −(1/2)x + 3. At x = 2 that gives −1 + 3 = 2, which matches.

Show example 1 in the calculator

Example 2: A(−2, 1), B(4, −1), C(1, 5)

None of these sides is level, so both altitudes need the full method.

  • Slope of BC = (5 − (−1)) ÷ (1 − 4) = 6 ÷ (−3) = −2. The altitude from A has slope 1/2, and through A(−2, 1) it is y = (1/2)x + 2.
  • Slope of CA = (1 − 5) ÷ (−2 − 1) = 4/3. The altitude from B has slope −3/4, and through B(4, −1) it is y = −(3/4)x + 2.
  • Set them equal: (1/2)x + 2 = −(3/4)x + 2, so (5/4)x = 0 and x = 0. Then y = 2.

So H = (0, 2). The check: AB has slope −1/3, so the altitude from C has slope 3 and is y = 3x + 2. At x = 0 it gives y = 2, the same point.

Show example 2 in the calculator

When a side is vertical or horizontal

A vertical side has no slope, so the negative reciprocal trick breaks. You do not need it: an altitude to a vertical side is horizontal, y = (the corner's y). An altitude to a horizontal side is vertical, x = (the corner's x). Pick these altitudes first whenever a triangle has one, because they save most of the algebra. The calculator does the same.

More worked triangles

The orthocenter of six example triangles
Corners A, B, C Triangle Orthocenter H Where
(0, 0), (6, 0), (2, 4) Acute (2, 2) Inside
(−2, 1), (4, −1), (1, 5) Acute, no level sides (0, 2) Inside
(2, 2), (6, 2), (4, 6) Acute, isosceles (4, 3) Inside, on the line of symmetry
(0, 0), (6, 0), (2, 5) Acute (2, 8/5) Inside
(0, 0), (4, 0), (0, 3) Right angle at A (0, 0) At corner A
(0, 0), (4, 0), (6, 3) Obtuse at B (123.69°) (6, −4) Outside, beyond B

Corners with whole numbers do not always give a whole-number answer. For A(0, 0), B(6, 0), C(2, 5) the orthocenter is (2, 8/5), which is (2, 1.6). The calculator keeps answers as fractions, so a value like 1/3 is never rounded to 0.3333.

Where the orthocenter lands

The largest angle of the triangle decides where H ends up. That is why the calculator tells you the triangle type next to the answer.

Where the orthocenter lies for each kind of triangle
Triangle Orthocenter Why
Acute (all angles under 90°)InsideEvery foot lands on its side, so the altitudes cross inside
Right (one angle of 90°)At the right-angle cornerThe two legs are altitudes of each other
Obtuse (one angle over 90°)Outside, beyond the obtuse cornerTwo feet land on sides carried on past the triangle
IsoscelesOn the line of symmetryThe altitude to the base is that line
EquilateralAt the centerIt is also the centroid, circumcenter and incenter

The orthocenter of a right triangle

Take A(0, 0), B(4, 0) and C(0, 3). The angle at A is 90°, so side AB is at right angles to side AC. That makes AC the altitude from C and AB the altitude from B. They meet at A, so the orthocenter is A itself, (0, 0). The third altitude, from A to the hypotenuse BC, goes through A too, since it starts there. No algebra is needed: in any right triangle, H is the right-angle corner.

Show the right triangle in the calculator

The orthocenter of an obtuse triangle

Take A(0, 0), B(4, 0) and C(6, 3). The angle at B is about 123.69°. The altitude from C to AB is the vertical line x = 6, and its foot (6, 0) is past B, on AB carried on. The altitude from A is at right angles to BC (slope 3/2), so it is y = −(2/3)x. The two lines meet at H = (6, −4), below the x-axis and well outside the triangle. The method is the same as for an acute triangle; only the drawing changes.

Show the obtuse triangle in the calculator

Orthocenter formula

Each altitude says that the line from a corner to H is at right angles to the opposite side. Two lines are at right angles when the dot product of their directions is zero. Written out for the altitudes from A and from B, that gives two straight-line equations in x and y:

(x − xA)(xC − xB) + (y − yA)(yC − yB) = 0
(x − xB)(xA − xC) + (y − yB)(yA − yC) = 0

Solve them as a pair, by substitution, elimination or Cramer's rule, and you have H. This form never divides by a slope, so vertical sides cause no trouble. It is the same method as the slope steps above, just written without fractions.

If you know the angles rather than only the coordinates, there is a weighted-average formula. Each corner is weighted by the tangent of its angle:

xH = (xA·tan A + xB·tan B + xC·tan C) ÷ (tan A + tan B + tan C)
yH = (yA·tan A + yB·tan B + yC·tan C) ÷ (tan A + tan B + tan C)

It fails for a right triangle, where tan 90° is undefined, but you already know the answer there. A third route goes through the circumcenter O: H = A + B + C − 2O, adding the coordinates one at a time. In example 1, O = (3, 1), so H = (0 + 6 + 2 − 6, 0 + 0 + 4 − 2) = (2, 2).

Orthocenter, centroid, circumcenter and incenter

A triangle has four classic centers. They are easy to mix up, because each one is where three lines meet, and the difference is which three lines.

The four classic triangle centers compared
Center Where these meet Always inside? Good to know
Orthocenter HAltitudesNoInside, at a corner or outside, by triangle type
Centroid GMedians (corner to the middle of the opposite side)YesThe average of the corners; the balance point
Circumcenter OPerpendicular bisectors of the sidesNoCenter of the circle through all three corners
Incenter IAngle bisectorsYesCenter of the circle that touches all three sides

The centroid is the easy one: G = ((xA + xB + xC) ÷ 3, (yA + yB + yC) ÷ 3). The orthocenter and circumcenter both need two line equations. The incenter weights each corner by the length of the side across from it. Switch the drawing above to "Four centers" to see all of them on your own triangle.

The Euler line

In any triangle that is not equilateral, the orthocenter H, the centroid G and the circumcenter O lie on one straight line. Leonhard Euler proved it in the 1760s, and the line carries his name. The centroid always sits two thirds of the way from H to O, so HG is exactly twice GO. In example 1, H = (2, 2), G = (8/3, 4/3) and O = (3, 1), and G − H = (2/3, −2/3) is twice O − G = (1/3, −1/3). The incenter is usually off this line. It sits on it only when the triangle is isosceles.

More orthocenter properties

  • The distance from a corner to H is AH = 2R·|cos A|, where R is the circumradius. In example 1, R = √10 and the angle at B is 45°, so BH = 2√10 · (√2/2) = 2√5, the distance from B(6, 0) to H(2, 2).
  • A, B, C and H form an orthocentric system: each of the four points is the orthocenter of the triangle made by the other three. In example 1, A is the orthocenter of triangle BCH.
  • If you reflect H in any side, the image lands on the circle through A, B and C.
  • The three feet of the altitudes, the three midpoints of the sides and the three midpoints from H to each corner all lie on one circle, the nine-point circle. Its center is halfway between H and O, and its radius is half the circumradius.
  • Joining the three feet gives the orthic triangle. In an acute triangle, H is the incenter of the orthic triangle.

Constructing the orthocenter with a compass

On paper, without coordinates, you can build two altitudes with a compass and a straightedge:

  1. Put the compass point on corner A and draw an arc that cuts side BC (carried on if needed) in two places.
  2. From each of those two points, draw equal arcs on the far side of BC so that they cross.
  3. Draw the line from A through that crossing. It meets BC at right angles: it is the altitude from A.
  4. Repeat from corner B to side CA. Where the two altitudes cross is H.

For an obtuse triangle, extend the two sides next to the obtuse corner first, then build the altitudes to those lines. The construction is a good way to check a coordinate answer, and the calculator's grid drawing gives the same picture to scale.

Frequently Asked Questions

What is the orthocenter of a triangle?

The orthocenter is the point where the three altitudes of a triangle meet. An altitude is the line from a corner that hits the opposite side, or that side carried on, at a right angle. Every triangle has exactly one orthocenter, usually labelled H.

How do you find the orthocenter with coordinates?

Write the equations of two altitudes and solve them together. For each, find the slope of the opposite side, flip it and change its sign to get the perpendicular slope, then use the corner it starts from. For A(0, 0), B(6, 0), C(2, 4) the altitudes y = x and x = 2 meet at H = (2, 2).

Show this triangle

Where is the orthocenter of a right triangle?

It is the corner with the right angle. The two legs are already at right angles to each other, so each leg is the altitude to the other, and they meet at that corner. For A(0, 0), B(4, 0), C(0, 3) the orthocenter is A.

Show the right triangle

Can the orthocenter be outside the triangle?

Yes, in every obtuse triangle. Two of the altitudes then land on sides carried on past the triangle, and they meet outside it, beyond the obtuse corner. For A(0, 0), B(4, 0), C(6, 3), with a 123.69° angle at B, H = (6, −4).

Show the obtuse triangle

What is the formula for the orthocenter?

There is no short formula like the one for the centroid. The usual method is to solve two altitude equations, (x − xA)(xC − xB) + (y − yA)(yC − yB) = 0 and (x − xB)(xA − xC) + (y − yB)(yA − yC) = 0. If you know the angles, H = (xA·tan A + xB·tan B + xC·tan C) ÷ (tan A + tan B + tan C), and the same for y.

What is the difference between the orthocenter, centroid and circumcenter?

They come from different lines. The orthocenter is where the altitudes meet, the centroid is where the medians meet, and the circumcenter is where the perpendicular bisectors of the sides meet. All three lie on one line, the Euler line, and they are the same point only in an equilateral triangle.