  We propose a numerical method to evaluate the upper critical dimension $d_c$
of random percolation clusters in Erd\H{o}s-R\'{e}nyi networks and in
scale-free networks with degree distribution ${\cal P}(k) \sim k^{-\lambda}$,
where $k$ is the degree of a node and $\lambda$ is the broadness of the degree
distribution. Our results report the theoretical prediction, $d_c = 2(\lambda -
1)/(\lambda - 3)$ for scale-free networks with $3 < \lambda < 4$ and $d_c = 6$
for Erd\H{o}s-R\'{e}nyi networks and scale-free networks with $\lambda > 4$.
When the removal of nodes is not random but targeted on removing the highest
degree nodes we obtain $d_c = 6$ for all $\lambda > 2$. Our method also yields
a better numerical evaluation of the critical percolation threshold, $p_c$, for
scale-free networks. Our results suggest that the finite size effects increases
when $\lambda$ approaches 3 from above.
