HomeArticlesChemistry & Materials

Fick's Laws of Diffusion: Concentration Gradients and Flux

How a random walk becomes a directional flow of matter, why diffusion distance scales with root time, and the two equations that describe both.

mysimulator teamUpdated June 2026≈ 7 min read▶ Open the simulation

Diffusion is a random walk in disguise

Drop a band of dye into still water and it spreads even though no current is pushing it. Every molecule is being kicked in a random direction by thermal collisions - a random walk - and while any single molecule's path is unpredictable, the statistics of billions of them are not. A sharp band inevitably flattens into a broad, smooth bell-shaped profile, and it always flattens in the same direction: from high concentration to low. That directionality does not come from any force pulling molecules downhill; it comes from simple counting. More molecules are near the peak than the edges, so more random steps carry molecules away from the peak than toward it.

live demo - a random walk spreading a concentrated band● LIVE

Fick's First Law: flux from a gradient

Adolf Fick, in 1855, borrowed the mathematical form of Fourier's heat-conduction law and applied it to matter. Fick's First Law states that the flux J - the amount of substance crossing a unit area per unit time - is proportional to the local concentration gradient:

J = -D · (dC/dx)

J : flux (mol per m² per s)
D : diffusion coefficient (m²/s) - depends on medium, temperature, molecule size
dC/dx : concentration gradient
minus sign: flux runs down the gradient, from high C to low C

D is not a universal constant - it is a property of the pair (solute, medium) at a given temperature. In a gas D is largest, of order 10⁻⁵ m²/s, because molecules travel far between collisions. In a liquid it drops to roughly 10⁻⁹ m²/s, since the solute is constantly jostled by a dense neighbour shell. In a solid or a gel it can fall to 10⁻¹² m²/s or lower, because the surrounding lattice or polymer mesh blocks most paths outright. The Stokes-Einstein relation ties D in a liquid to temperature, viscosity and particle radius, which is why a smaller ion or a hotter, thinner solvent diffuses faster.

Fick's Second Law: how the profile evolves in time

The first law gives flux at an instant; it does not say how concentration changes over time. Combine it with mass conservation - what flows into a thin slice minus what flows out must equal the change of amount stored in the slice - and you get Fick's Second Law, a partial differential equation for C(x,t):

∂C/∂t = D · ∂²C/∂x²

// same mathematical form as the 1-D heat equation
// concentration diffuses exactly like temperature diffuses

For an instantaneous point source this equation has an exact solution: a Gaussian that widens over time while its peak height falls, always conserving the total amount of substance. The width of that Gaussian - and more generally the rough distance a diffusion front has travelled - scales not linearly with time but as the square root of time:

x_rms ≈ √(2 D t)     // 1-D case

// doubling the distance takes 4x the time, not 2x
// this is why diffusion alone is a hopeless transport
// mechanism over macroscopic distances - the reason
// blood has a circulatory system instead of relying
// on oxygen diffusing from your lungs to your toes

Steady state and Fick's Law in practice

When a system is fed at one boundary and drained at the other for long enough, dC/dt goes to zero everywhere and the concentration profile stops changing shape even though matter keeps flowing through it - a steady state. Across a slab of thickness L with fixed concentrations C1 and C2 at the two faces, the profile becomes exactly linear and the flux is constant everywhere:

J_steady = D · (C1 - C2) / L

// same functional form as Ohm's Law (I = V/R) and
// as steady-state heat conduction - flux is a
// concentration difference divided by a resistance L/D

This steady-state form is what shows up in gas-exchange membranes, dialysis units, transdermal drug patches and semiconductor doping profiles: engineers pick the membrane thickness and material specifically to hit a target flux for a given concentration difference.

Where the simple picture breaks down

Fick's laws assume D is constant, but in concentrated solutions, in swelling gels, or when diffusion is coupled to an electric field (ions) or to a chemical reaction consuming the diffusing species, D itself becomes a function of concentration, position or time, and the simple Gaussian solution no longer applies exactly. Reaction-diffusion systems - where a diffusing species is also being created or destroyed - need an extra source/sink term added to the second law, and that small addition is enough to produce Turing patterns, the same mechanism behind animal coat markings.

Frequently asked questions

Why does diffusion slow down so much over long distances?

Because the spreading distance scales with the square root of time, not linearly. Covering twice the distance takes four times as long, so diffusion is efficient at the scale of a single cell but hopelessly slow at the scale of a whole organism - which is exactly why circulatory and respiratory systems exist to move oxygen by bulk flow instead.

What's the physical difference between Fick's First and Second Laws?

The First Law is a snapshot: given the gradient right now, how fast is matter crossing a surface. The Second Law adds the time dimension by combining the First Law with conservation of mass, giving a full differential equation for how the concentration profile evolves. You need the Second Law to predict a future profile; the First Law alone only tells you the instantaneous flux.

Does the diffusion coefficient D depend on concentration?

In dilute, ideal solutions D is treated as a constant characteristic of the solute-solvent pair. In concentrated solutions, gels, or when diffusion couples to a reaction or an electric field, D can become a function of concentration or position, and the clean Gaussian and steady-state-linear solutions of Fick's laws only hold approximately.

Try it live

Everything above runs in your browser — open Fick's Laws of Diffusion and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Fick's Laws of Diffusion simulation

What did you find?

Add reproduction steps (optional)