How to use it
- Enter the coordinates of vertex A (x and y), then B and C. Decimals and negative values are fine.
- Read the coordinates of each center and the radii. If the points are on one line there is no triangle, and you will see a message instead.
Formulas
With vertices (x₁, y₁), (x₂, y₂), (x₃, y₃) and side lengths a = |BC|, b = |CA|, c = |AB|:
- Centroid: G = ((x₁ + x₂ + x₃)/3, (y₁ + y₂ + y₃)/3)
- Circumcenter: with D = 2(x₁(y₂ − y₃) + x₂(y₃ − y₁) + x₃(y₁ − y₂)), Oₓ = Σ(xᵢ² + yᵢ²)(yⱼ − yₖ)/D and O_y = Σ(xᵢ² + yᵢ²)(xₖ − xⱼ)/D; R = |OA|
- Incenter: I = (a·A + b·B + c·C)/(a + b + c); r = area / semiperimeter
- Orthocenter: H = A + B + C − 2O (Euler line)
- Area: |D| / 4, the shoelace formula
Worked example
Take A(0, 0), B(6, 0), C(2, 4). The centroid is (8/3, 4/3) = (2.6667, 1.3333). The circumcenter lies on x = 3 (the bisector of AB); setting |OA| = |OC| gives 9 + y² = 1 + (y − 4)², so y = 1 and O = (3, 1) with R = √10 = 3.1623. The orthocenter is 3G − 2O = (8 − 6, 4 − 2) = (2, 2).
The sides are a = √32 = 5.6569, b = √20 = 4.4721 and c = 6, perimeter 16.129. The incenter is ((4.4721 × 6 + 6 × 2)/16.129, 6 × 4/16.129) = (2.4076, 1.488), and with area 12 the inradius is 24/16.129 = 1.488.
Tips
- Equilateral triangle: all four centers coincide.
- Obtuse triangle: the circumcenter and orthocenter fall outside the triangle; the centroid and incenter are always inside.
- Circle through three points: the circumcenter and R here are the same as the circle through A, B and C.