Centroid Calculator

Calculate the centroid coordinates x̄ and ȳ for composite areas, holes, cutouts, and ordered polygon vertices.

Calculator is for informational purposes only. Terms and Conditions

\[ \bar{x}=\frac{\sum A_i x_i}{\sum A_i},\qquad \bar{y}=\frac{\sum A_i y_i}{\sum A_i} \]
1

Choose the centroid method

Use composite area mode for engineering sections or polygon mode for ordered coordinate vertices.

Composite mode uses area-weighted centroids. Polygon mode uses the shoelace centroid method.
All coordinates use this length unit. Composite areas use the matching square unit.
Composite mode: enter each part area and its centroid location from the same origin. Mark holes as cutouts.
2

Enter the known values

Keep every coordinate measured from the same reference origin.

Load example:

Composite area parts

Use positive solid areas and mark holes or cutouts with the type dropdown. The visual plots part centroid locations and the final centroid.

Part Type Area in² xᵢ in yᵢ in Remove
Advanced Options
3

Visual Check

The diagram plots the reference axes, entered geometry, and calculated centroid marker.

Centroid calculator visual diagram A live centroid diagram showing axes, entered geometry, and the calculated centroid point.
4

Solution

Live centroid result, quick checks, warnings, and calculation steps.

Centroid (x̄, ȳ)
Real-time result updates as you type.

Quick checks

  • Check
Show solution steps See the equation, substitutions, assumptions, and result path
  1. Enter values to see the full solution steps and checks.
5

Source, Standards, and Assumptions

Calculation basis, constants, assumptions, and limitations.

Standard engineering geometry method

Source/standard information updates based on the selected centroid method.

  • Assumptions will appear after a valid calculation.

Calculator guide

How the Centroid Calculator Works

The Centroid Calculator above finds the geometric center coordinates \( \bar{x} \) and \( \bar{y} \) for composite areas, holes, cutouts, and irregular polygons defined by ordered vertices.

The calculator supports two practical workflows. Composite area mode uses the area and centroid location of each simple part. Polygon mode uses ordered \(x,y\) coordinates around a closed boundary. In both cases, the final result is measured from the coordinate origin used for the inputs.

Best for
Composite sections, plates with holes, cutouts, built-up shapes, and irregular polygons
Main result
Centroid coordinates \( \bar{x} \) and \( \bar{y} \)
Most important rule
Measure every part centroid and polygon coordinate from one consistent origin

How to Calculate a Centroid

Choose the method that matches the geometry you already have, then verify the coordinate system before entering values.

  1. Choose composite area or polygon mode

    Use composite mode when the shape can be divided into rectangles, triangles, circles, or other parts with known areas and centroid locations. Use polygon mode when the boundary is defined by ordered coordinate vertices.

  2. Establish one reference origin

    Every \(x_i\), \(y_i\), and polygon vertex must use the same coordinate system. A convenient lower-left corner or centerline often simplifies the arithmetic.

  3. Enter solids and holes correctly

    In composite mode, enter the physical area magnitude and use the part type to identify holes or cutouts so their contribution is subtracted.

  4. Enter polygon vertices in perimeter order

    Use clockwise or counterclockwise boundary order. Do not sort points by x-coordinate or y-coordinate.

  5. Use symmetry and the live visual as a check

    The live calculator plots the entered geometry and centroid marker. For a symmetric shape, the centroid should lie on every applicable axis of symmetry.

Centroid Inputs and Outputs

The live calculator provides composite-area and polygon methods, example loaders, selectable length units, answer units, precision controls, a visual geometry check, warnings, and step-by-step calculations.

Inputs and outputs used by the centroid calculator
Quantity Meaning Units or Format
Part area \(A_i\) Area of each solid piece or cutout in composite mode Matching square length unit
Part centroid \(x_i,y_i\) Centroid coordinates of each simple part from the shared origin Length
Part type Identifies a contribution as solid material or a hole/cutout Solid or hole
Polygon vertices Ordered coordinate pairs describing a simple polygon boundary One \(x,y\) pair per line
Centroid \( \bar{x},\bar{y} \) Geometric center of the complete entered area Length
Total signed area Net area after solid and removed regions are combined Square length unit

Centroid Formulas

Composite-area centroid is an area-weighted average. Polygon centroid uses the signed area generated by adjacent ordered vertices.

Composite area centroid

\[ \bar{x}=\frac{\sum A_i x_i}{\sum A_i}, \qquad \bar{y}=\frac{\sum A_i y_i}{\sum A_i} \]

Multiply each signed area by its centroid coordinate, sum the first moments, then divide by total signed area.

Polygon signed area

\[ A=\frac{1}{2}\sum_{i=1}^{n} \left(x_i y_{i+1}-x_{i+1}y_i\right) \]

The final vertex connects back to the first vertex, so \(x_{n+1}=x_1\) and \(y_{n+1}=y_1\).

Polygon centroid coordinates

\[ \bar{x}= \frac{1}{6A} \sum_{i=1}^{n} (x_i+x_{i+1}) (x_i y_{i+1}-x_{i+1}y_i) \] \[ \bar{y}= \frac{1}{6A} \sum_{i=1}^{n} (y_i+y_{i+1}) (x_i y_{i+1}-x_{i+1}y_i) \]

These equations apply to a simple non-self-intersecting polygon whose vertices are entered in boundary order.

Triangle centroid from three vertices

\[ \bar{x}=\frac{x_1+x_2+x_3}{3}, \qquad \bar{y}=\frac{y_1+y_2+y_3}{3} \]

For a right triangle with the right-angle corner at the origin and legs along the axes, the centroid is at \(b/3,\ h/3\).

Worked Example: Rectangle With a Hole

A 10 in × 6 in rectangular plate has a circular hole of radius 2 in centered at \(x=7\) in, \(y=3\) in. Find the centroid of the remaining area from the rectangle’s lower-left corner.

Given values

Rectangle area
\(A_1=60\ \mathrm{in^2}\)
Rectangle centroid
\((x_1,y_1)=(5,3)\ \mathrm{in}\)
Hole area
\(A_2=-\pi(2)^2=-12.566\ \mathrm{in^2}\)
Hole centroid
\((x_2,y_2)=(7,3)\ \mathrm{in}\)

Total signed area

\[ \sum A_i=60-12.566=47.434\ \mathrm{in^2} \]

First moment for \( \bar{x} \)

\[ \sum A_i x_i =60(5)-12.566(7) \approx212.035\ \mathrm{in^3} \]

First moment for \( \bar{y} \)

\[ \sum A_i y_i =60(3)-12.566(3) \approx142.301\ \mathrm{in^3} \]

Centroid coordinates

\[ \bar{x}\approx\frac{212.035}{47.434}=4.47\ \mathrm{in}, \qquad \bar{y}=3.00\ \mathrm{in} \]

Result

\( (\bar{x},\bar{y})\approx(4.47,\ 3.00)\ \mathrm{in} \)

The hole is to the right of the rectangle center, so removing that area shifts the centroid left from \(x=5\) in. The geometry remains symmetric about \(y=3\) in, so \( \bar{y}=3\) in.

Polygon Centroid From Coordinates

Polygon mode is useful when a 2D boundary is already known from surveying, CAD, coordinate geometry, or an irregular outline. The key requirement is correct vertex order.

Use clockwise or counterclockwise order

Either direction works when used consistently. Reversing direction changes the sign of the intermediate signed area but not the physical centroid after the formula is applied consistently.

Do not sort by x or y

The equations pair each point with the next point along the boundary. Random sorting can create crossing edges and a meaningless signed-area result.

Avoid duplicate consecutive vertices

Repeated points add unnecessary zero-length edges and can hide data-entry errors.

Self-intersecting polygons need different treatment

The standard formula cited here is for a simple non-self-intersecting polygon. A bow-tie or crossing boundary should be corrected or decomposed first.

Centroids of Common Shapes

Known simple-shape centroids are useful both for building composite sections and for checking whether a result is plausible.

Common area centroid reference values
Shape Area Centroid Location
Rectangle \(A=bh\) \(b/2,\ h/2\) from a corner
Right triangle \(A=bh/2\) \(b/3,\ h/3\) from the right-angle corner
Circle \(A=\pi r^2\) At the circle center
Semicircle \(A=\pi r^2/2\) \(4r/(3\pi)\) from the diameter along the symmetry axis
Quarter circle \(A=\pi r^2/4\) \(4r/(3\pi)\) from each straight edge

When a composite section has a line of symmetry, use that fact before doing arithmetic. The centroid must lie on that symmetry line, which can eliminate one coordinate calculation or immediately reveal an input error.

Holes, Cutouts, and Signed Areas

A hole is handled by subtracting its area and its first moment contributions from the solid shape. This is the same composite-parts method used in engineering statics.

Signed-area representation

\[ A_{\mathrm{net}} = \sum A_{\mathrm{solid}} – \sum A_{\mathrm{hole}} \]

In the centroid numerator, each removed area also subtracts its \(A_i x_i\) and \(A_i y_i\) contribution.

Centered hole

A hole centered on an existing symmetry axis does not move the centroid off that axis, although it can move the centroid along the other coordinate direction.

Off-center hole

Removing area on one side shifts the centroid away from the hole because material has been removed from that side of the weighted average.

How to Interpret the Result

The centroid coordinates identify a geometric location relative to the selected origin. The same physical centroid will have different coordinate values if the origin changes.

Symmetry is the fastest check

If the shape is symmetric about an axis, the centroid must lie on that axis.

Large distant areas have more leverage

An area farther from the reference axis produces a larger first moment \(A_i x_i\) or \(A_i y_i\), so it pulls the weighted centroid more strongly.

The centroid can lie outside the material

For concave shapes, open geometries, or shapes with large cutouts, the geometric centroid does not have to fall within the remaining material.

Units, Origins, and Input Checks

Centroid formulas are simple enough that setup errors usually dominate numerical error. Check the coordinate system and dimensions before checking the arithmetic.

Use one origin

Do not mix local part coordinates with global section coordinates. Convert every part centroid to the same global reference before entering it.

Match area and coordinate units

If coordinates are in inches, direct composite area entries should be in square inches unless the calculator explicitly converts them as part of the selected unit system.

Remember the dimensional result

\((\mathrm{length}^2)(\mathrm{length})/\mathrm{length}^2=\mathrm{length}\), so centroid coordinates always have length units.

Check negative coordinates deliberately

Negative \(x_i\) or \(y_i\) values are valid when parts lie on the negative side of the chosen axis. Do not change a coordinate sign merely because the part area is a hole.

Verify total signed area

Net area should match the physical remaining area. A negative or unexpected total often means a solid/hole classification error.

Use the calculator examples as QA cases

The live tool provides rectangle-with-hole, T-section, L-section, triangle, and irregular-polygon example loaders that can help confirm the selected workflow.

Centroid vs Center of Mass

A centroid is weighted by geometry. Center of mass is weighted by mass. They coincide only when the material distribution makes the geometric and mass weighting equivalent.

Centroid

The geometric center of an area, line, or volume. For the 2D calculator on this page, the weighting quantity is area.

Center of mass

The mass-weighted average position. Nonuniform density, thickness, or attached masses can move it away from the area centroid.

For a flat plate of uniform thickness and density, the area centroid and center of mass coincide. In a uniform gravitational field, the center of gravity also coincides with center of mass.

Common Centroid Mistakes

Most incorrect results can be traced to one of six setup errors.

Mixing local and global coordinates

Part centroid coordinates must all be measured from the same reference axes used for the final result.

Forgetting to subtract a hole

A cutout removes both area and first moment. It cannot be treated as a positive solid area.

Changing coordinate signs for a hole

The area sign and coordinate sign represent different concepts. A hole at positive \(x\) still has a positive \(x_i\); its negative contribution comes from the signed area.

Entering polygon points out of order

Random point order can create crossing edges and an incorrect signed-area calculation.

Assuming the centroid must lie inside the material

That expectation fails for some concave or cutout geometries.

Using centroid as a complete structural answer

Centroid location alone does not calculate stiffness, strength, stress, deflection, or buckling capacity.

Assumptions and Engineering Limits

The calculator determines 2D geometric centroid location from idealized inputs. It does not automatically account for manufacturing detail or broader structural behavior.

Idealized geometry

Fillets, chamfers, corner radii, weld metal, holes, slots, and manufacturing tolerances only affect the result if they are represented in the entered geometry.

Area weighting, not density weighting

Composite centroid mode assumes a geometric area problem. Nonuniform density or thickness requires a center-of-mass formulation instead.

Simple polygon assumption

Polygon mode is intended for a closed, non-self-intersecting boundary entered in perimeter order.

No 3D centroid calculation

This page calculates planar area centroids. Volumetric centroids require volume weighting and three coordinates.

No section-property completion

The calculator does not by itself return area moment of inertia, product of inertia, principal axes, section modulus, or radius of gyration.

No design-code verification

Structural or mechanical design still requires the applicable material, loading, serviceability, stability, and safety checks.

Related Engineering Calculators

Centroid location is commonly the starting point for the next set of section-property and beam calculations.

Sources and Calculation Basis

The composite-area method, negative-area convention, symmetry checks, and polygon equations were checked against established engineering-statics and geometry references.

The rectangle-with-hole example was independently recalculated from exact \( \pi r^2 \) area. The centroid is \( \bar{x}\approx4.472\ \mathrm{in} \), \( \bar{y}=3.000\ \mathrm{in} \), consistent with symmetry and the expected shift away from the right-side cutout.

Centroid Calculator FAQ

These questions address the most common centroid setup and interpretation problems.

What does a centroid calculator find?

It finds the geometric center coordinates of an area or planar shape. This calculator reports \( \bar{x} \) and \( \bar{y} \) for composite areas and ordered polygons.

What is the centroid formula for a composite area?

Use \( \bar{x}=\sum A_i x_i/\sum A_i \) and \( \bar{y}=\sum A_i y_i/\sum A_i \), with holes represented by negative signed area.

Are holes negative in centroid calculations?

Yes. A hole or cutout removes area, so its area and first-moment contribution are subtracted in the composite-area method.

Can a centroid be outside the shape?

Yes. Some concave shapes, open shapes, and shapes with large cutouts have geometric centroids that lie outside the remaining material.

Why does the coordinate origin matter?

The physical centroid does not change, but its numerical coordinates depend on the selected origin. Every part coordinate must therefore use the same reference axes.

How do I calculate the centroid of a polygon from vertices?

Enter the vertices in clockwise or counterclockwise perimeter order. The calculator uses the polygon signed-area formula and the corresponding weighted vertex sums to calculate \( \bar{x} \) and \( \bar{y} \).

Is centroid the same as center of mass?

Only when the material distribution makes geometric area weighting equivalent to mass weighting—for example, a flat plate with uniform density and thickness. Otherwise, center of mass can differ from the centroid.

What should I calculate after finding the centroid of a beam section?

A common next step is area moment of inertia about the centroidal axes, followed by section modulus, bending stress, or beam-deflection calculations as required by the engineering problem.

Scroll to Top