We consider the anisotropic diffusion of cosmic rays in the large-scale Galactic magnetic field, where diffusion along the field and diffusion across the field proceeds at different rates. To calculate this diffusion we use stochastic differential equations to
describe the cosmic ray propagation, solving these numerically. The Galactic magnetic field is described using the Jansson-Farrar model for the Galactic magnetic field. In this paper we study the influence of perpendicular diffusion on the residence time of cosmic rays in the Galaxy. This provides an estimate for the influence of anisotropic diffusion on the residence time and the amount of matter (grammage) that a typical cosmic ray traverses during its residence in the Galaxy