Percentages and Math

Circle Packing Calculator

Enter the container size and the diameter of the round items to compare a square grid with a staggered layout.

Your numbers

Use one unit for every size on this page.

The clear gap between neighbors. Use 0 if they may touch.

Result

Most items

18

Square grid (a tie with the staggered layout).

Most items that fit
18
Square grid
18
Staggered layout
18
Unused container area, best layout
36.38%
Items in each staggered row
6, 6, 6

Layouts compared

LayoutItemsUnused area
Square grid1836.38%
Staggered, rows along the width1836.38%
How this was calculated
  1. The spacing between item centers is the diameter plus the gap: 3 + 0 = 3.
  2. Square grid: floor((W - d) / spacing) + 1 across by floor((H - d) / spacing) + 1 down = 6 x 3 = 18.
  3. Staggered rows are spaced spacing x sqrt(3) / 2 apart, and every other row is shifted half a spacing. Both ways of running the rows are tried, and the better one is shown: 18.
  • The counts come from two regular layouts, not from a search for the very best packing. Irregular arrangements can fit a few more items in some containers.

Calculated using SumPanda.com · https://sumpanda.com/circle-packing-calculator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the circle packing calculator

  1. Enter the width and height of the container in one unit, and the diameter of the round items.
  2. Add a space between items if they need a gap, or leave it at 0 if they may touch.
  3. Read the most items that fit, the count for the square grid and the staggered layout, and the unused area of each.
  4. Use the steps to see how many items sit in each row of the best layout.

Formula

Spacing p = diameter + gap

Square grid = (floor((W - d) / p) + 1) x (floor((H - d) / p) + 1)

Staggered rows are p x sqrt(3) / 2 apart, so rows = floor((H - d) / (p x sqrt(3) / 2)) + 1

Full rows hold floor((W - d) / p) + 1 items and shifted rows hold floor((W - d - p / 2) / p) + 1

The staggered layout is tried with the rows running along the width and along the height, and the larger count is shown. The unused area is 1 minus the area of the circles over the area of the container.

Discs on a sheet and items in a tray

A container 20 by 10 holds 18 items 3 wide in a square grid (6 across and 3 rows). The staggered layout also holds 18, with three rows of 6, so there is a tie. Discs 8 across with a 2 gap, spacing 10, on a 100 by 60 sheet fit 60 in a square grid and 67 when staggered, an improvement of 7 items.

A 12 by 12 tray with 1.5 items and a 0.25 gap, spacing 1.75, takes 49 in a square grid and 46 staggered, so the square grid is better there. The result lists the better layout and the unused area of each.

Which layout wins

The staggered layout has a higher density for large containers, about 90.7 percent of the area against 78.5 percent for a square grid, but it needs room for the half shifted rows, and for small containers the square grid can win. That is why the page shows both counts instead of assuming one.

For rectangles instead of circles, use the pieces per sheet calculator. The circle calculator gives the area of one item.

Checking a layout

The counts are checked in testing by placing every center and confirming that no two centers are closer than the spacing and that every circle lies inside the container. For production work, leave an allowance for the cutter or punch and for the edge of the sheet, which you can enter as extra space between items.

Assumptions and limits

  • All items are circles of the same diameter, and the container is a rectangle.
  • Only a square grid and a staggered (hexagonal) layout are counted. More irregular arrangements may fit more.
  • The gap is the clear space between neighbors, and items may touch the container wall.
  • The page stops at about 250,000 items to stay fast.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

How many circles fit in a rectangle?

Divide the width and height by the spacing for a square grid, or use staggered rows spaced 0.866 times the spacing apart. The page does both and shows the larger count.

Is staggered packing always better?

No. For large containers it fits more, but in a small container the shifted rows can lose an item at the end of each row, and the square grid can win, as it does for a 12 by 12 tray.

How do I allow for a cutting gap?

Enter the gap between items in the space field. The spacing between centers is then the diameter plus the gap.

Does this find the best possible packing?

No. It counts two regular layouts. Special arrangements for specific container sizes can sometimes fit more items.