In this paper, we study the problem of computing the effective diffusivity for a particle moving in chaotic and stochastic flows. In addition, we numerically investigate the residual diffusion phenomenon in chaotic advection. The residual diffusion refers to the nonzero effective (homogenized) diffusion in the limit of zero molecular diffusion as a result of chaotic mixing of the streamlines. In this limit, traditional numerical methods typically fail since the solutions of the advection-diffusion equations develop sharp gradients. Instead of solving the Fokker--Planck equation in the Eulerian formulation, we compute the motion of particles in the Lagrangian formulation, which is modeled by stochastic differential equations (SDEs). We propose an effective numerical integrator based on a splitting method to solve the corresponding SDEs in which the deterministic subproblem is symplectic preserving while the random subproblem