what is the distance between any two consecutive layers in ccp arrangement and how to calculate it?

in a ccp fashion  the vertical distance between any two consecutive layer is = a$^{\sqrt{}}$
in ccp a$^{\sqrt{}}$2= 4r
$\rightarrow$ a= 4r/$^{\sqrt{}}$2
$\rightarrow$ a$^{\sqrt{}}$3  =$4r \left ( \sqrt{3} \right )/{\sqrt{2}}$