Fick’s law calculator
This Fick’s law calculator solves Fick’s first law J = −D·dC/dx for the flux, the diffusivity, the concentration difference or the thickness, handles steady gas diffusion through a stagnant film and equimolar counter-diffusion, and applies Fick’s second law to find how far and how fast a solute penetrates a semi-infinite solid or liquid.
Fick’s law calculator: first law across a layer
Fick’s law calculator for gases: stagnant film or equimolar counter-diffusion
Fick’s law calculator, second law: penetration into a semi-infinite medium
How to use the Fick’s law calculator
The first card is Fick’s first law in its simplest form: steady diffusion across a layer with a straight concentration profile. Choose what to solve for (flux, diffusivity, concentration difference or thickness), fill in the rest, and optionally add the area and molar mass to get the transfer rate in mol/s and kg/s. The second card handles the two classic gas-phase cases from every mass transfer course: diffusion of A through a stagnant gas B (evaporation from a liquid surface, absorption of one gas into a liquid) and equimolar counter-diffusion. The third card switches to Fick’s second law for unsteady diffusion into a thick solid or liquid, which is the model behind carburizing, drug release, gas uptake into a quiescent liquid and penetration theory. Every card of the Fick’s law calculator shows the full working, and the unit menus convert cm²/s, mmol/L, mm, atm or hours for you. Nothing is stored: the Fick’s law calculator runs entirely in your browser.
What is Fick’s law?
Adolf Fick proposed in 1855 that a dissolved substance moves from high to low concentration at a rate proportional to the concentration gradient, by analogy with Fourier’s law of heat conduction. For a binary mixture of A and B in one dimension, the diffusion flux relative to the molar-average velocity is:
JA is the molar diffusion flux in mol/(m²·s), DAB the binary diffusion coefficient in m²/s, CA the molar concentration in mol/m³ and x the distance in m. The minus sign says diffusion runs down the gradient. At steady state with constant D the profile is linear, so the derivative becomes (C₁ − C₂)/Δx, which is what the first card of the Fick’s law calculator uses. Fourier’s law (q = −k·dT/dx) and Newton’s law of viscosity have the same form, which is why heat, mass and momentum transfer are taught together; the Thermal Conductivity Calculator is the heat-transfer counterpart. A compact derivation, including the error-function solution used below, is in the Fick’s laws of diffusion overview, and the LibreTexts chemistry module on diffusion covers the molecular picture.
Diffusion flux J versus total flux N
Fick’s law gives the diffusive flux JA. The flux you measure in a process, NA, also includes A carried along by the bulk motion of the mixture: NA = JA + xA(NA + NB). When A is dilute, or when A and B move in opposite directions at equal molar rates, the bulk term vanishes and NA = JA. When A diffuses through a gas B that does not move, the bulk term adds to the flux; that is the stagnant-film case of the second card.
Steady gas diffusion in the Fick’s law calculator: stagnant film or equimolar counter-diffusion
pBM = (pB2 − pB1)/ln(pB2/pB1) is the log-mean partial pressure of the stagnant gas. The two equations differ only by the bulk-flow factor P/pBM, always greater than 1. Use the stagnant-film form for evaporation of a liquid into a gas, absorption of one gas from an insoluble carrier and drying; use equimolar counter-diffusion for binary distillation, where every mole of the more volatile component that vaporizes condenses a mole of the other (see the Distillation Column Calculator). The ideal-gas concentration c = P/(R·T) links partial pressures and concentrations; the Ideal Gas Law Calculator gives it for other conditions.
| pA1/P (with pA2 = 0) | P/pBM | Error if the bulk flow is ignored |
|---|---|---|
| 0.01 | 1.005 | 0.5 % |
| 0.05 | 1.026 | 2.5 % |
| 0.10 | 1.054 | 5 % |
| 0.30 | 1.189 | 16 % |
| 0.50 | 1.386 | 28 % |
| 0.80 | 2.012 | 50 % |
The Fick’s law calculator reports P/pBM with every stagnant-film result. Below about 5 % of A the two answers agree within a few percent; for a volatile solvent evaporating near its boiling point the stagnant-film correction dominates.
Fick’s second law and the error-function solution
When the concentration changes with time, a mass balance on a thin slice combined with Fick’s first law gives Fick’s second law:
For a medium that starts at a uniform C₀ and whose surface is suddenly held at Cs, and that is thick compared with the distance diffusion reaches (a semi-infinite medium), the solution is
The third card of the Fick’s law calculator inverts this numerically, so you do not need an erf table, but the table below is handy for hand checks and exams. Two practical consequences follow from the √(D·t) group: doubling the depth takes four times as long, and the profile is essentially flat beyond x ≈ 4√(D·t), where erfc(2) = 0.005.
| z | erf(z) | z | erf(z) |
|---|---|---|---|
| 0.1 | 0.1125 | 0.7 | 0.6778 |
| 0.2 | 0.2227 | 0.8 | 0.7421 |
| 0.3 | 0.3286 | 0.9 | 0.7969 |
| 0.4 | 0.4284 | 1.0 | 0.8427 |
| 0.5 | 0.5205 | 1.2 | 0.9103 |
| 0.6 | 0.6039 | 1.5 | 0.9661 |
Worked examples with the Fick’s law calculator
1. CO₂ through a stagnant water layer (first card of the Fick’s law calculator). Water saturated with CO₂ at 1 atm and 25 °C (about 34 mol/m³) is separated from CO₂-free water by a 1 mm unstirred layer. With D = 1.92 × 10⁻⁹ m²/s, J = 1.92 × 10⁻⁹ × (34 − 0)/0.001 = 6.53 × 10⁻⁵ mol/(m²·s). Over 0.5 m² that is 3.26 × 10⁻⁵ mol/s, and with M = 44.01 g/mol the mass flux is 2.87 × 10⁻⁶ kg/(m²·s), about 10 g/(m²·h). Liquid diffusion is slow: with the same concentration difference, a gas layer of the same thickness would pass roughly ten thousand times more.
2. Water evaporating up a tube (second card of the Fick’s law calculator). Geankoplis (Transport Processes and Separation Process Principles, Example 6.2-2) places water at 293 K at the bottom of a tube, 0.1524 m below the open top, where dry air flows past. With pA1 = 0.0231 atm (the vapor pressure), pA2 = 0, P = 1 atm and D = 0.250 × 10⁻⁴ m²/s: pBM = 0.988 atm and NA = 0.250 × 10⁻⁴ × 101,325 × 2341/(8314 × 293 × 0.1524 × 100,149) = 1.595 × 10⁻⁷ kmol/(m²·s), exactly the textbook answer. The equimolar formula would give 1.576 × 10⁻⁷, only 1.2 % less, because water vapor is dilute. Geankoplis Example 6.2-1 is a check for the equimolar mode: He and N₂ at 298 K and 1 atm in a 0.1 m tube with pA1 = 0.060 atm, pA2 = 0.020 atm and D = 0.687 × 10⁻⁴ m²/s give 1.124 × 10⁻⁶ kmol/(m²·s).
3. Carburizing steel (third card). Callister’s Materials Science and Engineering (Example 5.2) carburizes a steel with 0.25 wt% C at 950 °C with the surface held at 1.20 wt% C and asks how long it takes to reach 0.80 wt% C at 0.5 mm, with D = 1.6 × 10⁻¹¹ m²/s. (0.80 − 0.25)/(1.20 − 0.25) = 0.5789 = erfc(η), so erf(η) = 0.4211 and η = 0.392. Then t = (5 × 10⁻⁴)²/(4 × 1.6 × 10⁻¹¹ × 0.392²) = 25,400 s, about 7.1 h. The Fick’s law calculator solves erfc exactly (η = 0.3924) and shows 25,370 s = 7.05 h with its defaults, the same answer without the table rounding. Switch the mode to “Concentration at depth x” with t = 7.05 h and it returns 0.80 wt% at 0.5 mm; the chart shows the whole carbon profile, which flattens out at 0.25 wt% beyond about 2.5 mm.
Typical diffusivities to enter in a Fick’s law calculator
| Medium | Typical D (m²/s) | Distance diffused in 1 h, √(D·t) |
|---|---|---|
| Gases at 1 atm (water vapor, CO₂ in air) | 1 × 10⁻⁵ to 3 × 10⁻⁵ | 0.19 – 0.33 m |
| Small molecules in water at 25 °C | 0.5 × 10⁻⁹ to 2.5 × 10⁻⁹ | 1.3 – 3 mm |
| Proteins in water | 10⁻¹¹ to 10⁻¹⁰ | 0.2 – 0.6 mm |
| Carbon in γ-iron at 900–1000 °C | 5 × 10⁻¹² to 3 × 10⁻¹¹ | 0.13 – 0.33 mm |
| Dopants in silicon at 1000 °C | 10⁻¹⁸ to 10⁻¹⁷ | 0.06 – 0.2 µm |
For a specific pair, estimate D with the Diffusion Coefficient Calculator (Fuller for gases, Wilke-Chang for liquids) and then come back to this Fick’s law calculator. If the medium flows, molecular diffusion is no longer the whole story: use a convective mass transfer coefficient from the Mass Transfer Coefficient Calculator or the Sherwood Number Calculator instead of D/Δx.
Common mistakes when using a Fick’s law calculator
Mixing concentration units. D·ΔC/Δx gives mol/(m²·s) only with C in mol/m³ (1 mol/L = 1000 mol/m³). Ignoring bulk flow. For evaporation of a volatile liquid, using J instead of the stagnant-film N underestimates the rate by the factor P/pBM. Using equimolar counter-diffusion for absorption. In absorption the carrier gas does not cross the interface; use the stagnant-film form. Applying the erfc solution to a thin part. It assumes the far side never feels the surface; if the part is thinner than about 4√(D·t) use the finite-slab series solution. Confusing erf and erfc. (C − C₀)/(Cs − C₀) equals erfc, so erf(η) is one minus that ratio. Using a diffusivity at the wrong temperature. Solid-state D follows an Arrhenius law and changes by an order of magnitude over 100 °C; the Arrhenius Equation Calculator can rescale it if you know the activation energy.
Related calculators
Estimate DAB with the diffusion coefficient calculator, solve the diffusion step with this Fick’s law calculator, then move from molecular diffusion to convection with the mass transfer coefficient calculator, the Sherwood number calculator and the Schmidt Number Calculator.
- Diffusion Coefficient Calculator
- Mass Transfer Coefficient Calculator
- Sherwood Number Calculator
- Schmidt Number Calculator
- Ideal Gas Law Calculator
- Thermal Conductivity Calculator
- All chemical engineering calculators
Frequently asked questions
What is the difference between Fick’s first and second law?
The first law relates the flux to the concentration gradient at one instant, J = −D·dC/dx, and is enough for steady state. The second law, ∂C/∂t = D·∂²C/∂x², follows from a mass balance and describes how the profile changes with time.
What are the units of the diffusion flux?
Molar flux is in mol/(m²·s) (or kmol/(m²·h)); mass flux is in kg/(m²·s). Multiply the molar flux by the molar mass in kg/mol to convert, as the first card of the Fick’s law calculator does when you enter M.
When should I use the stagnant-film equation instead of J = D·ΔC/Δx?
Use it when A diffuses through a gas that does not cross the boundary, such as evaporation into air or absorption from an inert carrier. The correction factor P/pBM is small below about 5 % A but reaches 1.4 at 50 % A; the second card of the Fick’s law calculator shows both results side by side.
Why does Fick’s second law give depth proportional to the square root of time?
The only length scale in the problem is √(D·t), so the concentration profile depends on x/√(D·t). A given concentration moves inward as √t: four times the time doubles the depth, which you can confirm with the third card of the Fick’s law calculator.
Is this Fick’s law calculator free?
Yes. It runs in your browser, needs no sign-up and does not store or send the values you enter.