Area and Perimeter of a Triangle from Three Coordinates

Area and Perimeter of a Triangle from Three Coordinates

Popular AI Skill PRO

Enter Calculation

Formula

A=12|x1(y2−y3)+x2(y3−y1)+x3(y1−y2)|where{x1,y1=Ax,Ayx2,y2=Bx,Byx3,y3=Cx,Cy\begin{gathered} A = \frac{1}{2}\left| x_1(y_2 - y_3) + x_2(y_3 - y_1) + x_3(y_1 - y_2) \right| \\[1.5em] \text{where}\quad \left\{ \begin{aligned} x_1, y_1 &= {{\text{A}_x}},\ {{\text{A}_y}} \\ x_2, y_2 &= {{\text{B}_x}},\ {{\text{B}_y}} \\ x_3, y_3 &= {{\text{C}_x}},\ {{\text{C}_y}} \end{aligned} \right. \end{gathered}
Show calculation steps (1)
  1. Perimeter (Side Lengths)

    P=AB‾+BC‾+CA‾where{AB‾=(x1−x2)2+(y1−y2)2BC‾=(x2−x3)2+(y2−y3)2CA‾=(x3−x1)2+(y3−y1)2\begin{gathered} P = \overline{AB} + \overline{BC} + \overline{CA} \\[1.5em] \text{where}\quad \left\{ \begin{aligned} \overline{AB} &= \sqrt{({x_1} - {x_2})^2 + ({y_1} - {y_2})^2} \\ \overline{BC} &= \sqrt{({x_2} - {x_3})^2 + ({y_2} - {y_3})^2} \\ \overline{CA} &= \sqrt{({x_3} - {x_1})^2 + ({y_3} - {y_1})^2} \end{aligned} \right. \end{gathered}

    P = sum of the three side lengths; each side is the distance between two vertices

Usage stats

Advertisement

Results

Area S
12.5
square units (coordinate units squared)
Perimeter L 17.276936
Side AB 4.123106
Side BC 6.082763
Side CA 7.071068

Report an error on this page

What this calculator does

This tool finds the area and perimeter of a triangle when you know the Cartesian coordinates of its three corners: A(\(x_1\), \(y_1\)), B(\(x_2\), \(y_2\)), and C(\(x_3\), \(y_3\)). The inputs are plain real numbers on the coordinate plane, so they can be negative, zero, integer, or decimal. The results carry the same units as your coordinates: area in square units, perimeter in linear units. If your coordinates are pure numbers, the answers are dimensionless.

Triangle with three labeled vertices plotted on an x-y coordinate plane
A triangle defined by three vertices on the coordinate plane.

How to use it

Enter the x and y value for each of the three points A, B, and C, then read the area and the perimeter. The table also breaks the perimeter into its three sides AB, BC, and CA so you can check individual edge lengths.

The formulas explained

The area comes from the shoelace formula. The signed quantity \((x_1 \cdot y_2 + x_2 \cdot y_3 + x_3 \cdot y_1 - y_1 \cdot x_2 - y_2 \cdot x_3 - y_3 \cdot x_1)\) equals twice the signed area; dividing by 2 and taking the absolute value gives a positive area no matter whether the vertices are listed clockwise or counter-clockwise. The perimeter is simply the sum of the three side lengths, each found with the Pythagorean distance formula between two points.

$$A = \frac{1}{2}\left| x_1(y_2 - y_3) + x_2(y_3 - y_1) + x_3(y_1 - y_2) \right|$$ $$\text{where}\quad \left\{ \begin{aligned} x_1, y_1 &= \text{A}_x,\ \text{A}_y \\ x_2, y_2 &= \text{B}_x,\ \text{B}_y \\ x_3, y_3 &= \text{C}_x,\ \text{C}_y \end{aligned} \right.$$ $$P = \overline{AB} + \overline{BC} + \overline{CA}$$ $$\text{where}\quad \left\{ \begin{aligned} \overline{AB} &= \sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2} \\ \overline{BC} &= \sqrt{(x_2 - x_3)^2 + (y_2 - y_3)^2} \\ \overline{CA} &= \sqrt{(x_3 - x_1)^2 + (y_3 - y_1)^2} \end{aligned} \right.$$
Advertisement
Diagram showing the crossing diagonal pattern of the shoelace formula for a triangle
The shoelace formula multiplies coordinates in a crossing pattern.

Worked example

For A(-2, 3), B(-3, -1), C(3, -2): the cross-product term is \(2 + 6 + 9 + 9 + 3 - 4 = 25\), so \(S = \left|\frac{25}{2}\right| =\) 12.5. The sides are \(AB = \sqrt{17} \approx 4.1231\), \(BC = \sqrt{37} \approx 6.0828\), \(CA = \sqrt{50} \approx 7.0711\), giving a perimeter \(L \approx\) 17.27694.

More Worked Examples

Example 1: A right triangle with A(0, 0), B(4, 0), C(0, 3)

Shoelace terms, with \((x_1,y_1)=(0,0)\), \((x_2,y_2)=(4,0)\), \((x_3,y_3)=(0,3)\):

  1. \(x_1(y_2-y_3) = 0\,(0-3) = 0\)
  2. \(x_2(y_3-y_1) = 4\,(3-0) = 12\)
  3. \(x_3(y_1-y_2) = 0\,(0-0) = 0\)

Sum \(= 0+12+0 = 12\), so $$A = \tfrac{1}{2}\,|12| = 6$$ The area is 6 square units. The sum is positive, so the vertices run counter-clockwise.

Side lengths:

  • \(AB = \sqrt{(4-0)^2+(0-0)^2} = \sqrt{16} = 4\)
  • \(BC = \sqrt{(0-4)^2+(3-0)^2} = \sqrt{16+9} = \sqrt{25} = 5\)
  • \(CA = \sqrt{(0-0)^2+(0-3)^2} = \sqrt{9} = 3\)

Perimeter \(= 4+5+3 = \) 12 units. Check: this is a 3-4-5 right triangle, and the legs give \(\tfrac{1}{2}\cdot 4\cdot 3 = 6\), which matches.

Example 2: Collinear points A(0, 0), B(1, 1), C(3, 3)

  1. \(x_1(y_2-y_3) = 0\,(1-3) = 0\)
  2. \(x_2(y_3-y_1) = 1\,(3-0) = 3\)
  3. \(x_3(y_1-y_2) = 3\,(0-1) = -3\)

Sum \(= 0+3-3 = 0\), so \(A = \tfrac{1}{2}\,|0| = 0\). The points lie on one line (here \(y=x\)), so there is no true triangle.

Distances:

  • \(AB = \sqrt{1^2+1^2} = \sqrt{2} \approx 1.4142\)
  • \(BC = \sqrt{2^2+2^2} = \sqrt{8} = 2\sqrt{2} \approx 2.8284\)
  • \(CA = \sqrt{(-3)^2+(-3)^2} = \sqrt{18} = 3\sqrt{2} \approx 4.2426\)

Perimeter \(= \sqrt{2}+2\sqrt{2}+3\sqrt{2} = 6\sqrt{2} \approx 8.4853\). Because B lies between A and C, \(AB+BC = AC\), so the perimeter equals \(2\cdot AC = 6\sqrt{2}\): the path goes out to C and back.

Advertisement

How to Calculate by Hand

  1. List the vertices in order: \(A(x_1,y_1)\), \(B(x_2,y_2)\), \(C(x_3,y_3)\).
  2. Compute the three cross terms: \(x_1(y_2-y_3)\), \(x_2(y_3-y_1)\), \(x_3(y_1-y_2)\).
  3. Add them to get the shoelace sum \(S\).
  4. Take the absolute value and halve it: \(A = \tfrac{1}{2}|S|\).
  5. For each side, compute the differences, e.g. \(dx = x_2-x_1\) and \(dy = y_2-y_1\) for AB. Do the same for BC (B to C) and CA (C to A).
  6. Square, add and take the square root for each side: \(AB=\sqrt{dx^2+dy^2}\), and likewise for BC and CA.
  7. Add the three sides: \(P = AB+BC+CA\).

Rounding tips

  • Keep the squared distances (\(dx^2+dy^2\)) exact and only take square roots at the end.
  • Do not round intermediate side lengths before summing. Round the final perimeter to the precision you need, usually 2 to 4 decimal places.
  • The area from the shoelace formula is exact for exact inputs. With integer coordinates it is always a multiple of 0.5.

Quick sanity checks

  • Triangle inequality: the sum of the two shorter sides must be greater than the longest side. If it is equal, the points are collinear.
  • The area should be consistent with the sides. A triangle with perimeter \(P\) cannot have a larger area than an equilateral triangle of the same perimeter, \(P^2/(12\sqrt{3})\).
  • Swapping any two vertices should change only the sign of \(S\), not the area.

FAQ

What if the area is zero? A zero area means the three points are collinear (they lie on one straight line), so they do not form a real triangle.

Does the order of the points matter? No. The absolute value in the shoelace formula makes the area independent of whether you list the vertices clockwise or counter-clockwise.

Can I use negative coordinates? Yes. Any real numbers are valid, including negatives and decimals.

Last updated:

Most popular in Geometry

View all Geometry calculators