Diffusion Coefficient Calculator
Calculate the diffusion coefficient D using lab-ready models: Stokes–Einstein (particles in liquids), Fick’s First Law (flux & concentration gradient), Diffusion time/distance (rule-of-thumb scaling), or Experimental (MSD) from single-particle tracking. Includes unit conversions, quick picks, step-by-step, and a mini visual.
Background
The diffusion coefficient D measures how quickly particles spread out due to random motion. Bigger D → faster spreading. In liquids, D often depends on temperature, viscosity, and particle size (Stokes–Einstein). In 1D transport, diffusion relates flux to concentration gradients (Fick’s law). In experiments, diffusion can be estimated from mean squared displacement (MSD).
How to use this calculator
- Pick a mode using the radio buttons.
- Choose what to solve for, enter the other values, then click Calculate.
- Use the mini table to confirm SI conversions (super helpful for unit sanity checks).
- For experimental MSD data, choose Fit slope to estimate D from multiple points.
How this calculator works
- Unit conversions: all calculations run in SI (K, Pa·s, meters, seconds, m²/s), then convert back.
- Mode equations: each mode uses a standard diffusion relationship (listed below).
- Experimental fit: in MSD “fit” mode we compute a best-fit line for MSD vs t and use D = slope/(2n).
Formulas & Equations Used
Stokes–Einstein: D = kBT / (6π η r)
Fick’s First Law: J = −D(dC/dx)
Diffusion time scale (rule-of-thumb): t ≈ x²/(2nD)
Experimental MSD (Brownian motion): MSD = 2nDt
MSD slope relation: slope = d(MSD)/dt = 2nD ⇒ D = slope/(2n)
Example Problem & Step-by-Step Solution
Example 1 — Stokes–Einstein (solve D)
Water at 25°C (η=0.89 cP), particle radius r=5 nm. Find D.
- Convert: T=298.15 K, η=0.00089 Pa·s, r=5×10−9 m.
- Compute: D = kBT/(6π η r).
- Report D in m²/s (and optionally cm²/s).
Example 2 — Fick’s First Law (solve J)
A membrane has C1=0.10 mol/L, C2=0, thickness Δx=1 mm, and D=1×10−9 m²/s. Find flux magnitude |J|.
- Convert: 0.10 mol/L = 100 mol/m³, Δx=1 mm = 1×10−3 m.
- Gradient magnitude: |dC/dx| ≈ |C2−C1|/Δx = 100/(1×10−3) = 1×105 mol/m⁴.
- Use |J| = D|dC/dx| = (1×10−9)(1×105) = 1×10−4 mol/(m²·s).
Example 3 — Experimental MSD (fit slope → D)
In 2D (n=2), you measure MSD at multiple time lags. Fit gives slope slope = 4.0 µm²/s. Find D.
- Use slope relation: slope = 2nD.
- Rearrange: D = slope/(2n) = 4.0/(2×2) = 1.0 µm²/s.
- Convert to SI if needed: 1.0 µm²/s = 1.0×10−12 m²/s.
Frequently Asked Questions
Q: What is a “typical” diffusion coefficient?
Small molecules in water are often around ~10−9 m²/s. Bigger molecules/particles (or more viscous fluids) usually give smaller D.
Q: Why does Fick’s law have a minus sign?
It means diffusion goes from high concentration to low concentration. This calculator uses magnitudes for convenience.
Q: Should MSD vs t go through the origin?
Ideally yes for pure Brownian motion. In real data, localization error and drift can create an intercept. That’s why the fit reports a slope (used for D) and an intercept (diagnostic).