Derangements follow a very simple recursive formula $d(n)=(n-1)(d(n-1)+d(n-2)$.
paraphrasing from wikipedia:
suppose we have a derangement on n objects if object number 1 is sent to place $j$ then exactly one of the following must be true for the derangement.
object $j$ is sent to place 1 (in which case the $(n-2)$ objects that are not 1 or $j$ can be any derangement on $n-2$ objects)
object $j$ is not sent to place 1. (then we know that the objects $\{2,3,4,5...n\}$ form a derangement on $n-1$ objects).
Combining this with the fact there are n-1 possible values for j (since 1 is not an option because it is a derangement) we get the [recursion] (http://en.wikipedia.org/wiki/Recursive_definition) $d(n)=n-1(d(n-1)+d(n-2))$
we start knowing $d(1)=0$ and $d(2)=1$. Therefore
$d(3)=2(1)=2$
$d(4)=3(2+1)=9$
$d(5)=4(9+2)=44$
Now: in general there are n! ways to rearrange n elements in a line. since 5!=120 there are 120 possible rearrangements (also called permutations). Now out of these 120 permutations only 44 are derangements. Assuming all of them are equally likely we get the probability of getting a derrangement is $\frac{44}{120}=\frac{11}{30}\approx 36.67%$