CalcWorldHub
Free online calculator · no signup

Point-in-polygon checker

Classify a planar point relative to a polygon supplied as matching ordered x and y vertex lists. The test distinguishes interior, exterior, and boundary points.

Point-in-polygon checker — Polygon x coordinates, Polygon y coordinates, Test point x and calculation method
Point-in-polygon checker: inputs and calculation method.

How to use this calculator

Classify a planar point relative to a polygon supplied as matching ordered x and y vertex lists. The test distinguishes interior, exterior, and boundary points.

  1. Enter Polygon x coordinates, Polygon y coordinates, Test point x, Test point y. Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

How Point-in-polygon checker works

Classify a planar point relative to a polygon supplied as matching ordered x and y vertex lists. The test distinguishes interior, exterior, and boundary points.

Point classification relative to a polygonA rectangle contains a marked interior point and a second marked point on its left boundary.insideboundary
A boundary point is reported separately from the ray-crossing inside/outside test.

Inputs and units

  • Polygon x coordinates: Ordered polygon vertex x-coordinates; at least three values.
  • Polygon y coordinates: Matching y-coordinates in the same vertex order.
  • Test point x: Test point x-coordinate.
  • Test point y: Test point y-coordinate.

Formula and method

Ray crossing parity; boundary is tested separately from inside/outside

Worked example

For the rectangle (0,0), (4,0), (4,3), (0,3), the point (2,1) lies inside; (0,1) lies on the left boundary.

Interpreting the result

“Inside” means the ray crosses the polygon boundary an odd number of times; “boundary” is reported distinctly.

Assumptions and limits

Vertices must describe a simple polygon in boundary order and use one Cartesian coordinate system. Self-intersections, holes, and geographic wraparound are not modeled.

Frequently asked questions

Why is the boundary a separate result?

A point on an edge is neither strictly inside nor strictly outside, so it is tested before the parity classification.

Can I list vertices in either direction?

Yes. Reversing a simple polygon’s order preserves its region, provided each coordinate list stays paired.

How do I use the Point-in-polygon checker?

Enter Polygon x coordinates, Polygon y coordinates, Test point x, Test point y. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Point-in-polygon checker?

For the rectangle (0,0), (4,0), (4,3), (0,3), the point (2,1) lies inside; (0,1) lies on the left boundary.

What does the Point-in-polygon checker calculate?

Classify a planar point relative to a polygon supplied as matching ordered x and y vertex lists. The test distinguishes interior, exterior, and boundary points.

Related calculators