Skip to content
ScienceQuest
Biology Simulator School

Diffusion and Osmosis Simulator

Diffusion moves solute from high to low concentration; osmosis moves water across a membrane into the more concentrated side. Watch both, with Fick’s law.

Simulator

Water moves
Water crosses into the more concentrated solution, from the higher water potential to the lower.
Left to right
Left
The solute cannot cross, so its amount is fixed and its concentration changes only as the side grows or shrinks.
100 mmol/L
Right
300 mmol/L
Water potential, left
Solute potential, −cRT, plus any pressure. Pure water with no pressure on it is zero.
−248 kPa
Water potential, right
Water moves from the higher, less negative, water potential to the lower.
−744 kPa
Settles at
Both sides end at this concentration, once the water has moved until they match.
200 mmol/L
Parameters

Water only makes a partially permeable membrane, and the water moves. Let the solute through too and it diffuses instead.

mmol/L

Each solute dot stands for 2 mmol/L on its side. Set 0 for pure water.

mmol/L

Make the two equal and the solutions are isotonic: nothing changes but the jiggling.

Smaller molecules diffuse faster: urea about two and a half times as fast as sucrose.

°C

Warmer water is less viscous, so molecules diffuse faster. Osmotic pressure rises with the absolute temperature.

µm/s

How fast water crosses the membrane. A human red blood cell’s is about 200 µm/s, most of it through water channels.

  • Left
  • Right
Solute concentration on each side against time, from the osmotic flow law. The solute cannot cross, so the two close only because water moves into the stronger solution.

Citing this tool

Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.

Teaching with this? You can put it on a class page or LMS for free, with no ads inside the frame. Get the embed code.

The equation

J=−Ddcdx,Π=cRTJ = -D\frac{dc}{dx}, \quad \Pi = cRT

Fick (1855) and van ’t Hoff (1887)

What diffusion and osmosis are

Diffusion is the net movement of particles from where they are more concentrated to where they are less, driven by nothing but their own random motion. Osmosis is the net movement of water through a partially permeable membrane into the more concentrated solution. Fick’s first law gives the rate of diffusion, J = −D dc/dx, and van ’t Hoff’s law gives the osmotic pressure behind osmosis, Π = cRT.

This simulator puts both on one membrane. Let the solute through and it diffuses from the stronger side to the weaker until the two match, while the water, on balance, stays where it is. Hold the solute back and it cannot move, so the water does: it crosses into the stronger solution, the membrane slides to make room, and the two concentrations close from both ends. The only thing that changes between the two is the membrane, which is why it is the first control.

How to read the simulator

The tank is half a millimetre wide. The larger dots are the solute, each standing for 2 mmol/L on its side, and the small faint dots are water. Every one of them takes its own random step many times a second, so what you are watching is Brownian motion, sampled: each dot is one molecule followed out of the vast number a real tank would hold. The strip under the tank counts the solute in twenty slices, each bar straight below the slice it counts, so the concentration gradient in the picture and the gradient in the numbers are the same thing seen twice.

With the membrane letting water and solute through, the readouts put the concentration counted on each side beside what Fick’s law predicts, and the line over the strip is Fick’s second law at that moment. With it letting only water through, they give each side’s concentration and water potential and where the two will settle, the tank labels each side hypotonic or hypertonic, and the strip’s dashed lines are each side’s mean. Choosing a membrane restarts the run at a speed that suits it, 8x for osmosis and 2x for diffusion, because across this distance osmosis through a red blood cell’s membrane is several times slower than diffusion.

Fick’s law, and why the counts scatter about it

Fick’s first law says the flux of solute is proportional to the concentration gradient, J = −D dc/dx, with D the diffusion coefficient. Written for a membrane it becomes the form school biology uses: the rate of diffusion is proportional to the surface area times the concentration difference, divided by the thickness. Fick’s second law, dc/dt = D d²c/dx², says how a gradient flattens, and for a tank split down the middle it has an exact solution. The difference between the halves falls to half its starting value at t½ = 0.0492 L²/D, where L is the width of the tank.

Two things follow that are easy to get wrong. The half-way time does not depend on the size of the difference: 250 against 260 mmol/L and 0 against 500 mmol/L of sucrose both close half their gap in 23.6 s, because a bigger difference drives a proportionally bigger flow. And it goes as the square of the distance, so twice the width takes four times as long, which is why cells are small and why large organisms need a circulation to carry things any distance.

The counts do not sit on the curve, and they should not. Fick’s law is what random molecular motion averages to, in the way the exponential of the radioactive decay simulator is what random decays average to. With the 200 solute molecules the defaults draw, each side’s count scatters about the law by about 14 mmol/L once they have mixed, seven molecules either way, and the scatter shrinks only as the square root of the number counted. Press Restart twice and the two runs differ; the curve does not.

Worked example: 100 and 300 mmol/L of sucrose at 25 °C

These are the settings the simulator opens with. Van ’t Hoff’s law gives each side’s osmotic pressure, with 1 mmol/L equal to 1 mol/m³: on the left, Π = 100 × 8.314 × 298.15 = 247.9 kPa, and on the right 743.7 kPa. Water potential is minus that while nothing presses on either side, so the left is at −248 kPa and the right at −744 kPa, and water moves from the left to the right.

The membrane has the water permeability of a human red blood cell’s, 200 µm/s. The osmotic flow law, Jv = Pf Vw Δc, then gives a starting flow of 200 µm/s × 18.07 cm³/mol × 200 mmol/L = 0.72 µm/s, or 0.040 mol of water through each square metre every second. The membrane slides left at that speed, slowing as the two sides converge, and covers half its journey in 117 s, about 15 s on screen at 8x. It comes to rest a quarter of the way across, where the left side has shrunk to half its width and the right has grown by half, so both hold 200 mmol/L. Timing a membrane like this is a real measurement: the moving membrane method reads a lipid bilayer’s water permeability off the speed at which it moves between two solutions (Yano and colleagues, 2021).

Now switch the membrane to let water and solute through. The same starting solutions now even out by diffusion instead, with the membrane standing still, and Fick’s law has the halves at 150 and 250 mmol/L after 23.6 s. Sucrose diffuses with D = 520 µm²/s at 25 °C, so in one second a molecule wanders about 32 µm along each axis, √(2Dt), and a typical one takes about four minutes to wander the width of the tank.

Water potential, and the pressure that stops osmosis

Water potential measures how readily water leaves a place: Ψ = Ψs + Ψp, the solute potential plus the pressure potential, with pure water at atmospheric pressure set at zero. The solute potential is Ψs = −iCRT, minus the osmotic pressure, and water always moves from the higher water potential to the lower. AP Biology’s formula sheet writes it with R = 0.0831 L bar/(mol K) and the temperature as °C + 273, which gives −7.35 bar for 0.3 mol/L of sucrose at 22 °C. Set both sides to 300 mmol/L at 22 °C, so that nothing moves, and the simulator shows −736 kPa, the same to within about 0.1 percent. A-level biology usually quotes water potential in kilopascals, and plant physiologists in megapascals.

Set the left side to 0 for pure water and watch what nothing can balance. The water keeps crossing until the membrane meets its stop a fifth of the way across, after about 180 s. The right side is then at 187.5 mmol/L, and the stop holds 465 kPa: the pressure it takes to stop osmosis, which is what osmotic pressure means. That pressure appears as the right side’s pressure potential, bringing both water potentials to zero, and the water stops. It is large: 465 kPa would hold up a column of water about 47.5 m tall, and the 744 kPa of 300 mmol/L of sucrose about 76 m. Squeezing a solution harder than its osmotic pressure pushes water the other way, which is reverse osmosis, used to make drinking water from sea water.

Hypotonic, isotonic and hypertonic

The three words compare two solutions across a membrane by the solute it holds back. The hypotonic one has less and the hypertonic one more, so water moves from the hypotonic solution into the hypertonic one; isotonic solutions have the same and exchange no water on balance. A red blood cell in a hypotonic solution swells, and in a hypertonic one it shrinks, which is why a drip is made up with 0.9 percent sodium chloride, the concentration isotonic with it. A plant cell swells until its wall pushes back hard enough to stop the water, which is the same thing the stop does here.

A solute the membrane lets through does not count, however concentrated it is, because it evens itself out instead of drawing water. That is why the simulator gives no tonicity when its membrane lets the solute through, and it is the reason the serum osmolality calculator reports effective osmolality with urea left out: urea crosses cell membranes, so it raises osmolality without moving water. The kidney puts osmosis to work: it builds a salty, hypertonic medulla so that water leaves the urine wherever hormones have opened water channels, which the nephron explorer follows along the tubule.

Why temperature and the size of the molecule matter

The diffusion coefficient follows the Stokes-Einstein relation, D = kT/(6πηr): it rises with temperature, falls with the viscosity η of the water, and falls with the size r of the molecule. Urea, the smallest solute offered, diffuses 2.65 times as fast as sucrose, so it closes half the gap in 8.9 s where sucrose takes 23.6 s. Warming the water from 5 °C to 45 °C lowers its viscosity from 1.52 to 0.60 mPa s and raises every diffusion coefficient 2.9 times, taking sucrose’s half-way time from 43.2 s to 14.8 s.

Osmotic pressure responds far less, because it goes as the absolute temperature: the same warming raises it by only 14 percent. The random motion behind both is the same motion the kinetic theory gas simulator follows atom by atom in a gas, where molecules fly freely between collisions instead of jostling in a liquid.

Common mistakes

  • Explaining osmosis as water diffusing down its own concentration gradient. It is driven by the membrane turning back the solute, not by the solution holding less water (Kramer and Myers, 2013), which is why the water dots here are drawn at one density on both sides.
  • Thinking the molecules stop at equilibrium. They keep crossing in both directions at the same rate. What stops is the net movement.
  • Thinking water moves only one way in osmosis. It crosses both ways all the time; osmosis is the imbalance between the two.
  • Expecting a bigger difference to even out sooner. It flows faster, in proportion, so the half-way time is the same.
  • Assuming osmosis always ends with equal concentrations. Only when nothing pushes back. A cell wall, or the stop here, ends it at a pressure instead.
  • Calling a solution hypertonic because it holds more of a solute the membrane lets through. Tonicity only counts solutes the membrane holds back.
  • Counting a salt once. Sodium chloride gives two particles, so 150 mmol/L of it is close to 300 mmol/L of particles, which is what osmosis responds to.

What this model leaves out

Real membranes are neither perfectly selective nor perfectly open. Most let a solute through slowly, and a solute that leaks through, as urea does across a cell membrane, draws water at first and then lets it return as it spreads. The two settings here are the two extremes, and most real membranes sit somewhere between them.

The solutions are ideal and dilute, so the osmotic pressure is exactly cRT, where real solutions depart from it as they get more concentrated, and every solute stays as whole molecules. When the water flow is worked out, each side is treated as well mixed, but in a real tank the solute piles up against the membrane on the shrinking side and thins out on the growing one, which slows osmosis a little. The dots here do pile up, and the strip under the tank shows it; the flow is worked out as though they did not. The water permeability is held at its set value at every temperature, the membrane slides freely rather than bulging, the tank lies flat so gravity plays no part, and the molecules neither attract nor repel each other. Charged solutes add a voltage to the story, which the resting membrane potential simulator takes up.

Model and assumptions

Method
Monte Carlo over individual events
Repeatability
Random. A shared link reproduces the settings, not the particular run.

What it assumes

  • Every molecule drawn takes an independent random step, drawn from the exact spread Brownian motion gives over that interval, so the concentrations counted on each side are a sample rather than a curve.
  • The molecules do not interact and the solutions are ideal and dilute, so osmotic pressure is van ’t Hoff’s cRT with no osmotic coefficient.
  • The membrane either lets the solute through as freely as the water or holds it back completely, and in the second case it slides freely until it reaches a stop, so no pressure builds up across it before then.
  • Water crosses at the rate the osmotic flow law gives for the membrane’s water permeability, with each side treated as well mixed and the permeability held at its set value at every temperature.

Where it stops holding. Concentrated solutions, where van ’t Hoff’s law no longer holds, and real membranes, which let most solutes through slowly rather than freely or not at all. Salts count each of their ions separately. The Serum Osmolality and Osmolar Gap Calculator is the right tool there.

Numerical accuracy

No integration error: nothing is integrated. Each step moves every molecule by a random displacement drawn from the exact spread Brownian motion gives over that interval, and folding it back at a wall is exact as well, so the length of the step does not change the answer. With the membrane letting the solute through, the concentrations are counted from the molecules, so they scatter about Fick’s law by roughly the square root of the number counted: about 14 mmol/L on each side once the default concentrations have mixed. With the membrane holding the solute back nothing random reaches the numbers, which follow from the fixed amount of solute on each side and the closed-form solution of the osmotic flow law.

Diffusion and Osmosis Simulator: the concentration on the weaker side rising with time as water crosses the membrane.
The concentration on the weaker side rising with time as water crosses the membrane, computed by the simulator’s own model. Image © ScienceQuest, CC BY 4.0. Free to reuse with credit and a link to this page; how to reuse it. Download PNG

Common questions

What is the difference between diffusion and osmosis?

Diffusion is the net movement of any particles from where they are more concentrated to where they are less; osmosis is the net movement of water through a partially permeable membrane into the more concentrated solution. Both come from the same random molecular motion. What decides which one happens is the membrane: one that lets the solute through gives diffusion, with the solute evening itself out and no net movement of water, while one that holds the solute back gives osmosis, with the water moving instead.

Which way does water move in osmosis?

Into the solution with more dissolved solute, which is from the higher water potential to the lower. With 100 mmol/L of sucrose on one side and 300 mmol/L on the other at 25 °C, the water potentials are −248 kPa and −744 kPa, so the water moves into the 300 mmol/L side. Water molecules cross in both directions all the time; osmosis is the difference. It carries on until the two concentrations are equal, or until a pressure builds up that stops it, such as a plant cell wall pressing back.

How do you calculate osmotic pressure?

With van ’t Hoff’s law, Π = iCRT: the molar concentration times the gas constant times the absolute temperature, times i, the number of particles each formula unit gives. For 0.1 mol/L of glucose at 25 °C, i is 1 and Π = 0.1 × 0.08314 × 298.15 = 2.48 bar, which is 248 kPa. Sodium chloride splits into two ions, so its i is close to 2. The law holds for dilute solutions, and the solute potential of water potential theory is the same quantity with a minus sign, Ψs = −iCRT.

What is Fick’s law of diffusion?

That the rate of diffusion is proportional to the concentration gradient: J = −D dc/dx, where J is the flux and D the diffusion coefficient. Across a membrane this becomes a rate proportional to the surface area times the concentration difference, divided by the thickness, which is the form school biology uses. Fick’s second law, dc/dt = D d²c/dx², says how a gradient flattens with time. For sucrose across the half-millimetre tank here, with D = 520 µm²/s at 25 °C, it puts half the starting difference gone after 23.6 s, whatever the size of that difference.

What do hypotonic, isotonic and hypertonic mean?

They compare two solutions by the solute a membrane between them holds back: the hypotonic one has less, the hypertonic one more, and isotonic ones have the same. Water moves by osmosis from the hypotonic solution into the hypertonic one. A red blood cell in a hypotonic solution swells, and in a hypertonic one it shrinks; 0.9 percent sodium chloride is isotonic with it. A solute the membrane lets through does not count, which is why this simulator gives no tonicity when its membrane lets the solute through.