A recurrence relation for the number of 2-factors of the cartesian product $P_5\times P_n$ is derived in the paper. By solving the recurrence relation we obtain an explicit formula for the number $f(n)$ of 2-factors in $P_5\times P_n$ is obtained.