Centroid Calculator
Calculate the centroid of composite shapes (rectangles and circles)
This free online centroid calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Supports both metric (SI) and imperial units with built-in unit selection dropdowns on every input field, so you can work in whatever units your problem provides. Designed for engineering students and professionals working through coursework, design projects, or quick reference calculations.
Centroid Calculator
Calculate the centroid of composite shapes. X, Y is bottom-left corner for rectangles, center for circles.
Formula
How to Use This Calculator
Enter your input values
Fill in all required input fields for the Centroid Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.
Review your inputs
Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.
Read the results
The Centroid Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.
Explore parameter sensitivity
Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.
Formula Reference
Centroid Calculator Formula
See calculator inputs for the governing equation
Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.
When to Use This Calculator
- •Use the Centroid Calculator when solving homework or exam problems that require quick numerical verification of your hand calculations — instant feedback helps identify arithmetic errors before they propagate.
- •Use it during the early design phase to rapidly iterate on parameters and narrow down feasible configurations before committing time to detailed finite element simulations or full design packages.
- •Use it when reviewing a colleague's calculation or checking a vendor's data sheet for plausibility — a quick sanity check can prevent costly downstream errors.
- •Use it to generate reference data for a technical report or presentation without manual computation, ensuring consistent, reproducible numbers throughout the document.
- •Use it in the field when a quick estimate is needed and a full engineering software package is not available.
About This Calculator
The Centroid Calculator is a precision engineering calculation tool designed for students, engineers, and technical professionals. Calculate the centroid of composite shapes (rectangles and circles) All calculations are performed using established engineering formulas from the relevant scientific literature and standards. Inputs support both metric (SI) and imperial unit systems, with unit conversion handled automatically — simply select your preferred unit from the dropdown next to each field. Results are computed instantly in the browser without sending data to a server, ensuring both speed and privacy. This calculator is intended as a supplementary tool for learning and design exploration; always verify results against authoritative references for safety-critical applications.
The Theory Behind It
The centroid of a plane area is the geometric center — the average position of all points in the area — and is the point where the area's first moment about any axis is zero. For a composite shape built from simpler sub-shapes (rectangles, triangles, circles, semicircles), the centroid is found by the weighted-average formula x̄ = Σ(Aᵢ·x̄ᵢ)/ΣAᵢ and ȳ = Σ(Aᵢ·ȳᵢ)/ΣAᵢ, where Aᵢ is the area of each sub-shape and (x̄ᵢ, ȳᵢ) is its individual centroid location. This 'method of composite areas' works because the first moment of the whole equals the sum of the first moments of the parts, regardless of how the parts overlap or combine. For a shape with a hole or cutout, the cutout is treated as a negative area subtracted from the main shape. The centroid is distinct from the 'center of mass' (which is the mass-weighted average, identical to the centroid only for uniform-density bodies) and from the 'center of gravity' (which is the centroid location where gravity acts on the weight distribution). For uniform-density plates in uniform gravity fields, all three coincide. The centroid is essential in mechanics of materials for computing bending stresses (which reference the neutral axis, passing through the centroid), for section-modulus calculations, and for the parallel-axis theorem that relates moments of inertia about different axes. Architects and civil engineers use centroid calculations for stability analysis of buildings, dams, and retaining walls — the structure is stable if the line of gravity from the center of mass falls within the base footprint.
Real-World Applications
- •Cross-section analysis for beams: find the centroid of an I-beam, T-section, or channel cross-section as the first step in computing the moment of inertia about the neutral axis. The bending stress formula σ = My/I requires y measured from the centroid.
- •Composite shape geometry: architectural and structural drawings often show complex cross-sections built from rectangles and circles. The centroid calculation provides the reference point for stress, strain, and deflection analysis of the section.
- •Stability of retaining walls and dams: a gravity retaining wall is stable against overturning only if the line of action of its weight falls within the base width. The centroid of the wall cross-section locates the line of weight action.
- •Load balancing in lifting and transport: to lift or move a large object with a single crane hook or forklift, the hook must be placed directly above the centroid to keep the object level. Computing the centroid of an irregular load enables safe, balanced lifting.
- •Aircraft and vehicle center-of-gravity analysis: the longitudinal and lateral CG must fall within a specified envelope for stable flight or safe driving. Centroid calculations for loaded aircraft (passengers, cargo, fuel) verify the CG is within limits.
Frequently Asked Questions
What's the formula for the centroid of a composite area?
x̄ = Σ(Aᵢ·x̄ᵢ) / ΣAᵢ and ȳ = Σ(Aᵢ·ȳᵢ) / ΣAᵢ, where the sum is over all sub-shapes. Each sub-shape contributes its area times its own centroid location. For a shape with a cutout, treat the cutout as a negative area subtracted from the main shape. The reference axes can be anywhere convenient — just be consistent. Most textbook problems choose the axes so the left and bottom edges of the bounding box are at x=0 and y=0.
How do I find the centroid of a triangle?
A triangle's centroid is at the intersection of its three medians, which is 1/3 of the way from each side toward the opposite vertex. In coordinates, if the vertices are at (x₁,y₁), (x₂,y₂), (x₃,y₃), the centroid is at ((x₁+x₂+x₃)/3, (y₁+y₂+y₃)/3) — the simple average of the three vertex coordinates. This result is derived from integration and applies to ANY triangle regardless of its shape or orientation.
Is the centroid always inside the shape?
Not always. For convex shapes (rectangles, circles, triangles, regular polygons), the centroid is always inside. For non-convex shapes like L-sections, C-channels, or arbitrary irregular outlines, the centroid can fall outside the physical area — like the centroid of a boomerang, which is in the empty space between the two arms. This is mathematically valid and meaningful: the centroid is the point where the area's first moment is zero, even if no physical material is located there.
What's the difference between centroid and center of mass?
For a uniform-density object, centroid and center of mass coincide. For a non-uniform object (e.g., a rectangle with a denser region on one side), the center of mass shifts toward the denser region while the centroid (geometric center) stays fixed. In most engineering applications with homogeneous materials, you compute the centroid and use it as the center of mass. For layered or composite materials with different densities, the center of mass must be computed using weighted integrals that account for density.
How do holes affect the centroid calculation?
Holes are handled by treating them as negative areas. Compute the centroid of the full outer shape as if it were solid, compute the centroid of the hole, then combine them using the weighted-average formula with the hole contributing -A_hole and -A_hole × centroid coordinates. The result shifts the overall centroid away from the hole location (the 'missing material' pulls the centroid the other way). This is the cleanest approach for shapes like washers, rings, and perforated plates.
Related Calculators
Force Resolution Calculator
Resolve a force into horizontal and vertical components
Moment Calculator
Calculate moments about a point from multiple forces
Resultant Force Calculator
Find the resultant of multiple forces with magnitude and direction
Area Moment of Inertia Calculator
Calculate the second moment of area for common cross-sections
Parallel Axis Theorem Calculator
Apply the parallel axis theorem to find moment of inertia about any axis
Friction Calculator
Calculate static and kinetic friction forces for common material pairs