Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical & Research SuppliesReagents, PPE & instruments — chain-of-custody documented.Fast, traceable sourcing built for regulated research environments, from bench consumables to instrumentation.Shop lac.us CodeCASRAIlac.us

Mean Square Displacement (MSD): Definition, Calculation and Fitting Diffusion Coefficients

Mean square displacement explained: the MSD formula, a worked calculation, how to fit a diffusion coefficient and how many points to use.

Written and maintained by CASRAI Editorial Board

Last updated

Short answer

Mean square displacement (MSD) is the average of the squared distances a particle has moved between two positions a fixed time interval apart. For a tracked trajectory it is computed at each lag, and for simple Brownian motion in two dimensions the curve is a straight line, MSD = 4Dt, from which the diffusion coefficient D is the fitted slope divided by 4.

Definition and scope

MSD is a standard statistic for describing how fast and in what manner a particle moves, and it is widely used for diffusivity in single-particle tracking and microrheology (Didier and Zhang, 2015). The word “displacement” matters: it is the straight-line change in position between two time points, not the length of the path travelled in between. A particle that wanders widely and returns to its starting point has a small displacement and a long path.

The “time” on an MSD plot is the lag, the interval between the two positions being compared, not the clock time of the experiment. Taking the square root of an MSD returns a quantity in distance units: an MSD of 10,000 nm² corresponds to a typical displacement of roughly 100 nm, since √10,000 = 100.

How is MSD calculated from a trajectory?

Start with N recorded positions at a constant frame interval Δt. The time-averaged MSD at lag n (a whole number of frames, n = 1 to N−1) is the mean of the squared position differences over every pair of points n frames apart (Michalet, 2010):

MSD(nΔt) = 1/(N−n) × Σ (ri+n − ri)², summed from i = 1 to N−n, with the lag time given by t = nΔt.

How do I calculate displacement?

Displacement is the vector difference between two positions, ri+n − ri. Its square is the sum of the squared coordinate differences (x and y in a 2D track). Only these squared displacements are averaged; the path between the two points plays no part.

A small arithmetic illustration

Take four positions along one axis, in micrometres: 0, 1, 3, 2 (N = 4). At lag 1 the displacements are 1, 2 and −1, so the squares are 1, 4 and 1 and the MSD is 6/3 = 2 µm². At lag 2 the displacements are 3 and 1, giving (9 + 1)/2 = 5 µm². At lag 3 there is a single displacement of 2, giving 4 µm². Note how the number of averaged pairs falls as the lag grows, which is why the long-lag end of an MSD curve is the least reliable part.

From the curve to a diffusion coefficient

For two-dimensional Brownian motion in an isotropic medium, the expected MSD with localization error is ρ(t) = ε + 4Dt, where ε = 4σ² and σ is the localization uncertainty per coordinate. Fitting a line a + bt to the first points of the curve gives D = b/4 (Michalet, 2010). The positive intercept is not noise to be ignored: “the localization uncertainty introduces a positive offset in the MSD curve”, so a non-zero intercept at zero lag reflects measurement error as well as motion (Michalet, 2010; Bitesize Bio). The factor 4 belongs to this two-dimensional case, and the model leaves out a small correction for finite camera exposure time that the paper sets aside.

Reading the shape of an MSD curve

Curve shape What it indicates Example
Straight line Undirected diffusion Unbound GFP in the cytoplasm
Curve rising faster than a line Directed motion Dynein moving along microtubules
Rises, then levels off (plateau) Confinement; the plateau reflects the size of the confining region A centromere in the nucleus

Source for the table: Bitesize Bio (checked 2026-10-29). Whether a curve is “straight enough” is a statistical question: for Gaussian motions with stationary increments, the distribution of the estimated MSD and how quickly it converges depend on the diffusion exponent (Didier and Zhang, 2015), so the exponent should be checked rather than assumed.

How many MSD points to fit, and how long a trajectory

The best number of fitted points depends only on the reduced localization error x = σ²/(DΔt) and on N (Michalet, 2010):

  • When x is much smaller than 1, the best estimate of D comes from the first two points of the MSD curve.
  • For larger x, fit more points; the empirical minimum is pmin = E(2 + 2.7·x0.5), with p smaller than N, checked for N = 10, 100 and 1000.
  • An unweighted fit over pmin points reaches the same minimum relative error as weighted fits.
  • Reaching an accuracy of about 10% requires trajectories of about 1000 data points, and the optimum number of fitted points does not depend on how a very long trajectory is segmented (Ernst and Köhler, 2013).

Where it matters for labs

MSD analysis underlies single-particle tracking and microrheology, so it turns up wherever a lab follows labelled molecules or beads through a sample. Imaging choices set the quantities in the formulas above: the frame interval fixes Δt and localization precision fixes σ. Related reading on this site includes super-resolution microscopy, TIRF microscopy, FRAP and the general linear regression guide, which covers the line fitting step.

Checklist for reporting an MSD analysis

  • Frame interval Δt and number of positions N per trajectory.
  • Localization precision σ, and how the intercept was treated.
  • Range of lags fitted (the number of points p) and the reason for it.
  • Whether the curve was checked for a linear, rising or plateau shape before a single D was quoted.
  • Whether trajectories were segmented, and the segment length.

Common misunderstandings

  • Displacement is not path length. MSD compares two positions, never the route between them.
  • The x-axis is lag time, not experiment time.
  • MSD is not MSE. Mean squared error is a different statistic that averages squared differences between predicted and observed values; MSD averages squared changes in position over a time lag.
  • A zero intercept is not guaranteed. Localization error adds a positive offset.

FAQ

How is MSD calculated?

Average the squared position differences over all pairs of points a given number of frames apart, repeat for each lag, then fit the early part of the curve; in 2D, D is the slope divided by 4.

How do I calculate displacement?

Subtract the earlier position from the later one; the displacement is that vector difference, and it ignores the path taken.

How is MSE calculated?

MSE stands for mean squared error, the average of squared differences between predicted and observed values. It is a different quantity from MSD, although both average squared differences.

How do you calculate RMS speed?

RMS speed is the root-mean-square speed: square each speed, average, and take the square root. It is a speed statistic, not an MSD, though the square root of an MSD does give a distance.

Sources

  • Michalet X. Mean square displacement analysis of single-particle trajectories with localization error: Brownian motion in an isotropic medium. Phys Rev E 2010;82(4):041914. pmc.ncbi.nlm.nih.gov/articles/PMC3055791 (checked 2026-10-29).
  • Ernst D, Köhler J. Measuring a diffusion coefficient by single-particle tracking: statistical analysis of experimental mean squared displacement curves. Phys Chem Chem Phys 2013;15(3):845-849. epub.uni-bayreuth.de/4771 (abstract, checked 2026-10-29).
  • Didier G, Zhang K. The asymptotic distribution of the pathwise mean squared displacement in single particle tracking experiments. arXiv 1507.06567. arxiv.org/abs/1507.06567v2 (abstract, checked 2026-10-29).
  • Bitesize Bio. How does it move? Interpreting motion of an object with the mean squared displacement. bitesizebio.com/10951 (checked 2026-10-29).

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Mean Square Displacement (MSD): Definition, Calculation and Fitting Diffusion Coefficients

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →