Nanomechanical resonators are widely operated as force and mass sensors with sensitivities in the zepto-Newton and yocto-gram regime, respectively. Their accuracy, however, is usually undermined by high uncertainties in the effective mass of the system, whose estimation is a non-trivial task. This critical issue can be addressed in levitodynamics, where the nanoresonator typically consists of a single silica nanoparticle of well-defined mass. Yet, current methods assess the mass of the levitated nanoparticles with uncertainties up to a few tens of percent, therefore preventing to achieve unprecedented sensing performances. Here, we present a novel measurement protocol that uses the electrical field from a surrounding plate capacitor to directly drive a charged optically levitated particle in moderate vacuum. The developed technique estimates the mass within a statistical error below 1% and a systematic error of 2%, and paves the way toward more reliable sensing and metrology applications of levitodynamics systems.