Quick answer: N = Vcontainer × φ ÷ Vsphere, where φ ≈ 0.64 for anything poured and settled. A 1-litre jar of 16 mm marbles holds about 298. The theoretical maximum is 74.05% but you cannot reach it by pouring — only by placing spheres by hand.
The number that decides everything
Spheres never fill their container. The fraction they do fill — the packing density φ — varies by more than 30% depending purely on how they got there, and picking the wrong one is the dominant error in any estimate.
| Arrangement | Exact value | φ | Void | How you get it |
|---|---|---|---|---|
| Random loose pour | empirical | 0.55–0.60 | ~42% | Poured gently, not settled |
| Random close packing | empirical | 0.64 | 36% | Poured and settled — the usual case |
| Vibrated / tapped | empirical | 0.66–0.68 | ~33% | Mechanically shaken while filling |
| Body-centred cubic | π√3/8 | 0.68017 | 31.98% | A crystal lattice, not achievable by pouring |
| Close packing (FCC/HCP) | π/(3√2) | 0.74048 | 25.95% | Placed by hand — fruit stacks, cannonballs |
| Simple cubic | π/6 | 0.52360 | 47.64% | Spheres in a grid — deliberately inefficient |
The 74% trap. Search for sphere packing and you will find 74.05% everywhere, because it is the mathematically famous number. It is also the wrong number for almost every practical question. Pouring balls into a container gives 64% — no amount of shaking gets you to 74%, because that requires a perfect crystalline lattice, and disordered packings jam at a lower density long before they can order themselves. Using 74% overestimates your sphere count by about 16%.
Sphere size does not change the density
This one is genuinely counter-intuitive, and it is worth internalising because it simplifies the whole problem.
A jar of ball bearings and a jar of tennis balls both fill to about 64%. The number of spheres changes enormously, but the fraction of space occupied does not. Packing density is a dimensionless ratio, and scaling every sphere by the same factor scales every gap by the same factor too — the geometry is unchanged.
| Sphere | Diameter | Volume each | Count | Glass/steel volume |
|---|---|---|---|---|
| Airsoft pellet | 6 mm | 0.1131 cm³ | 5,659 | 640 cm³ |
| Marble | 16 mm | 2.1447 cm³ | 298 | 640 cm³ |
| Golf ball | 42.7 mm | 40.75 cm³ | 15 | 640 cm³ |
| Tennis ball | 67 mm | 157.5 cm³ | 4 | 640 cm³ |
The last column is the point: whatever you pour in, you end up with 640 cm³ of material and 360 cm³ of air. This has a practical consequence — if you are buying by weight, sphere size is irrelevant to how much you need. If you are buying by count, it matters enormously.
The caveat is small containers. Once the container is only a few sphere diameters across, the counts above stop being reliable — see the wall effect below.
The wall effect
A flat wall is bad news for packing. Spheres against it are forced into a layer that cannot interlock with anything behind, so density drops within roughly one sphere diameter of every surface.
How much this costs you depends on the container's surface-area-to-volume ratio — which means it depends on how many spheres wide the container is:
| Container width | Effective φ | Loss | Practical example |
|---|---|---|---|
| 3 sphere diameters | 0.5776 | −9.8% | Marbles in a narrow test tube |
| 5 diameters | 0.6135 | −4.1% | Golf balls in a shoebox |
| 10 diameters | 0.6309 | −1.4% | Marbles in a jam jar |
| 20 diameters | 0.6365 | −0.6% | Peas in a bucket |
| 50 diameters | 0.6388 | −0.2% | Ball pit, grain silo — negligible |
These come from a standard packed-bed voidage correlation, which adds an extra void increment of 0.05/(D/d) + 0.412/(D/d)² to the bulk value. The calculator applies exactly this formula when you give it container dimensions, and flags when the container is narrow enough to matter. Below about two sphere diameters the correlation breaks down entirely — spheres go single-file and no formula helps.
Note how fast the effect fades: at 10 diameters across you lose only about 1.4%, and by 20 it is under half a percent. Wall effects are a real correction for tubes and small jars, and a rounding error for anything bigger. The bigger prize in a guessing-jar contest is still remembering to use 0.64 at all rather than assuming the marbles fill the jar.
Beating 74% — mix the sizes
Kepler conjectured in 1611 that no arrangement of equal spheres beats 74.05%. Thomas Hales proved it in 1998, and a formal computer-checked proof was completed in 2014 — one of the longest-standing problems in geometry, finally closed.
But that limit only binds for identical spheres. Mix sizes and you can do far better, because small spheres drop into the gaps between large ones instead of forcing them apart:
| Application | How it works |
|---|---|
| Concrete aggregate | Graded stone, sand and cement fill each other's voids — a single stone size would need far more cement |
| Road base / hardcore | Well-graded fill compacts denser and carries load better than uniform gravel |
| Powder metallurgy | Blended particle sizes raise green density before sintering |
| Ceramic glazes | Particle-size distribution controls how tightly the fired layer packs |
A well-chosen two-size blend can exceed 80%, and adding further size grades pushes higher still. This is why "well-graded" is a compliment in civil engineering and "uniformly graded" often is not — the uniform material is the one full of holes.
When the empty space is the point
For many applications the sphere count is incidental and the void fraction is the real answer. That 36% of air is doing work:
| Application | What the voids do |
|---|---|
| Packed catalyst bed | Carries the reacting fluid past the catalyst surface |
| Gravel filter / soakaway | Holds and drains water — void fraction is the storage capacity |
| Chromatography column | Void volume determines the unretained elution time |
| Grain silo aeration | Lets air reach the centre of the mass |
| Ball mill charge | Void space accommodates the material being ground |
A soakaway filled with 20 mm gravel stores roughly 360 litres of water per cubic metre — not 1000. That single figure, straight out of the void fraction, decides how big the pit has to be. The calculator reports void volume alongside the count for exactly this reason.
Common mistakes & pro tips
| Mistake | What happens | Fix |
|---|---|---|
| Assuming spheres fill the container | Overestimates by ~56% | Multiply by φ — about 0.64 for a pour |
| Using 74% for a poured container | Overestimates by ~16% | 74% needs hand placement, not shaking |
| Ignoring wall effects in a small container | Overestimates, sometimes badly | Correct below ~10 sphere diameters wide |
| Using the outside dimensions | Overestimates by the wall thickness | Measure the container's internal volume |
| Using diameter as radius | Sphere volume 8× too large; count 8× too low | Halve the diameter first |
| Expecting an exact integer answer | False precision | Packing is statistical — treat it as ±3–5% |
Pro tip. If you need a genuinely accurate count for an odd container, do not compute it — measure it. Fill the container with water to find its true internal volume, then count out 50 spheres, measure their displacement, and scale. That empirically captures wall effects, container shape and any sphere size variation in one step, and it beats any formula.
How to use this calculator
- Choose how to define the container: a known volume, or box, cylinder or sphere dimensions. Giving dimensions lets the wall-effect correction apply.
- Enter the sphere diameter (or switch to radius).
- Pick the packing arrangement from the dropdown — random close packing is the sensible default for anything poured.
- Read the count, plus total sphere volume, void volume, surface area and — if you enter a density — total mass.
Frequently asked questions
What percentage of space do packed spheres fill?
It depends on the arrangement. The theoretical maximum for identical spheres is π/(3√2) = 74.05%, from face-centred cubic or hexagonal close packing. Pouring spheres in and letting them settle gives about 64%; a gentle loose pour can be 55–60%. That gap between 74% and 64% is the biggest single source of error in these estimates.
How many marbles fit in a jar?
Multiply the jar's internal volume by about 0.64, then divide by the volume of one marble. A 1-litre jar with 16 mm marbles holds roughly 298, since each marble is 2.145 cm³. Shaking to settle might get you to 310–320. Guessing contests are usually won by whoever remembers to apply 0.64 instead of assuming the marbles fill the jar.
Does the size of the spheres change the packing density?
No — provided they are all the same size. Packing density is a pure ratio, so ball bearings and tennis balls both reach about 64% on a random pour. The number changes enormously; the fraction of space filled does not. This only breaks down when the container is small relative to the spheres, where wall effects take over.
Can packing ever exceed 74 percent?
Not with identical spheres. Kepler conjectured the 74.05% limit in 1611; Thomas Hales proved it in 1998, with formal computer verification completed in 2014. But mixing sizes beats it, because small spheres drop into the gaps between large ones. Practical two-size blends can exceed 80% — which is exactly why concrete uses graded aggregate rather than a single stone size.
What is the difference between random close packing and close packing?
Close packing (74.05%) is a perfect crystalline lattice — every sphere touching twelve neighbours in a repeating pattern. Random close packing (~64%) is the densest arrangement reachable by pouring and shaking, disordered, averaging about six contacts per sphere. Real containers essentially always give the random figure; you cannot shake your way to the crystalline value, only place spheres deliberately.
Why do fewer balls fit near the walls of a container?
A flat wall forces the adjacent spheres into a layer that cannot interlock with anything behind it, so packing is looser within about one sphere diameter of any surface. The effect scales with surface area relative to volume — negligible in a ball pit, significant in a narrow tube. Starting from 0.64: ten sphere diameters across loses about 1.4%, five diameters about 4%, three diameters close to 10%. Below two diameters the spheres go single-file and no correlation applies.
How much empty space is there between packed spheres?
In a random pour at 64%, about 36% of the container is air. Even perfect close packing leaves 25.95% empty. That void is not always wasted — it carries fluid through a catalyst bed, drains water through a gravel filter, and lets air reach the middle of a grain silo. When void fraction matters more than count, it is the number worth calculating.
What packing density should I use for my estimate?
0.64 for anything poured and settled — ball pits, gumball machines, most real cases. 0.60 for a gentle pour with no settling. 0.68 if the container is vibrated during filling, as with grinding media. Reserve 0.7405 for hand-stacked arrangements like fruit displays or cannonball piles — nothing poured will reach it.