Computing the drift of objects and substances by ocean currents is of high relevance in operational oceanography and environmental managing. This problem is usually solved by a probability distribution computed from an ensemble of simulations of a stochastic differential equation. The accuracy of the results depends on the number of simulations considered in the ensemble. An approach based on a path integral formalism is proposed to compute distribution probabilities. The path integral is solved by a novel algorithm involving Fourier transforms. The best performance of this path integral approach versus traditional matrix multiplication and Monte Carlo techniques is demonstrated by comparing results of probability distributions of dispersion in ocean environments with different spatial scales of variability. Results indicate that the new algorithm provides a probability distribution of dispersion with similar accuracy as that obtained by the Monte Carlo approach, but a hundred times faster.