Where is my triangle’s orthocenter?
Type the x and y coordinates of the triangle's three vertices A, B and C. The orthocenter calculator finds the point H where the three altitudes meet, as exact fractions, gives the equation of each altitude, and tells you whether H lies inside, on or outside the triangle.
- Orthocenter H
- (1, 1)
The orthocenter of the triangle is H = (1, 1).
- H: x
- 1
- H: y
- 1
- Where H lies
- Inside: an acute triangle
- Altitude from A
- x − y = 0
- Altitude from B
- x + 3y = 4
- Altitude from C
- x = 1
Orthocenter H: (1, 1). The orthocenter of the triangle is H = (1, 1).
The triangle and its orthocenter
How to calculate
Finds the orthocenter of a triangle from the coordinates of its three vertices: the point where the three altitudes meet, as exact fractions, with the altitude equations and whether it lies inside, on or outside the triangle.
Example with the default inputs (A: x 0, A: y 0, B: x 4, B: y 0, C: x 1, C: y 3): The orthocenter of the triangle is H = (1, 1).
Method: Altitude from A: (C − B)·(P − A) = 0; altitude from B: (C − A)·(P − B) = 0. Solving the two for P gives the orthocenter H.
- Coordinates are read as the exact decimals typed, so H is an exact fraction.
- The three points must not lie on one line.
Worked examples
Each example is checked against the calculator on every build.
- A: x 0, A: y 0, B: x 4, B: y 0, C: x 1, C: y 3 gives Orthocenter H (1, 1), Where H lies Inside: an acute triangle, Altitude from A x − y = 0, Altitude from B x + 3y = 4, Altitude from C x = 1.Source: OpenStax, Algebra and Trigonometry 2e, §2.2 Linear Equations in One Variable (perpendicular lines: the product of the slopes is −1; writing the equation of a line perpendicular to a given line through a point), https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-2-linear-equations-in-one-variable (retrieved 2026-10-02); Altitude (triangle), Wikipedia (the orthocenter is where the three altitudes intersect; inside an acute triangle, at the right-angle vertex of a right triangle), https://en.wikipedia.org/wiki/Altitude_(triangle) (retrieved 2026-10-02)
- A: x 0, A: y 0, B: x 4, B: y 0, C: x 0, C: y 3 gives Orthocenter H (0, 0), Where H lies On vertex A: a right triangle, right angle at A.Source: Altitude (triangle), Wikipedia (the orthocenter is where the three altitudes intersect; inside an acute triangle, at the right-angle vertex of a right triangle), https://en.wikipedia.org/wiki/Altitude_(triangle) (retrieved 2026-10-02)
- A: x 0, A: y 0, B: x 6, B: y 0, C: x 1, C: y 1 gives Orthocenter H (1, 5), H: y 5, Where H lies Outside: an obtuse triangle, obtuse angle at C.Source: OpenStax, Algebra and Trigonometry 2e, §2.2 Linear Equations in One Variable (perpendicular lines: the product of the slopes is −1; writing the equation of a line perpendicular to a given line through a point), https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-2-linear-equations-in-one-variable (retrieved 2026-10-02)
- A: x 0, A: y 0, B: x 5, B: y 0, C: x 1, C: y 3 gives Orthocenter H (1, 4/3), H: y 1.333333, Altitude from A 4x − 3y = 0.Source: OpenStax, Algebra and Trigonometry 2e, §2.2 Linear Equations in One Variable (perpendicular lines: the product of the slopes is −1; writing the equation of a line perpendicular to a given line through a point), https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-2-linear-equations-in-one-variable (retrieved 2026-10-02)
How it works
For vertices A = (a₁, a₂), B = (b₁, b₂), C = (c₁, c₂):
- The altitude from A is the line through A perpendicular to BC: every point P on it has (C − B)·(P − A) = 0, that is (c₁ − b₁)x + (c₂ − b₂)y = (c₁ − b₁)a₁ + (c₂ − b₂)a₂. This is the slope rule: the altitude's slope times BC's slope is −1.
- The altitude from B: (c₁ − a₁)x + (c₂ − a₂)y = (c₁ − a₁)b₁ + (c₂ − a₂)b₂.
- The altitude from C: (b₁ − a₁)x + (b₂ − a₂)y = (b₁ − a₁)c₁ + (b₂ − a₂)c₂.
The orthocenter H solves the first two together (Cramer's rule). With u = C − B, v = C − A, r = u·A and s = v·B, and D = u₁v₂ − u₂v₁:
- H = ((r v₂ − u₂ s) ÷ D, (u₁ s − r v₁) ÷ D)
D is 0 exactly when the three points are on one line: then there is no triangle and no answer.
Where H lies comes from the dot products at each vertex, such as (B − A)·(C − A) at A. If one is 0, the angle there is right and H is that vertex. If one is negative, the angle is obtuse and H is outside. Otherwise all angles are acute and H is inside.
Rules
- Each coordinate is from −10⁹ to 10⁹, read as the exact decimal typed. H and the altitude equations are exact fractions.
- If H is beyond about 1.8 × 10³⁰⁸ (an almost flat triangle), there is no answer.
Output format. H shows as (x, y) with each coordinate a fraction in lowest terms (4/3) or a whole number, with a true minus sign; a fraction longer than 30 characters shows instead as a decimal with 10 significant digits. H also shows as two decimals with 10 significant digits. Each altitude is written ax + by = c with whole numbers in lowest terms, the first nonzero coefficient positive, a coefficient of 1 not written and a zero term left out (x − y = 0, x + 3y = 4, x = 1). "Where H lies" reads "Inside: an acute triangle", "On vertex A: a right triangle, right angle at A" or "Outside: an obtuse triangle, obtuse angle at C" (vertices checked in the order A, B, C).
Worked examples by hand
A(0, 0), B(4, 0), C(1, 3). AB is horizontal, so the altitude from C is x = 1. BC runs from (4, 0) to (1, 3): slope −1, so the altitude from A has slope 1: x − y = 0. The altitude from B is perpendicular to AC (slope 3): slope −1/3 through (4, 0), x + 3y = 4. H = (1, 1), inside: an acute triangle.
A(0, 0), B(4, 0), C(0, 3). The angle at A is right (AB·AC = 0), so H = A = (0, 0).
A(0, 0), B(6, 0), C(1, 1). Altitude from C: x = 1. BC has slope 1 ÷ (−5), so the altitude from A has slope 5: y = 5x. H = (1, 5), outside: CA·CB = (−1)(5) + (−1)(−1) = −4 < 0, an obtuse angle at C.
A(0, 0), B(5, 0), C(1, 3). Altitude from C: x = 1. BC has slope 3 ÷ (−4), so the altitude from A has slope 4/3: 4x − 3y = 0. H = (1, 4/3).
Other questions people ask
What is the orthocenter of a triangle?
The point where the triangle's three altitudes meet. An altitude is the line through a vertex perpendicular to the opposite side (extended if needed). Any two altitudes are enough to find it; the third passes through the same point.
How do I find the orthocenter from coordinates?
Write two altitudes and solve them together. For A(0, 0), B(4, 0), C(1, 3): AB is flat, so the altitude from C is x = 1. BC has slope −1, so the altitude from A has slope 1: y = x. They meet at H = (1, 1).
Where is the orthocenter of a right triangle?
At the vertex with the right angle. The two legs are themselves altitudes, and they meet at that vertex. For A(0, 0), B(4, 0), C(0, 3), H is A = (0, 0).
Can the orthocenter be outside the triangle?
Yes, in an obtuse triangle. For A(0, 0), B(6, 0), C(1, 1) the angle at C is obtuse, and the altitudes x = 1 and y = 5x meet at (1, 5), above the triangle.
How do I get the slope of an altitude?
Perpendicular slopes multiply to −1. If the opposite side has slope m, the altitude has slope −1 ÷ m. A vertical side gives a horizontal altitude, and a horizontal side a vertical one.
Why do I get no answer?
The three points lie on one straight line, or two of them are the same, so they do not make a triangle and there are no altitudes to meet.