Written by Erum Nazeer Built by Muhammad Ayaz Akhtar Updated

Packaging calculator

Sphere Packing Calculator

When a round product ships in a square box, most of the space is air, a sphere inside a tight cube fills only about 52% of the box. Knowing how much clearance to add, what box size results, and how much of it is void space is what sphere packing math handles. Enter sphere diameter and clearance per side below.

Product fit

Enter sphere and clearance

Formula: Inner box side = sphere diameter + 2 × clearance

Packing layout preview

1 sphere arranged as 1 × 1 × 1.
Shared grid size: 12 × 12 × 12 cm Top layer shown.

Sizing a Box for One Round Item

Say you ship a glass ornament 10 cm across and want 1 cm of padding on every side. That's what this calculator is for. Enter the sphere's diameter, the clearance per side, the box wall thickness, and how many you're shipping. Here's what it works out for the ornament:

  1. Inner box side: 10 + 2 × 1 = 12 cm. Clearance counts twice because the item needs space on both sides of every axis.
  2. Sphere volume: (4/3) × π × 5³ ≈ 523.6 cm³
  3. Box volume: 12³ = 1,728 cm³
  4. Void to fill: 1,728 − 523.6 = 1,204.4 cm³
  5. Fill efficiency: 523.6 ÷ 1,728 ≈ 30.3%

The outer box side adds twice the wall thickness to the inner side. Use the outer size for carrier quotes and shelf space, and the inner size for ordering inserts. If you only know the radius, double it before entering. Entering the radius as the diameter sizes the box for an item half as wide.

The Formulas, and the 52% Ceiling

Sphere packing box sizing diagram showing sphere diameter (d), clearance (c) on each side, inner box side = d + 2c, and outer box side including wall thickness
Cross-section diagram showing a sphere inside an inner box inside an outer box, with diameter, clearance, and wall thickness labeled and the inner box sizing formula
OutputFormula
Inner box sidediameter + 2 × clearance
Outer box sideinner side + 2 × wall thickness
Sphere volume(4/3)πr³
Void volumeinner side³ − sphere volume
Fill efficiencysphere volume ÷ inner side³ × 100
Total shipment volumeinner side³ × quantity

A ball can't reach the corners of a cube. Even with zero clearance, when it touches all six faces, it fills only π/6 ≈ 52.4% of the box. That's the best a single sphere in a cube can ever do, and every centimeter of clearance lowers it. The ornament's 30.3% is typical once real padding is added. For the sphere volume alone with working steps, use the Sphere Volume Calculator.

Why the Empty Space Costs Money

Two costs come from the void. Filler first: 1,204 cm³ per ornament of foam, air pillows, or molded pulp, multiplied across every order. Then shipping: parcel carriers bill light packages by dimensional weight, which is based on the outer box size rather than what's inside. A box that is mostly air is billed as if it were full. Trimming clearance where the product allows, even by half a centimeter per side, shrinks both.

Many Spheres in One Box

The calculator sizes one item per box. For several equal spheres sharing a container, start with a straight grid:

Count = floor(L ÷ d) × floor(W ÷ d) × floor(H ÷ d)

Round each count down, because a partial sphere doesn't fit. Two quick cases with 4 cm balls (radius 2 cm):

The grid is a safe lower bound. Staggering each layer into the hollows of the one below (close packing) can reach about 74% density against the grid's 52%, which means up to about 40% more spheres in a large container. In a small box the gain is much smaller and sometimes zero, because the offset layers waste space at the walls. How to Find the Optimal Box Dimensions to Pack 27 Spheres works through the 27-sphere case in detail, and Sphere Packing in a Cylinder: Optimal Radius and Height covers round containers, where the grid formula doesn't apply.

From One Box to a Shipment

The quantity field multiplies the inner box volume: 36 ornaments in 12 cm boxes need 1,728 × 36 = 62,208 cm³, about 0.062 m³. For carrier space, redo that sum with the outer box side, since walls add up across dozens of cartons. Then take the outer dimensions to the Pallet Calculator to see how many boxes fit per layer and per pallet.

How the Numbers Are Checked

Every input feeds the volume math directly. Raise the clearance and the inner side (diameter plus twice the clearance) grows, which increases both the box volume and the void left after subtracting (4/3)πr³. The void is computed from your own numbers each time, not taken from a fixed packing-density percentage. Total shipment volume is one box's volume times quantity, so doubling the quantity doubles the total and changes nothing else.

Frequently Asked Questions

How do I calculate the box size for a sphere?

Inner box side = sphere diameter + 2 × clearance. Add clearance twice because the sphere needs space on both sides in every direction. The outer box side is inner side + 2 × wall thickness, use outer dimensions when quoting carrier rates.

How many spheres fit in a box?

Simple grid: divide each box dimension by sphere diameter, round each count down, multiply the three numbers. Staggered (close) packing can fit up to about 40% more in a large container, but far less in a small box, where offset layers waste space at the walls. Use the grid result as a reliable lower bound.

Should I use diameter or radius?

Diameter. If you only know the radius, double it: diameter = 2 × radius. Entering radius as diameter will produce a box sized for a sphere half the actual size.

References