Despite of their success, the results of first-principles quantum mechanical calculations contain inherent numerical errors caused by various approximations. We propose here a neural-network algorithm to greatly reduce these inherent errors. As a demonstration, this combined quantum mechanical calculation and neural-network correction approach is applied to the evaluation of standard heat of formation $DelH$ and standard Gibbs energy of formation $DelG$ for 180 organic molecules at 298 K. A dramatic reduction of numerical errors is clearly shown with systematic deviations being eliminated. For examples, the root--mean--square deviation of the calculated $DelH$ ($DelG$) for the 180 molecules is reduced from 21.4 (22.3) kcal$cdotp$mol$^{-1}$ to 3.1 (3.3) kcal$cdotp$mol$^{-1}$ for B3LYP/6-311+G({it d,p}) and from 12.0 (12.9) kcal$cdotp$mol$^{-1}$ to 3.3 (3.4) kcal$cdotp$mol$^{-1}$ for B3LYP/6-311+G(3{it df},2{it p}) before and after the neural-network correction.