Abstract The theory of first-passage time distribution functions and its extension to last-passage time distribution functions are applied to the problem of tracking the movement of water masses to and from the surface mixed layer in a global ocean general circulation model. The first-passage time distribution function is used to determine in a probabilistic sense when and where a fluid element will make its first contact with the surface as a function of its position in the ocean interior. The last-passage time distribution is used to determine when and where a fluid element made its last contact with the surface. A computationally efficient method is presented for recursively computing the first few moments of the first- and last-passage time distributions by directly inverting the forward and adjoint transport operator. This approach allows integrated transport information to be obtained directly from the differential form of the transport operator without the need to perform lengthy multitracer time integration of the transport equations. The method, which relies on the stationarity of the transport operator, is applied to the time-averaged transport operator obtained from a three-dimensional global ocean simulation performed with an OGCM. With this approach, the author (i) computes surface maps showing the fraction of the total ocean volume per unit area that ventilates at each point on the surface of the ocean, (ii) partitions interior water masses based on their formation region at the surface, and (iii) computes the three-dimensional spatial distribution of the mean and standard deviation of the age distribution of water.