Metadynamics is a powerful technique that has been successfully exploited to explore the multidimensional
free energy surface of complex polyatomic systems and predict transition mechanisms in very different fields,
ranging from chemistry and solid-state physics to biophysics. We here derive an explicit expression for the
accuracy of the methodology and provide a way to choose the parameters of the method in order to optimize
its performance.