# Where is my triangle’s orthocenter?

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.

- Page: https://www.acalculator.org/math/orthocenter-calculator
- JSON spec: https://www.acalculator.org/math/orthocenter-calculator.json
- Version: 336ba245f3b3

## Default answer

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).

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| ax | A: x | The x-coordinate of vertex A. |
| ay | A: y | The y-coordinate of vertex A. |
| bx | B: x | The x-coordinate of vertex B. |
| by | B: y | The y-coordinate of vertex B. |
| cx | C: x | The x-coordinate of vertex C. |
| cy | C: y | The y-coordinate of vertex C. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| orthocenter | Orthocenter H | Where the three altitudes meet, as exact fractions. |
| hx | H: x | The x-coordinate of the orthocenter, as a decimal. |
| hy | H: y | The y-coordinate of the orthocenter, as a decimal. |
| where | Where H lies | Inside an acute triangle, at the right-angle vertex, or outside an obtuse triangle. |
| altA | Altitude from A | The line through A perpendicular to BC. |
| altB | Altitude from B | The line through B perpendicular to CA. |
| altC | Altitude from C | The line through C perpendicular to AB. |

## 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.

## Assumptions

- 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

1. ax = 0, ay = 0, bx = 4, by = 0, cx = 1, cy = 3 gives orthocenter = (1, 1), where = Inside: an acute triangle, altA = x − y = 0, altB = x + 3y = 4, altC = 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).
2. ax = 0, ay = 0, bx = 4, by = 0, cx = 0, cy = 3 gives orthocenter = (0, 0), where = 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).
3. ax = 0, ay = 0, bx = 6, by = 0, cx = 1, cy = 1 gives orthocenter = (1, 5), hy = 5, where = 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).
4. ax = 0, ay = 0, bx = 5, by = 0, cx = 1, cy = 3 gives orthocenter = (1, 4/3), hy = 1.333333, altA = 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).

## FAQ

### 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.

## Sources

- OpenStax, Algebra and Trigonometry 2e, §2.2 Linear Equations in One Variable (perpendicular lines: the slope of one is the negative reciprocal of the other, m₁ · m₂ = −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 the point where the three, possibly extended, altitudes intersect; it lies inside an acute triangle and at the right-angle vertex of a right triangle). https://en.wikipedia.org/wiki/Altitude_(triangle) (retrieved 2026-10-02)
