Current force fields underestimate significantly the dielectric constant of formamide at standard conditions. We present a derivation of an accurate potential for formamide, which functional form builds on the OPLS/AA force field. Our procedure follows the approach introduced by Salas et al. (J. Chem. Theory and Comp., Just accepted, 2015), that can use information from ab initio calculations and molecular dynamics simulations. We consider several strategies to derive the atomic charges of formamide. We find that the inclusion of polarization effects in the quantum mechanical computations is essential to obtain reliable force fields. By varying the atomic charges and the LennardJones parameters describing the dispersion interactions in the OPLS/AA force field, we derive an optimum set of parameters to obtain accurate results for the dielectric constant, surface tension and bulk density of liquid formamide in a wide range of thermodynamic states. We test the transferability of our parameters to investigate liquid/liquid mixtures. We have chosen as case study an equimolar mixture of formamide and hexan-2-one. This mixture involves two fluids with very different polar characteristics, namely, large differences in their dielectric constants and their performance as polar solvents. The new potential highlights the importance of the correct parametrization of the pure liquid phases to investigate liquid mixtures. Finally, we examine the microscopic origin of the observed inmiscibility between formamide and hexa-2-one.