On this page
Slide ring magnets onto a pencil with like poles facing and they hover. The stack is not evenly spaced: the top gap is the widest, and each gap below it is a little narrower. You can predict that pattern on paper before you build it.
Why do floating ring magnets have uneven gaps?
Think of each gap as a cushion. The gap under the top magnet holds up one magnet's weight. The gap below that holds up two, and the bottom gap carries every magnet above it.
A bigger load needs a bigger push, and repelling magnets push harder only when closer. So the most loaded gap, at the bottom, is the narrowest. The stacking levitating magnets activity from Teach Beside Me notes that as you add more magnets they are pushed closer together, and it suggests measuring whether the distance changes the higher you go.
Each gap behaves like a spring that gets stiffer the more you squash it, unlike the straight-line spring in our Hooke's law spring extension simulation.
How much should each gap shrink?
For that you need a force law. For two small magnets on the same axis, far apart compared with their size, the force falls as 1/d⁴, the inverse fourth power of the distance, according to the Wikipedia article on the force between magnets. Doubling the distance cuts the push to one-sixteenth.
Sanjoy Kumar Pal and Pradipta Panchadhyayee checked this with a smartphone pressure sensor under an inflated zip-lock bag and N35 neodymium disc magnets. Their 2024 paper in the journal Resonance confirmed the inverse fourth power relationship between magnetic force and distance (Resonance, 2024).
Now the worked example. If the push across a gap is C/d⁴ and that gap carries N magnets of weight mg each, then C/d⁴ = N × mg, so d = (C/Nmg)^(1/4). Every gap is the top gap divided by the fourth root of the number of magnets it holds up:
Holds 1 magnet: 1.00 × the top gap
Holds 2 magnets: 0.84 × the top gap
Holds 3 magnets: 0.76 × the top gap
Holds 4 magnets: 0.71 × the top gap
With five magnets, the bottom one rests on the base and the four gaps above it carry 4, 3, 2 and 1 magnets. The squeeze is gentle: doubling the load narrows a gap by only about 16%, because the fourth root of 2 is about 1.19. The diagram at the top draws these numbers for stacks of three and five.
One caveat: the same Wikipedia article says 1/d⁴ holds only when the gap is much larger than the magnets' thickness. Ring magnets on a pencil often float closer than their own width, and the rule ignores the weaker push from magnets further away, so treat 0.84, 0.76 and 0.71 as a first prediction, not a final answer.
How do you test the gap pattern at home?
Collect four to six identical ring magnets, a pencil or skewer thinner than the hole, clay or dough to stand it upright (the Teach Beside Me setup uses play dough), and a millimetre ruler.
Slide on the first magnet. Flip each new magnet until it repels the one below, so like poles face each other.
Build a stack of three. Measure the top gap, then predict the lower gap as 0.84 times the top gap. Measure it.
Measure face to face between magnets. Tap the pencil gently before each reading so friction does not hold a magnet off balance, and average three readings.
Add a fourth and then a fifth magnet, predicting every gap first. One prediction surprises people: the top gap should barely change, because it always holds just one magnet. Only the gaps below it shrink.
Work out your own exponent. If the top gap is g₁ and a gap holding N magnets is g, then n = ln N ÷ ln(g₁/g). Suppose your top gap is 12 mm and the gap holding four magnets is 8 mm: n = ln 4 ÷ ln 1.5, which is about 3.4.
Near 4 means your magnets fit the far-apart model. Clearly below 4 means they sit too close for it: a real finding, not a failed experiment.
What if your gaps don't match the prediction?
Check the usual suspects. A magnet rubbing on the pencil can stop short of its balance point. Cheap ring magnets are not always equally strong, so swap their order and see whether the odd gap moves with one magnet. A tilted pencil adds friction. Keep small magnets away from young children, who may swallow them.
If you want to change one thing at a time and watch a balance point move, the Fermi Simulation Lab has interactive simulations for ideas that are easier to see than to read. If your numbers still refuse to fit, Fermi's AI tutor notices where your reasoning is stuck and decides whether to explain, ask or show.
For more hands-on magnet work, try these magnet experiments for kids at home, or predict what happens in does heating a magnet destroy its magnetism.



