ThisCalculator

Math

Circle Nesting Calculator: How Many Circles Fit?

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Circle Nesting Calculator: How Many Circles Fit?

This calculator determines how many smaller circles can fit inside a larger circle, given their diameters. You enter the outer circle’s diameter and the inner circle’s diameter, and it returns the maximum number of inner circles that can be packed within the outer one, along with the total area used. The calculation uses a hexagonal packing arrangement, which is the most efficient way to pack equal-sized circles in a plane.

Formula

The calculator uses the hexagonal packing density formula. For equal-sized circles, the maximum packing density in an infinite plane is π/(2√3) ≈ 0.9069, meaning about 90.69% of the area can be covered. To estimate the number of circles that fit in a larger circle, we multiply the area ratio by this density factor:

N ≈ floor( (π / (2√3)) × (D / d)² )

Where:

  • D = diameter of the outer circle (same unit as d)
  • d = diameter of each inner circle (same unit as D)
  • N = maximum number of inner circles that fit (rounded down to the nearest whole number)

This formula gives an upper bound based on area efficiency. For small ratios (D/d less than about 10), edge effects mean the actual number may be lower, but for larger ratios the estimate is very close.

Worked Example

Let’s use the default values: outer diameter = 100 mm, inner diameter = 10 mm.

  1. Calculate the diameter ratio: D/d = 100 / 10 = 10
  2. Square the ratio: 10² = 100
  3. Multiply by the packing density factor: (π / (2√3)) × 100 ≈ 0.9069 × 100 = 90.69
  4. Round down to the nearest whole number: floor(90.69) = 90

So the calculator returns 90 circles. The area used is 90 × (π × 5²) = 90 × 78.54 = 7068.58 mm². The outer circle area is π × 50² = 7853.98 mm². The packing efficiency is 7068.58 / 7853.98 × 100 ≈ 90.0%.

When to Use This Calculator

This tool is useful in many practical situations where you need to arrange circular objects within a circular boundary:

  • Cutting circular blanks from a circular sheet of material (metal, wood, plastic)
  • Placing cylindrical containers or pipes inside a circular enclosure
  • Designing circular arrays of sensors, LEDs, or holes
  • Estimating how many circular cookies or cakes fit on a circular tray
  • Planning circular gardens with circular planters

For most real-world purposes, the hexagonal packing model gives a good estimate. However, if the inner circles are very large relative to the outer circle (ratio less than about 5), the actual number may be significantly less than the estimate due to wasted space at the edges.

How to Choose the Right Packing Method

The calculator assumes hexagonal packing, where each circle is surrounded by six others in a honeycomb pattern. This is the densest possible arrangement in an infinite plane. However, there are other packing strategies:

  • Square packing: Circles arranged in rows and columns, touching at four points. This is less efficient (about 78.5% density) but easier to lay out and cut.
  • Random packing: When circles are placed randomly, the density drops to about 64% for loose random packing.
  • Edge-constrained packing: For small numbers of circles, you may be able to fit more by manually arranging them near the boundary.

For a quick estimate, hexagonal packing is the standard choice. If you need an exact count for a specific small number of circles, you may need to use a dedicated circle packing algorithm or draw it out.

Common Mistakes and Misconceptions

One frequent error is using radii instead of diameters. The formula uses diameters, but if you have radii, simply double them before entering. Another mistake is forgetting to use the same units for both circles – mixing inches and centimeters will give a wildly wrong answer.

A common misconception is that the formula gives an exact count for any size. In reality, it’s an upper bound. For example, with an outer diameter of 30 mm and inner diameter of 10 mm (ratio 3), the formula gives floor(0.9069 × 9) = floor(8.16) = 8 circles. But you can actually fit 7 circles in a hexagonal arrangement (one center, six around), and sometimes 8 is possible with a different layout. The formula is a good starting point, but for critical applications, verify with a physical test or a more precise packing algorithm.

Limitations of the Formula

The hexagonal packing density is derived for an infinite plane, not a finite circle. When the outer circle is only a few times larger than the inner circles, the boundary effects become significant. The formula assumes you can pack circles right up to the edge, but in reality, the curved boundary creates gaps that reduce the count.

For ratios below 10, the estimate can be off by 10-20%. For ratios above 20, the error is usually less than 1%. If you need an exact count for a small number of circles, consider using a circle packing tool that performs a geometric search, or manually test arrangements.

Frequently Asked Questions

How many circles can fit inside a circle?

The maximum number depends on the ratio of the diameters. For a ratio of 2, you can fit 1 circle (the inner circle is half the diameter, so it fits exactly once). For a ratio of 3, you can fit 7 circles in a hexagonal arrangement (one in the center, six around). For larger ratios, the number grows roughly as 0.9069 × (D/d)².

What is the most efficient way to pack circles?

Hexagonal packing (also called honeycomb packing) is the most efficient arrangement for equal-sized circles in an infinite plane, achieving about 90.69% density. This means that in a large enough area, you can cover about 90.7% of the space with circles, leaving only 9.3% as gaps.

Why does the calculator use a formula instead of drawing the circles?

The formula provides a fast, accurate estimate for most practical purposes, especially when the number of circles is large. Drawing and optimizing actual positions is computationally intensive and only needed when the number of circles is small (typically under 20) and you need an exact count.

Can I use this for circles of different sizes?

No, this calculator assumes all inner circles are the same size. Packing different-sized circles is a much more complex problem, and the maximum number depends heavily on the size distribution and arrangement. For mixed sizes, you would need a specialized packing algorithm.

Does the unit of measurement matter?

No, as long as you use the same unit for both diameters. The formula uses the ratio, so it is unit-agnostic. You can use millimeters, inches, centimeters, or any other unit – the result will be the same number of circles.

What if the inner circle is larger than half the outer circle?

If the inner circle’s diameter is more than half the outer circle’s diameter, then only one circle can fit. The formula will give a result of 1 for ratios between 1 and 2, which is correct. If the inner circle is larger than the outer circle, the ratio is less than 1, and the formula would give 0, which is also correct.

Related

Formula used
in outer_d | Outer circle diameter | mm | 100 | 1
in inner_d | Inner circle diameter | mm | 10 | 1
out count | Maximum circles (hexagonal) | - | floor((pi / (2 * sqrt(3))) * ((outer_d / inner_d) ^ 2)) | 0
out area_used | Area used by circles | mm^2 | count * (pi * (inner_d / 2) ^ 2) | 0
out area_outer | Outer circle area | mm^2 | pi * (outer_d / 2) ^ 2 | 0
out efficiency | Packing efficiency | % | (area_used / area_outer) * 100 | 1

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.