We develop a fast algorithm to calculate the entanglement of formation of a mixed state, which is defined as the minimum average entanglement of the pure states that form the mixed state. The algorithm combines conjugat-gradient and steepest-descent algorithms and outperforms both. Using this new algorithm, we obtain the statistics of the entanglement of formation on ensembles of random density matrices of higher dimensions than possible before. The correlation between the entanglement of formation and other quantities that are easier to compute, such as participation ratio and negativity are presented. Our results suggest a higher percentage of zero-entanglement states among zero-negativity states than previously reported.