Logo

MonoCalc

/

Euler Line Calculator

Geometry

Vertex A

X

Y

Vertex B

X

Y

Vertex C

X

Y

Decimal Precision (0–10)

Euler Line Equation

y = -1.0000x + 4.0000

Triangle Centers

Centroid (G)(2.6667, 1.3333)
Orthocenter (H)(2.0000, 2.0000)
Circumcenter (O)(3.0000, 1.0000)
Nine-Point Center (N)(2.5000, 1.5000)
Incenter (I)(2.4076, 1.4880)
Circumradius (R)3.1623

Triangle Type

Scalene Acute

GH : GO Ratio

0.94 : 0.47

Formula Breakdown

Gx = (0 + 6 + 2) / 3 = 2.6667

Gy = (0 + 0 + 4) / 3 = 1.3333

H = 3G − 2O = (2.0000, 2.0000)

Triangle Diagram — G (green), H (red), O (blue), N (purple)

ABCNHOG

About This Tool

Euler Line Calculator – Centroid, Orthocenter & Circumcenter

The Euler line is one of the most elegant results in classical triangle geometry. In 1765, Leonhard Euler proved that three seemingly unrelated triangle centers — the centroid (G), the orthocenter (H), and the circumcenter (O) — always lie on a single straight line, no matter the shape of the triangle (except when it is equilateral). This calculator computes all three centers from your vertex coordinates and derives the line that connects them.

The Three Classical Centers

Given a triangle with vertices A(x₁, y₁), B(x₂, y₂), and C(x₃, y₃):

  • Centroid (G) — the intersection of the three medians, and the average of the vertex coordinates: Gx = (x₁ + x₂ + x₃) / 3, Gy = (y₁ + y₂ + y₃) / 3. It is always inside the triangle.
  • Circumcenter (O) — the intersection of the perpendicular bisectors of the sides, and the center of the circle passing through all three vertices (the circumcircle).
  • Orthocenter (H) — the intersection of the three altitudes (perpendiculars from each vertex to the opposite side).

Computing the Circumcenter

The circumcenter is solved directly from the intersection of two perpendicular bisectors:

D = 2[x₁(y₂ − y₃) + x₂(y₃ − y₁) + x₃(y₁ − y₂)]

Ox = [(x₁²+y₁²)(y₂−y₃) + (x₂²+y₂²)(y₃−y₁) + (x₃²+y₃²)(y₁−y₂)] / D

Oy = [(x₁²+y₁²)(x₃−x₂) + (x₂²+y₂²)(x₁−x₃) + (x₃²+y₃²)(x₂−x₁)] / D

The circumradius is simply the distance from O to any vertex, R = √((Ox − x₁)² + (Oy − y₁)²).

The Euler Relation for the Orthocenter

Rather than intersecting altitudes directly, this calculator uses Euler's elegant shortcut. Since G divides the segment HO in a fixed 2:1 ratio, the orthocenter can be recovered algebraically from the centroid and circumcenter:

H = 3G − 2O

This single relation replaces the need to compute two altitude equations and intersect them, while giving an identical result to full floating-point precision.

The Euler Line and the 2:1 Ratio

Once G, H, and O are known, the Euler line is the line passing through all three points. The calculator derives it in slope-intercept form y = mx + b, falling back to x = constant for a vertical line. A key property of this line is that the centroid always splits segment HO so that GH = 2 × GO — a ratio you can verify directly in the results panel.

The Nine-Point Center

The nine-point center (N) is the midpoint of the orthocenter and circumcenter, N = (O + H) / 2. It is the center of the nine-point circle, which passes through the midpoints of the three sides, the feet of the three altitudes, and the midpoints of the segments from each vertex to the orthocenter. N always lies on the Euler line, exactly halfway between O and H.

Triangle Classification

The calculator also classifies your triangle by its sides (scalene, isosceles, or equilateral) and by its largest angle (acute, right, or obtuse) using the law of cosines on the squared side lengths. This classification explains where the orthocenter falls:

  • Acute triangle — orthocenter lies strictly inside the triangle
  • Right triangle — orthocenter sits exactly at the right-angle vertex
  • Obtuse triangle— orthocenter lies outside the triangle's boundary

The Equilateral Special Case

For an equilateral triangle, every median, altitude, and perpendicular bisector coincides, so the centroid, orthocenter, and circumcenter collapse onto the exact same point. With no two distinct points to define a line, the Euler line is undefined. The calculator detects this automatically (when GH and GO both approach zero) and displays a clear notice instead of a meaningless equation.

Practical Applications

  • Geometry education — the Euler line is a cornerstone topic in triangle geometry courses and olympiad mathematics
  • CAD and computer graphics — triangle centers are used in mesh processing, Delaunay triangulation checks, and shape analysis
  • Surveying and engineering — circumcenters and centroids appear in triangulation-based positioning calculations

Adjustable Decimal Precision

Use the Decimal Precision control (0 to 10 places) to match the level of detail you need. All arithmetic runs on JavaScript's 64-bit double-precision floats, giving roughly 15 significant digits of internal accuracy regardless of the display precision you choose.

Frequently Asked Questions

Is the Euler Line Calculator free?

Yes, Euler Line Calculator is totally free :)

Can I use the Euler Line Calculator offline?

Yes, you can install the webapp as PWA.

Is it safe to use Euler Line Calculator?

Yes, any data related to Euler Line Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

What is the Euler line?

The Euler line is the straight line that passes through a triangle's centroid, orthocenter, and circumcenter. Leonhard Euler proved in 1765 that these three classical triangle centers are always collinear for any non-equilateral triangle.

How does this Euler line calculator work?

Enter the Cartesian coordinates of the three triangle vertices. The calculator computes the centroid using the vertex average, the circumcenter as the intersection of perpendicular bisectors, and the orthocenter via the Euler relation H = 3G − 2O. It then derives the line equation through all three points and plots everything on an SVG diagram.

Why do the centroid, orthocenter, and circumcenter coincide for equilateral triangles?

In an equilateral triangle, every median, altitude, and perpendicular bisector is the same line by symmetry, so all classical triangle centers converge on one point. Because there are no two distinct points to define a line, the Euler line is undefined for equilateral triangles — the calculator detects this and shows a special notice.

What is the 2:1 ratio on the Euler line?

The centroid always divides the segment from the orthocenter to the circumcenter in a 2:1 ratio, measured from the orthocenter side. In other words, GH is twice as long as GO, where G is the centroid, H is the orthocenter, and O is the circumcenter. This calculator verifies the ratio numerically for every input.

Can the orthocenter lie outside the triangle?

Yes. For an obtuse triangle, the orthocenter falls outside the triangle's boundary. For a right triangle, the orthocenter sits exactly at the vertex of the right angle. For an acute triangle, it lies strictly inside. The calculator classifies the triangle type and plots the orthocenter's true position regardless of where it falls.

How accurate are the results?

All calculations use JavaScript's 64-bit floating-point arithmetic (IEEE 754 double precision), giving approximately 15 significant digits of accuracy. You can adjust the displayed decimal precision from 0 to 10 places. Nearly collinear or nearly equilateral inputs are detected using small numerical tolerances to avoid division-by-zero errors.