$ E_{out} = 4 \pi n_1 n_2 (m_0-m_a) c^2{(\frac {m}{2k_B T})}^{3/2} \int_0^ \infty \sigma(v) v^2 e^{\frac {-mv^2}{2k_B T}} dv$
$m_0$ is the sum masses of the reacting nuclei, $m_a$ is the sum masses of the product nuclei, $n_1$ is the number density of one of the reacting nucleus and $n_2$ is the number density of the other reacting nucleus, $\sigma$ is the probability of fusion reaction happening, if the energy is less than the coulomb barrier, it is the probability of quantum tunneling through the coulomb barrier. If we could find that probability we could calculate the total energy output of a nuclear fusion reaction.