For material flowing through a volume, the residence time is a measure of how much time the matter spends in it. Examples include fluids in a chemical reactor, specific elements in a geochemical reservoir, water in a catchment, bacteria in a culture vessel and drugs in human body. A molecule or small parcel of fluid has a single residence time, but more complex systems have a residence time distribution.
There are at least three time constants that are used to represent a residence time distribution. The turn-over time or flushing time is the ratio of the material in the volume to the rate at which it passes through; the mean age is the mean length of time the material in the reservoir has spent there; and the mean transit time is the mean length of time the material spends in the reservoir.
The concept of residence time originated in models of chemical reactors. The first such model was an axial dispersion model by Irving Langmuir in 1908. This received little attention for 45 years; other models were developed such as the plug flow reactor model and the continuous stirred-tank reactor, and the concept of a washout function (representing the response to a sudden change in the input) was introduced. Then, in 1953, Peter Danckwerts resurrected the axial dispersion model and formulated the modern concept of residence time.
Basic residence time theory treats a system with an input and an output, both of which have flow only in one direction. The system is homogeneous and the substance that is flowing through is conserved (neither created nor destroyed). A small particle entering the system will eventually leave, and the time spent there is its residence time. In a particularly simple model of flow, plug flow, particles that enter at the same time continue to move at the same rate and leave together. In this case, there is only one residence time. Generally, though, their rates vary and there is a distribution of exit times. One measure of this is the washout function , the fraction of particles leaving the system after having been there for a time or greater. Its complement, , is the cumulative distribution function. The differential distribution, also known as the residence time distribution or exit age distribution,:260–261 is given by
This has the properties of a probability distribution: it is always nonnegative and
One can also define a density function based on the flux (mass per unit time) out of the system. The transit time function is the fraction of particles leaving the system that have been in it for up to a given time. It is the integral of a distribution . If, in a steady state, the mass in the system is and the outgoing flux is , the distributions are related by
As an illustration, for a human population to be in a steady state, the deaths per year of people older than years (the left hand side of the equation) must be balanced by the number of people per year reaching age (the right hand side).
Some statistical properties of the residence time distribution are frequently used. The mean residence time, or mean age, is given by the first moment of the residence time distribution:
and the variance is given by
or by the dimensionless form .
Simple flow models
In an ideal plug flow reactor there is no axial mixing and the fluid elements leave in the same order they arrived. Therefore, fluid entering the reactor at time will exit the reactor at time , where is the residence time of the reactor. The fraction leaving is a step function, going from 0 to 1 at time The distribution function is therefore a Dirac delta function at .
The mean is and the variance is zero.
In an ideal continuous stirred-tank reactor (CSTR), the flow at the inlet is completely and instantly mixed into the bulk of the reactor. The reactor and the outlet fluid have identical, homogeneous compositions at all times. The residence time distribution is exponential:
The mean residence time is just one of the time constants used to represent the distribution. The mean transit time is the first moment of the transit time distribution:
and the turnover time, also known as the flushing time, is simply the ratio of mass to flux:
It can be shown that, in a steady state, 
The relationship between or and is determined by the type of distribution:
- : it takes some time for particles to begin leaving the system. Examples include water in a lake with inlet and outlet on opposite sides; and a nuclear bomb test where radioactive material is introduced high in the stratosphere and filters down to the troposphere.
- : the frequency functions and are exponential, as in the CSTR model above. Such a distribution occurs whenever all particles have a fixed probability per unit time of leaving the system. Examples include radioactive decay and first order chemical reactions (where the reaction rate is proportional to the amount of reactant).
- : most of the particles pass through quickly, but some are held up. This can happen when the main source and sink are very close together or the same. For example, most water vapor rising from the ocean surface soon returns to the ocean, but water vapor that gets sufficiently far away will probably return much later in the form of rain.
- Nauman, E. Bruce (May 2008). "Residence Time Theory". Industrial & Engineering Chemistry Research. 47 (10): 3752–3766. doi:10.1021/ie071635a.
- Levenspiel, Octave (1999). Chemical reaction engineering (3rd ed.). New York: Wiley. ISBN 978-1-60119-921-8.
- Bolin, Bert; Rodhe, Henning (February 1973). "A note on the concepts of age distribution and transit time in natural reservoirs". Tellus. 25 (1): 58–62. doi:10.1111/j.2153-3490.1973.tb01594.x.
- Monsen, Nancy E.; Cloern, James E.; Lucas, Lisa V.; Monismith, Stephen G. (September 2002). "A comment on the use of flushing time, residence time, and age as transport time scales". Limnology and Oceanography. 47 (5): 1545–1553. doi:10.4319/lo.2002.47.5.1545.