How this calculation works
Calculate the planar union of two simple polygons, returning filled area and explicit outer and hole boundaries for every output component. The Boolean operation handles overlap without double-counting it. Component and hole counts remain separate because one area value alone cannot describe the topology of the resulting region.
area(A union B)=area A+area B−area(A intersection B).A worked example
Two 2-by-2 squares shifted horizontally by 1 overlap in a 1-by-2 rectangle. Their union area is 4 + 4 − 2 = 6. The combined boundary has one connected component and no holes; the shared rectangle is counted only once.
Good to know
Two simple polygons≤32vertices each, no input holes; output may have components and holes. Sweep-line polygon-clipping library, floating-point geometry.
Reference: Method reference: Polygon union area calculator with boundary and holes (opens in a new tab) ↗
Define the union as filled membership
A point belongs to the union when it lies in either input polygon or both. Shared interior is counted once. The operation is not a convex hull: an indentation remains unless one input actually fills it. Gaps between disjoint polygons also remain gaps rather than being bridged automatically.
The inputs are simple filled polygons without holes, specified in boundary order. The output can nevertheless have multiple polygon components or interior holes after combining concave shapes. Those boundaries are returned explicitly instead of reducing every case to a single exterior ring.
The Convex polygon intersection area calculator from coordinates finds a shared convex region. Union here accepts simple concave boundaries and retains disconnected components and any interior rings.
Prepare valid planar boundaries
Each polygon needs distinct vertices following its boundary, with no crossing or unsupported nonadjacent touching edges. The closing edge is implicit. Repeating the first vertex at the end or treating an unordered point set as a boundary can make validation fail or define a different region.
Coordinates must share one planar frame and unit. Geographic longitude and latitude are not automatically projected, so their raw planar area would not be a physical surface area on Earth. Use a suitable map projection outside this page when that is the intended application and retain its area interpretation.
Verify overlapping squares
The default first square spans x from zero to two and y from zero to two. The second spans x from one to three over the same y range. Each area is four, and their shared rectangle has area two, so union area is four plus four minus two, equal to six.
The result has one rectangular component and no holes. Adding the two input areas directly would give eight and double-count the overlap. A convex hull happens to match the union in this special configuration, but that coincidence does not justify replacing the Boolean union algorithm for arbitrary concave or separated polygons.
Read output rings and holes
Within each output component, ring zero is the exterior boundary and later rings are holes. The filled component area is exterior area minus its hole areas. A hole is an excluded interior region, not another filled component, so its area must not be added to the union total.
Boundary orientation and starting vertex can differ from the inputs because clipping splits and joins edges. Compare filled geometry rather than expecting the first output vertex to match the first input vertex. Equivalent ring rotations or reversals can describe the same region under an appropriate exterior/hole convention.
Understand the Boolean implementation
The page uses the polygon-clipping library’s sweep-line operation after validating the two input polygons. Intersections split edges, and the operation reconstructs boundaries according to union membership. It is not approximated by testing a coarse grid of sample points or adding triangle areas without accounting for overlap.
The computation is floating-point geometry, not exact rational arrangement arithmetic. Very close intersections or nearly coincident boundaries can still be sensitive to input precision and validation tolerances. A library-backed operation improves handling of complex cases but should not be described as an arbitrary-precision proof of every near-degenerate topology.
Check disjoint, contained and shared-edge cases
Disjoint polygons normally return separate filled components, and their areas add. If one polygon is entirely contained in the other, the union is the larger region rather than a hole around the smaller. Sharing an edge does not add filled area by itself or require the edge to be counted twice.
Point-touching boundaries can raise component-representation subtleties even when total area is clear. Use the returned polygon topology rather than interpreting area alone as a robust connectivity test for a physical object with thickness. Tiny coordinate changes near touching can change connectivity while barely changing area.
Keep the operation distinct from design constraints
The union does not compute intersection, symmetric difference, a manufacturing offset or a clearance margin under the same label. It also does not repair invalid self-crossing polygons or infer which overlapping boundary should be subtracted. Those are separate geometric specifications.
The form accepts two boundaries with at most thirty-two vertices each and no input holes. Report area together with components and holes when topology matters. If a downstream system requires a particular ring orientation or coordinate precision, convert the returned representation deliberately rather than discarding hole rings to make the file simpler.
A few questions, answered
Is polygon union the same as convex hull?
No. The hull can fill gaps and indentations that belong to neither polygon.
Can the output contain holes?
Yes, even though the two input boundaries have no holes.
Why did output vertices change order?
Clipping reconstructs rings after intersections. Starting vertices and ring orientation are representation choices.
Can longitude/latitude area be interpreted as square metres?
Not directly. This is planar geometry and does not apply a geographic projection or Earth-surface model.