🧮
🧮 Math & statistics

Pick’s Theorem Calculator

Results update as you type.

Your numbers

Understanding the Pick’s theorem calculator — concept and principle

Pick’s theorem gives the area of a polygon drawn on a square grid simply by counting dots. If every corner of the polygon sits on a lattice point (a point with whole-number coordinates), you only need two counts: the lattice points strictly inside, I, and the lattice points on the boundary, B. It is a favourite tool in mathematics competitions, and a quick check for shoelace-formula results.

Pick's theorem on a lattice triangle with I = 7 and B = 8The triangle with corners (0,0), (0,5) and (4,2) has 7 grid points inside (green) and 8 on its edges (gold). Area = 7 + 8 ÷ 2 − 1 = 10.Count pegs on a pegboardinside I = 7on edge B = 87+ 8 ÷ 2 = 4− 1area = 10Triangle (0,0), (0,5), (4,2) — shoelace also gives 10
A = I + B/2 − 1: inside pegs count fully, edge pegs count half.

How it is calculated

A = I + B/2 − 1

The area is in grid squares. If the grid spacing is 1 cm, the area is in cm². On an edge from (x₁, y₁) to (x₂, y₂), the number of lattice points, counting one endpoint, is gcd(|x₂ − x₁|, |y₂ − y₁|), so B is the sum of these over all edges.

The principle

Think of each lattice point as owning a share of the area around it. An interior point contributes a full unit. A boundary point on a straight stretch of edge has half its surroundings inside the polygon, so it contributes ½. At the corners the shares do not quite add up: going around a polygon, the exterior turning angles total 360°, a full turn, and that missing turn costs exactly one unit, hence the −1. A formal proof checks that the formula holds for a single triangle containing no other lattice points (area ½) and that it stays true when polygons are glued along an edge. Georg Pick published the result in 1899.

Worked example

  1. Inputs: I = 7, B = 8.
  2. Half the boundary points: 8 ÷ 2 = 4.
  3. Area = 7 + 4 − 1 = 10.
  4. One polygon with these counts is the triangle (0, 0), (0, 5), (4, 2): its edges contribute 5 + 2 + 1 = 8 boundary points, and the shoelace formula gives the same area, |0×5 − 4×5| ÷ 2 = 10.
How Area changes with Interior lattice points IHow Area changes with Interior lattice p…2.557.51012.51517.51.753.55.2578.7510.514Example: 10Interior lattice points I
Each point is the calculator re-run with only “Interior lattice points I” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Interior lattice points IArea
1.754.75
3.56.5
5.258.25
710
8.7511.75
10.513.5
1417

How to read the result

The area of a lattice polygon is always a whole number or a whole number plus one half, because B/2 can only add a half. If B is odd, the area ends in .5. As a cross-check, a 4 × 3 rectangle has B = 14 and I = 6, so A = 6 + 7 − 1 = 12.

Common mistakes

Keep in mind: Pick’s theorem holds only for simple polygons (no holes, no self-crossing) whose vertices are all lattice points of a square grid. It does not extend to three dimensions: Reeve’s tetrahedra have the same point counts but different volumes.

Frequently asked questions

What if the polygon has holes?

For a polygon with h holes the formula becomes A = I + B/2 + h − 1.

Can Pick’s theorem work on a triangular grid?

Not in this form; it is stated for the square integer lattice and needs adjustment for other lattices.

How do I count boundary points quickly?

For each edge, take the gcd of the absolute differences in x and in y, then add the results for all edges.

Sources: G. Pick, Geometrisches zur Zahlenlehre, Sitzungsberichte des deutschen naturwissenschaftlich-medicinischen Vereines für Böhmen “Lotos” in Prag 19 (1899), 311–319 · J. E. Reeve, On the volume of lattice polyhedra, Proceedings of the London Mathematical Society (1957)

Checked 8 Nov 2026. Standard formulas, computed in your browser with double-precision numbers.

🧮 All math & statistics tools →🌍 Calculators by country →