← All text tools

Circle packing calculator

Counts how many circles of a given diameter fit in a rectangle or a larger circle in square or hexagonal packing, with the packing density, the wasted area and a picture.

  • Free
  • No sign-up
  • Works on any device

About Circle packing calculator

How many identical circles fit in a box or in a bigger circle? In a rectangle the page counts a square grid, ⌊W/d⌋ by ⌊H/d⌋, and a hexagonal arrangement whose rows sit d·√3/2 apart and alternate shifted by half a diameter, trying both orientations. In a circular container it searches square and hexagonal lattices over many offsets and turns. It reports each count, the packing density and the wasted area, and draws the result. Circles of diameter 2 in a 10 by 10 square give 25 on a grid but only 23 hexagonally, while 7 circles of diameter 1 fit in a circle of diameter 3.

How to use Circle packing calculator

  1. Choose a rectangle or a large circle and enter the diameter of the small circles.
  2. Enter the rectangle width and height, or the diameter of the big circle.
  3. Compare the square and hexagonal counts and densities and view the drawing of the better one.

Why use this tool?

Also known as

Frequently asked questions

Is hexagonal packing always better than a square grid?

In an endless plane yes, with density 90.69% against 78.54%. In a finite box the edges matter, and for some sizes the square grid fits more, as in the 10 by 10 example.

Is this the true maximum number of circles?

Not necessarily. Mixed arrangements can occasionally fit one or two more, and for circles in a circle some small counts have special optimal layouts. The result is a reliable lower bound.

What does the wasted area mean?

It is the container area not covered by circles, including the gaps between them, as a percentage and as an area in the squared unit you used.

Is Circle packing calculator free?

Yes. Circle packing calculator on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Can I put Circle packing calculator on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.