5. There are six cards each inscribed with one of the numbers $1,2,3,4,5,6$. Each time, one card is drawn, the number on it is noted, and then it is put back. This is done four times. The probability that the difference between the largest and smallest number drawn is equal to 5 is
5. $\frac{151}{648}$.

To make the difference between the maximum and minimum numbers drawn equal to 5, both 6 and 1 must have been drawn in the 4 draws. There are $6^{4}$ possible outcomes for 4 draws, among which there are $5^{4}$ outcomes where 1 is not drawn, $5^{4}$ outcomes where 6 is not drawn, and $4^{4}$ outcomes where neither 1 nor 6 is drawn. Therefore, the number of outcomes where both 1 and 6 are drawn is $6^{4}-2 \times 5^{4}+4^{4}=302$.
Thus, the required probability is $\frac{302}{6^{4}}=\frac{151}{648}$.