The use of electrostatic force microscopy (EFM) to characterize and manipulate surfaces at the nanoscale usually faces the problem of dealing with systems where several parameters are not known. Artificial neural networks (ANNs) have demonstrated to be a very useful tool to tackle this type of problems. Here, we show that the use of ANNs allows us to quantitatively estimate magnitudes such as the dielectric constant of thin films. To improve thin film dielectric constant estimations in EFM, we first increase the accuracy of numerical simulations by replacing the standard minimization technique by a method based on ANN learning algorithms. Second, we use the improved numerical results to build a complete training set for a new ANN. The results obtained by the ANN suggest that accurate values for the thin film dielectric constant can only be estimated if the thin film thickness and sample dielectric constant are known.PACS: 07.79.Lh; 07.05.Mh; 61.46.Fg.