The closed-form solution for the average distance of a deterministic network--Sierpinski network--is found. This important quantity is calculated exactly with the help of recursion relations, which are based on the self-similar network structure and enable one to derive the precise formula analytically. The obtained rigorous solution confirms our previous numerical result, which shows that the average distance grows logarithmically with the number of network nodes. The result is at variance with that derived from random networks.