On this page
A drop of ink in still water spreads fast at first, then seems to stall. Nothing is slowing it down. The stall comes from the way random motion adds up, and you can see it with a coin, a spreadsheet or a simulation.
How do you run a random walk simulation?
A particle starts at position 0. Each tick it takes one step: +1 if a coin lands heads, −1 if tails. Real molecules do this in three dimensions, knocked about by collisions. You can run it three ways:
By hand: flip a coin for 20 steps and track your position on a number line.
In a spreadsheet: in column A type =IF(RAND()<0.5,-1,1) and fill it down 400 rows. In column B keep a running total. Copy the columns sideways to get 50 walkers.
In a simulation: watch hundreds of walkers spread from one point at once.
How far does a particle drift after 100 and 400 steps?
The average position stays near 0, because left and right steps cancel across many walkers. That does not mean each walker stays home; the crowd spreads evenly both ways.
The useful measure is the root-mean-square (rms) distance: square each walker's final position, average the squares, then take the square root. For a random walk, the rms distance after n steps is √n times the step length, as the random walk article on Wikipedia sets out.
With steps of length 1, that gives:
After 100 steps: rms distance √100 = 10 steps from the start.
After 400 steps: rms distance √400 = 20 steps from the start.
If you prefer the plain average of the distances, it settles at about 0.8 times √n for long walks (the limit is √(2/π), from the same source). So expect roughly 8 steps after 100 and 16 after 400. If you guessed 50 and 200, you pictured a particle walking one way. Four times the steps only doubles the distance.
Why does distance grow with the square root of time?
Call your position x. On the next step you move to x + 1 or x − 1 with equal chance, so your squared position becomes x² + 2x + 1 or x² − 2x + 1. Averaged over the two outcomes, the ±2x terms cancel and you are left with x² + 1.
So every step adds exactly 1 to the average of x². After n steps the mean square distance is n and the rms distance is √n. Random steps add up in squares, not in lengths.
Physicists write this as ⟨x²⟩ = 2Dt in one dimension, where D is the diffusion coefficient, and ⟨r²⟩ = 6Dt in three dimensions (see mean squared displacement). Taking the square root gives x_rms = √(2Dt), the form used in OpenStax College Physics. Albert Einstein connected this random motion of suspended particles to the molecular theory of heat in a 1905 paper in Annalen der Physik. For the law that describes the spreading in bulk, read our post on Adolf Fick and the law of diffusion.
Why does diffusion get slower over longer distances?
Turn the formula around: t = x² ÷ 2D. Time grows with the square of distance. OpenStax gives the diffusion coefficient of oxygen in water as 1.0 × 10⁻⁹ m²/s. Put that in and you get:
10 micrometres: 0.05 seconds.
1 millimetre: 500 seconds, a little over 8 minutes.
1 centimetre: 50,000 seconds, nearly 14 hours.
Going 1,000 times further took a million times longer. OpenStax works the same example for glucose in water and finds about 21 hours to cover 1 cm, noting that diffusion is a slow process over macroscopic distances. In air, oxygen's coefficient in the same table is 1.8 × 10⁻⁵ m²/s, so 1 cm takes under 3 seconds.
Over the width of a cell, diffusion is quick. Over centimetres it takes hours, so a large body cannot rely on it alone to move oxygen; it also needs bulk flow, such as breathing and blood circulation. For why a smell can still cross a room quickly, see how perfume spreads through a room.
How do you use the square-root rule in exam questions?
Keep this checklist, built on the mean squared displacement rule, handy:
Time multiplied by k means distance multiplied by √k.
Distance doubled means time multiplied by 4. Distance multiplied by 10 means time multiplied by 100.
In one dimension use ⟨x²⟩ = 2Dt; in three dimensions use ⟨r²⟩ = 6Dt.
Check units: D is in m²/s, so x² ÷ D gives seconds.
An average position of zero is not an average distance of zero.
Try one: a dye front spreads 2 mm in 10 minutes. How far after 40 minutes? Four times the time gives twice the distance, so 4 mm. After 90 minutes, nine times the time gives 6 mm.
If flipping 400 coins sounds slow, the Fermi Simulation Lab has interactive simulations for the ideas that are easier to see than to read. To compare how fast different gases spread, try our Graham's law gas diffusion simulation next.



